Difference between revisions of "Template:MeetingSidebar"

From Pirate Party Belgium
Jump to: navigation, search
Line 1: Line 1:
 
<includeonly>{{#vardefine: time | {{TimeRegex | {{{time|}}} }} }}{| style="width: 300px; border: 1px solid #aaaaaa; background-color: #f9f9f9; color: black; margin-bottom: 0.5em; margin-left: 0.5em; padding: 0.2em; float: right; position:relative; text-align:left;"
 
<includeonly>{{#vardefine: time | {{TimeRegex | {{{time|}}} }} }}{| style="width: 300px; border: 1px solid #aaaaaa; background-color: #f9f9f9; color: black; margin-bottom: 0.5em; margin-left: 0.5em; padding: 0.2em; float: right; position:relative; text-align:left;"
! style="text-align: center; background-color: #692D89; color:white;padding:0.3em; font-size:medium;" colspan="2" | {{#ifeq: {{{meetingname|Meeting}}} | Meeting
+
! style="text-align: center; background-color: #692D89; color:white;padding:0.3em; font-size:medium;" colspan="2" | {{{meetingname|Meeting}}}
  | {{#set:
 
    Has title=Meeting {{#if: {{{workgroup|}}} | ({{{workgroup}}}) }}
 
    }} Meeting
 
  | [[Has title::{{{meetingname}}}]]
 
  }}
 
 
|-
 
|-
 
! style="vertical-align: top;" | {{int:sidebar-workgroup}}
 
! style="vertical-align: top;" | {{int:sidebar-workgroup}}
| {{#if: {{{workgroup|}}} | {{#arraymap:{{{workgroup}}}|,|x|[[Organized by::x]]|<br />}} | ? }}
+
| {{#if: {{{workgroup|}}} | {{#arraymap:{{{workgroup}}}|,|x|[[x]]|<br />}} | ? }}
 
|-
 
|-
 
! style="vertical-align: top;" | {{int:sidebar-date}}
 
! style="vertical-align: top;" | {{int:sidebar-date}}
| {{#if: {{{date|}}} | [[Has date::{{#time:Y/m/d H:i|{{{date}}} {{#var: time}} }}|{{#time:D j F Y|{{{date}}}|{{int:language-code}} }}]] | ? }}  
+
| {{#if: {{{date|}}} | {{#time:D j F Y|{{{date}}}|{{int:language-code}} }} | ? }}  
 
|-
 
|-
 
! style="vertical-align: top;" | {{int:sidebar-time}}
 
! style="vertical-align: top;" | {{int:sidebar-time}}
| {{#if: {{{time|}}} | [[Has time::{{#time:H:i|{{#var: time}} }}|{{#time:{{int:sidebar-time-format}}|{{#var:time}} }}]] | ? }}
+
| {{#if: {{{time|}}} | {{#time:{{int:sidebar-time-format}}|{{#var:time}} }} | ? }}
 
|-
 
|-
 
{{#if: {{{venue|}}} |  
 
{{#if: {{{venue|}}} |  
 
! style="vertical-align: top;" {{!}} {{int:sidebar-venue}}
 
! style="vertical-align: top;" {{!}} {{int:sidebar-venue}}
{{!}} {{#set: In venue={{{venue}}}|Has link venue={{{linkvenue|}}} }}{{#if: {{{linkvenue|}}} | [{{{linkvenue}}} {{{venue}}}] | {{{venue}}} }}
+
{{!}} {{#if: {{{linkvenue|}}} | [{{{linkvenue}}} {{{venue}}}] | {{{venue}}} }}
 
{{!}}- }}
 
{{!}}- }}
 
! style="vertical-align: top;" | {{int:sidebar-address}}
 
! style="vertical-align: top;" | {{int:sidebar-address}}
 
| rowspan=2 style="padding:0px" |  
 
| rowspan=2 style="padding:0px" |  
 
{| cellspacing="0" style="width:100%;"  
 
{| cellspacing="0" style="width:100%;"  
| {{#if: {{{address|}}} | [[Has address::{{{address}}}]] | ? }}
+
| {{#if: {{{address|}}} | {{{address}}} | ? }}
 
|-
 
|-
| [[In postal code::{{{postalcode|}}}]] {{#if: {{{city|}}} | [[In city::{{{city}}}]] | ? }}
+
| {{{postalcode|}}} {{#if: {{{city|}}} | {{{city}}} | ? }}
 
|}
 
|}
 
|-
 
|-
Line 32: Line 27:
 
{{#if: {{{attendees|}}} |
 
{{#if: {{{attendees|}}} |
 
! style="vertical-align: top;" {{!}} {{int:sidebar-attendees}}
 
! style="vertical-align: top;" {{!}} {{int:sidebar-attendees}}
{{!}} {{#arraymap: {{{attendees}}}|,|x|{{#set:Has attendee=x}}x}}
+
{{!}} {{{attendees}}}
 
{{!}}- }}  
 
{{!}}- }}  
 
{{#if: {{{absentees|}}} |
 
{{#if: {{{absentees|}}} |
 
! style="vertical-align: top;" {{!}} {{int:sidebar-absentees}}
 
! style="vertical-align: top;" {{!}} {{int:sidebar-absentees}}
{{!}} {{#arraymap: {{{absentees}}}|,|x|{{#set:Has absentee=x}}x}}
+
{{!}} {{{absentees}}}
 
{{!}}- }}
 
{{!}}- }}
 
| colspan=2 |  
 
| colspan=2 |  
Line 42: Line 37:
 
| style="width:50%" | {{#if: {{{date|}}}  
 
| style="width:50%" | {{#if: {{{date|}}}  
 
   | {{#vardefine: prev  
 
   | {{#vardefine: prev  
     | {{#ask: [[Category:Meeting]] [[Organized by::{{#arraymap:{{{workgroup|}}}|,|x|x|{{!}}{{!}}}}]] [[Has date::<<{{#time:Y/m/d H:i|{{{date}}} {{#var:time}} }}]]  
+
     | {{#ask: [[Has event type::Meeting]] [[Organized by::{{#arraymap:{{{workgroup|}}}|,|x|x|{{!}}{{!}}}}]] [[Has date::<<{{#time:Y/m/d H:i|{{{date}}} {{#var:time}} }}]]  
 
       | limit=1  
 
       | limit=1  
 
       | searchlabel=
 
       | searchlabel=
Line 56: Line 51:
 
| style="width:50%" | {{#if: {{{date|}}}  
 
| style="width:50%" | {{#if: {{{date|}}}  
 
   | {{#vardefine: next  
 
   | {{#vardefine: next  
     | {{#ask: [[Category:Meeting]] [[Organized by::{{#arraymap:{{{workgroup|}}}|,|x|x|{{!}}{{!}}}}]] [[Has date::>>{{#time:Y/m/d H:i|{{{date}}} {{#var:time}} }}]]  
+
     | {{#ask: [[Has event type::Meeting]] [[Organized by::{{#arraymap:{{{workgroup|}}}|,|x|x|{{!}}{{!}}}}]] [[Has date::>>{{#time:Y/m/d H:i|{{{date}}} {{#var:time}} }}]]  
 
       | limit=1  
 
       | limit=1  
 
       | searchlabel=
 
       | searchlabel=
Line 78: Line 73:
 
     }}  
 
     }}  
 
   }}{{#if: {{#var: coords}}  
 
   }}{{#if: {{#var: coords}}  
   | {{!}} colspan=2 {{!}} {{#display_map: {{#var: coords}} | height = 225px }} [[Has coordinates::{{#var:coords}}| ]]
+
   | {{!}} colspan=2 {{!}} {{#display_map: {{#var: coords}} | height = 225px }}
 
   {{!}}- }}  
 
   {{!}}- }}  
 
}}
 
}}
Line 90: Line 85:
 
{{!}}- }}
 
{{!}}- }}
 
| colspan="2" style="text-align: center;" | {{#formlink:form=Meeting event|preload={{FULLPAGENAME}}|link text={{int:sidebar-clone-meeting}} }}
 
| colspan="2" style="text-align: center;" | {{#formlink:form=Meeting event|preload={{FULLPAGENAME}}|link text={{int:sidebar-clone-meeting}} }}
|} {{#if: {{{nocat|}}}  
+
|}{{#subobject:{{#time:d m Y|{date} }}
 +
  | Has title={{#ifeq: {{{meetingname|Meeting}}} | Meeting
 +
    | Meeting {{#if: {{{workgroup|}}} | ({{{workgroup}}}) }}
 +
    | {{{meetingname|}}}
 +
    }}
 +
  | Organized by={{{workgroup|}}}|+sep=,
 +
  | Has date={{#time:Y/m/d H:i|{{{date}}} {{#var: time}} }}
 +
  | Has time={{#time:H:i|{{#var: time}} }}
 +
  | In venue={{{venue|}}}
 +
  | Has link venue={{{linkvenue|}}}
 +
  | Has address={{{address|}}}
 +
  | In postal code={{{postalcode|}}}
 +
  | In city={{{city|}}}
 +
  | Has attendee={{{attendees|}}}|+sep=,
 +
  | Has absentee={{{absentees|}}}|+sep=,
 +
  | Has url={{fullurl:{{FULLPAGENAME}}}}
 +
  | Has coordinates={{#var:coords}}
 +
  | Has location={{#if: {{{venue|}}}
 +
    | {{{venue}}} {{#if: {{{address|}}}{{{city|}}} | – }}
 +
    }} {{#if: {{{address|}}}
 +
    | {{{address}}}{{#if: {{{city|}}} | , }}
 +
    }} {{{city|}}}
 +
  | Has event type=Meeting
 +
  | Has default form=Meeting event
 +
  }}|
 +
}} {{#if: {{{nocat|}}}  
 
| <!-- no categories -->
 
| <!-- no categories -->
 
| [[Category:Event]] [[Category:Meeting]]  
 
| [[Category:Event]] [[Category:Meeting]]  
}} {{#set: Has location={{#if: {{{venue|}}}
+
}}</includeonly><noinclude>{{MeetingSidebar
  | {{{venue}}} {{#if: {{{address|}}}{{{city|}}} | – }}
 
  }} {{#if: {{{address|}}}
 
  | {{{address}}}{{#if: {{{city|}}} | , }}
 
  }} {{{city|}}}
 
}} [[Has url::{{fullurl:{{FULLPAGENAME}}}}| ]] [[Has default form::Meeting event| ]] [[Has event type::Meeting| ]] {{#default_form:Meeting event}}</includeonly><noinclude>{{MeetingSidebar
 
 
|meetingname = Our awesome meeting
 
|meetingname = Our awesome meeting
 
|workgroup = An awesome team, Another team
 
|workgroup = An awesome team, Another team

Revision as of 23:42, 7 March 2017

Our awesome meeting Toicon-icon-avocado-discuss.svg
Workgroup An awesome team
Another team
Date Mon 14 November 2016
Time 12:00am
Venue Flying Dutchman
Address
Treasure Island 666
9000 Atlantica
City
Attendees Jack, Mary, Jurgen
Absentees Paul, Eve
Loading map...
Find routes on OpenStreetMap
Export iCalendar
Clone this meeting

Usage

{{MeetingSidebar
|meetingname = Our awesome meeting
|workgroup = An awesome team, Another team
|date = 14 nov 2016
|time = 12am
|venue = Flying Dutchman
|linkvenue = http://www.the-flying-dutchman.nl/
|address = Treasure Island 666
|postalcode = 9000
|city = Atlantica
|attendees = Jack, Mary, Jurgen
|absentees = Paul, Eve
}}