Difference between revisions of "Template:ExternalEventSidebar"

From Pirate Party Belgium
Jump to: navigation, search
m (static map)
(use css class pirate-sidebar + topics support + icon)
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|}}} }} }}{| class="pirate-sidebar"
! style="text-align: center; background-color: #692D89; color:white;padding:0.3em; font-size:medium;" colspan="2" | {{#if: {{{title|}}}
+
| style="padding:0;" colspan=2 |
  | {{{title}}}
+
{| style="width:100%;" cellspacing=0
  | ?
+
! class="title" | {{#if: {{{title|}}} | {{{title}}} | ? }}
  }}
+
| class="icon" | [[File:Noun project - Calendar.svg|x25px|link=Category:External Event]]
 +
|}
 
|-
 
|-
! style="vertical-align: top;" | {{int:sidebar-date}}
+
! {{int:sidebar-date}}
 
| {{#if: {{{date|}}} | {{#arraymap:{{{date}}}|,|x|{{#time:D j F Y|x|{{int:language-code}} }}|<br />}} | ? }}  
 
| {{#if: {{{date|}}} | {{#arraymap:{{{date}}}|,|x|{{#time:D j F Y|x|{{int:language-code}} }}|<br />}} | ? }}  
 
|-
 
|-
! style="vertical-align: top;" | {{int:sidebar-time}}
+
! {{int:sidebar-time}}
 
| {{#if: {{{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}}
+
! {{int:sidebar-venue}}
 
{{!}} {{#if: {{{linkvenue|}}} | [{{{linkvenue}}} {{{venue}}}] | {{{venue}}} }}
 
{{!}} {{#if: {{{linkvenue|}}} | [{{{linkvenue}}} {{{venue}}}] | {{{venue}}} }}
 
{{!}}- }}
 
{{!}}- }}
! style="vertical-align: top;" | {{int:sidebar-address}}
+
! {{int:sidebar-address}}
| rowspan=2 style="padding:0px" |  
+
| rowspan=2 style="padding:0;" |  
 
{| cellspacing="0" style="width:100%;"  
 
{| cellspacing="0" style="width:100%;"  
 
| {{#if: {{{address|}}} | {{{address}}} | ? }}
 
| {{#if: {{{address|}}} | {{{address}}} | ? }}
Line 23: Line 24:
 
|}
 
|}
 
|-
 
|-
! style="vertical-align: top;" | {{int:sidebar-city}}
+
! {{int:sidebar-city}}
 
|-
 
|-
! style="vertical-align: top;" | {{int:sidebar-price}}
+
! {{int:sidebar-price}}
 
| {{#switch: {{lc:{{{price|free}}}}}
 
| {{#switch: {{lc:{{{price|free}}}}}
 
   | free = {{int:sidebar-price-free}}
 
   | free = {{int:sidebar-price-free}}
Line 35: Line 36:
 
   }}
 
   }}
 
|-
 
|-
{{#if: {{{url|}}}
+
{{#if: {{{url|}}} |
| ! style="vertical-align: top;" {{!}} {{int:sidebar-url}}
+
! {{int:sidebar-url}}
 
{{!}} {{#arraymap:{{{url}}}|,|x|[x]}}
 
{{!}} {{#arraymap:{{{url}}}|,|x|[x]}}
 +
{{!}}- }}
 +
{{#if: {{{topics|}}} |
 +
! Topics
 +
{{!}} {{#arraymap:{{{topics}}}|,|x|[[x|{{ShowTitle|x}}]]|<br />}}
 
{{!}}- }}
 
{{!}}- }}
 
{{#if: {{{city|}}}  
 
{{#if: {{{city|}}}  
Line 55: Line 60:
 
}}
 
}}
 
{{#if: {{{date|}}} |  
 
{{#if: {{{date|}}} |  
! style="vertical-align: top;" {{!}} {{int:sidebar-export}}
+
! {{int:sidebar-export}}
 
{{!}} style="text-align:center;" {{!}} {{ExportEvent|{{FULLPAGENAME}}|workgroup={{{workgroup|}}}|date={{{date|}}} }}
 
{{!}} style="text-align:center;" {{!}} {{ExportEvent|{{FULLPAGENAME}}|workgroup={{{workgroup|}}}|date={{{date|}}} }}
 
{{!}}- }}
 
{{!}}- }}
| colspan="2" style="text-align: center;" | {{#formlink:form=External event|preload={{FULLPAGENAME}}|link text={{int:sidebar-clone-event}} }}
+
| colspan="2" style="text-align: center;" | '''{{#formlink:form=External event|preload={{FULLPAGENAME}}|link text={{int:sidebar-clone-event}} }}'''
 
|}{{#switch: {{SUBPAGENAME}}
 
|}{{#switch: {{SUBPAGENAME}}
 
| fr = | nl = | en = | de =
 
| fr = | nl = | en = | de =
Line 68: Line 73:
 
     | Has title={{{title|}}}
 
     | Has title={{{title|}}}
 
     | Organized by={{{workgroup|}}}|+sep=,
 
     | Organized by={{{workgroup|}}}|+sep=,
 +
    | In topic={{{topics|}}}|+sep=,
 
     | Has date={{#ifeq: {date} | ?  
 
     | Has date={{#ifeq: {date} | ?  
 
       |  
 
       |  
Line 106: Line 112:
 
|title = An awesome event
 
|title = An awesome event
 
|workgroup = An awesome crew
 
|workgroup = An awesome crew
 +
|topics = Some good topic
 
|date = 14 nov 2016
 
|date = 14 nov 2016
 
|time = 12am
 
|time = 12am
Line 122: Line 129:
 
|title = An awesome event
 
|title = An awesome event
 
|workgroup = An awesome crew
 
|workgroup = An awesome crew
 +
|topics = Some good topic
 
|date = 14 nov 2016
 
|date = 14 nov 2016
 
|time = 12am
 
|time = 12am

Revision as of 14:49, 25 September 2017

An awesome event Toicon-icon-avocado-schedule.svg
Date Mon 14 November 2016
Time 12:00am
Venue Flying Dutchman
Address
Treasure Island 666
9000 Atlantica
City
Price Free
Website [1]
Topics Some good topic
Loading map...
Find routes on OpenStreetMap
Export iCalendar
Clone this event

Usage

{{ExternalEventSidebar
|title = An awesome event
|workgroup = An awesome crew
|topics = Some good topic
|date = 14 nov 2016
|time = 12am
|venue = Flying Dutchman
|linkvenue = http://www.the-flying-dutchman.nl/
|address = Treasure Island 666
|postalcode = 9000
|city = Atlantica
|url = https://pirateparty.be
|price = free
}}