Difference between revisions of "Template:ExternalEventSidebar"

From Pirate Party Belgium
Jump to: navigation, search
m
 
(26 intermediate revisions by the same user not shown)
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>{{#set:Title Icon=Toicon-icon-avocado-schedule.svg}}{{#vardefine: time | {{TimeRegex | {{{time|}}} }} }}{{#vardefine: endtime | {{TimeRegex | {{{endtime|}}} }} }}{| class="pirate-sidebar external-event"
! 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:Toicon-icon-avocado-schedule.svg|x24px|link=Special:MyLanguage/Calendar/External]]
 +
|}
 
|-
 
|-
! style="vertical-align: top;" | {{int:sidebar-date}}
+
{{#if: {{{image|}}} |
| {{#if: {{{date|}}} | {{#arraymap:{{{date}}}|,|x|{{#time:D j F Y|x|{{int:language-code}} }}|<br />}} | ? }}  
+
{{!}} colspan=2 {{!}} [[File:{{{image}}}|frameless|150px|center]]
 +
{{!}}- }}
 +
! {{int:sidebar-date}}
 +
| {{#if: {{{date|}}}  
 +
  | {{#arraymap:{{{date}}}|,|x|{{#time:D j F Y|x|{{int:language-code}} }}|<br />}}{{#vardefine: next
 +
    | {{NextEventLink
 +
      | workgroup = {{{workgroup|}}}
 +
      | topics = {{{topics|}}}
 +
      | type = External
 +
      | date = {{{date}}}
 +
      | time = {{#var:time}}
 +
      }}
 +
    }}{{#vardefine: prev
 +
    | {{PrevEventLink
 +
      | workgroup = {{{workgroup|}}}
 +
      | topics = {{{topics|}}}
 +
      | type = External
 +
      | date = {{{date}}}
 +
      | time = {{#var:time}}
 +
      }}
 +
    }}
 +
  | ? }}  
 
|-
 
|-
! 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: {{{endtime|}}} | - {{#time:{{int:sidebar-time-format}}|{{#var:endtime}} }} }}  
 +
  | ?  
 +
  }}
 
|-
 
|-
 
{{#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 48:
 
|}
 
|}
 
|-
 
|-
! 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}}
 
   | gratuit = {{int:sidebar-price-free}}
 
   | gratuit = {{int:sidebar-price-free}}
 
   | gratis = {{int:sidebar-price-free}}
 
   | gratis = {{int:sidebar-price-free}}
 +
  | libre = {{int:sidebar-price-libre}}
 
   | 0 = {{int:sidebar-price-free}}
 
   | 0 = {{int:sidebar-price-free}}
 
   | {{{price}}}
 
   | {{{price}}}
 
   }}
 
   }}
 
|-
 
|-
{{#if: {{{url|}}}
+
{{#if: {{{url|}}} |
| ! style="vertical-align: top;" {{!}} {{int:sidebar-url}}
+
! {{int:sidebar-url}}
{{!}} [{{{url}}}]
+
{{!}} {{#arraymap:{{{url}}}|,|x|[x]}}
 +
{{!}}- }}
 +
{{#if: {{#var:prev|}}{{#var:next|}}
 +
|
 +
{{!}} colspan=2 {{!}}
 +
{{{!}} style="width:100%; text-align:center;"  
 +
{{!}} style="width:50%" {{!}} {{#if: {{#var:prev|}}
 +
  | [[File:Toicon-icon-afiado-rewind.svg|x25px|link={{#var:prev}}|{{int:sidebar-previous-event}}]]
 +
  }}
 +
{{!}} style="width:50%" {{!}} {{#if: {{#var:next|}}
 +
  | [[File:Toicon-icon-afiado-forward.svg|x25px|link={{#var: next}}|{{int:sidebar-next-event}}]]
 +
  }}
 +
{{!}}}
 +
{{!}}- }}
 +
{{#if: {{{topics|}}} |
 +
! {{int:sidebar-topics}}
 +
{{!}} {{#arraymap:{{{topics}}}|,|x|[[x|{{ShowTitle|x}}]]|<br />}}
 
{{!}}- }}
 
{{!}}- }}
 
{{#if: {{{city|}}}  
 
{{#if: {{{city|}}}  
Line 46: Line 88:
 
     }}  
 
     }}  
 
   }}{{#if: {{#var: coords}}  
 
   }}{{#if: {{#var: coords}}  
   | {{!}} colspan=2 {{!}} {{#display_map: {{#var: coords}} | height = 225px }}
+
   | {{!}} colspan=2 {{!}} {{#display_map: {{#var: coords}} | height = 225px | enablefullscreen = yes | scrollwheelzoom = no }}
 +
{{!}}-
 +
{{!}} colspan="2" style="text-align:center;" {{!}} {{#vardefine: coords_float
 +
    | {{#geocode:{{#var:coords}}|format=float|directional=no}}
 +
    }} ''[http://openstreetmap.org/directions?route=;{{#arraymap:{{#var:coords_float}}|,|x|x|,}}#map=17/{{#arraymap:{{#var:coords_float}}|,|x|x|/}} {{int:event-find-routes}}]''
 
   {{!}}- }}  
 
   {{!}}- }}  
 
}}
 
}}
 
{{#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}} }}'''
|}{{#arraymap:{{{date|}}}|,|{date}|{{#subobject:{{#time:d m Y|{date} }}
+
|}{{#switch: {{SUBPAGENAME}}
  | Has title={{{title|}}}
+
| fr = | nl = | en = | de =
  | Organized by={{{workgroup|}}}|+sep=,
+
| {{#arraymap:{{#if: {{{date|}}} | {{{date}}} | ? }}|,|{date}|{{#subobject:
  | Has date={{#time:Y/m/d H:i|{date} {{#var: time}}}}
+
      {{#ifeq: {date} | ?
  | Has time={{#time:H:i|{{#var: time}} }}
+
      |
  | In venue={{{venue|}}}
+
      | {{#time:d m Y|{date} }}  
  | Has link venue={{{linkvenue|}}}
+
      }}
  | Has address={{{address|}}}
+
    | Has title={{{title|}}}
  | In postal code={{{postalcode|}}}
+
    | Organized by={{{workgroup|}}}|+sep=,
  | In city={{{city|}}}
+
    | In topic={{{topics|}}}|+sep=,
  | Has price={{#switch: {{lc:{{{price|free}}}}}
+
    | Has date={{#ifeq: {date} | ?
    | free = 0
+
      |
    | gratuit = 0
+
      | {{#time:Y/m/d H:i|{date} {{#var: time}}}}  
    | gratis = 0
+
      }}
    | {{{price}}}
+
    | Has end date={{#ifeq: {date} | ?
    }}
+
      |
  | Has url={{#if: {{{url|}}}  
+
      | {{#time:Y/m/d H:i|{date} {{#if: {{#var: endtime}} | {{#var: endtime}} | {{#var: time}} }} }}
    | {{{url}}}
+
      }}
    | {{fullurl:{{FULLPAGENAME}}}}
+
    | Has time={{#if: {{#var: time}} | {{#time:H:i|{{#var: time}} }} }}
    }}
+
    | Has end time={{#if: {{#var: endtime}}
  | Has coordinates={{#var:coords}}
+
      | {{#time:H:i|{{#var: endtime}} }}
  | Has location={{#if: {{{venue|}}}  
+
      | {{#if: {{#var: time}} | {{#time:H:i|{{#var: time}} }} }}
    | {{{venue}}} {{#if: {{{address|}}}{{{city|}}} | – }}  
+
      }}
    }} {{#if: {{{address|}}}
+
    | In venue={{{venue|}}}
    | {{{address}}}{{#if: {{{city|}}} | , }}
+
    | Has link venue={{{linkvenue|}}}
    }} {{{city|}}}
+
    | Has address={{{address|}}}
  | Has event type=External
+
    | In postal code={{{postalcode|}}}
  | Has default form=External event
+
    | In city={{{city|}}}
  | Has page={{FULLPAGENAME}}
+
    | Has price={{#switch: {{lc:{{{price|free}}}}}
   }}|
+
      | free = 0
 +
      | gratuit = 0
 +
      | gratis = 0
 +
      | libre = 0
 +
      | {{{price}}}
 +
      }}
 +
    | Has url={{#if: {{{url|}}}  
 +
      | {{{url}}}
 +
      | {{fullurl:{{FULLPAGENAME}}}}
 +
      }}
 +
    | Has coordinates={{#var:coords}}
 +
    | Has location={{#if: {{{venue|}}}  
 +
      | {{{venue}}} {{#if: {{{address|}}}{{{city|}}} | – }}  
 +
      }} {{#if: {{{address|}}}
 +
      | {{{address}}}{{#if: {{{city|}}} | , }}
 +
      }} {{{city|}}}
 +
    | Has event type=External
 +
    | Has default form=External event
 +
    | Has page={{FULLPAGENAME}}
 +
    }}|
 +
   }}
 
}} {{#if: {{{nocat|}}}  
 
}} {{#if: {{{nocat|}}}  
 
| <!-- no categories -->
 
| <!-- no categories -->
| [[Category:Event]] [[Category:External Event]]  
+
| [[Category:Event]] [[Category:External Event]] {{#default_form:External event}}
 
}}</includeonly><noinclude>{{ExternalEventSidebar
 
}}</includeonly><noinclude>{{ExternalEventSidebar
 
|title = An awesome event
 
|title = An awesome event
 +
|image = Logo-heart 135px.png
 
|workgroup = An awesome crew
 
|workgroup = An awesome crew
 +
|topics = Some good topic
 
|date = 14 nov 2016
 
|date = 14 nov 2016
 
|time = 12am
 
|time = 12am
 +
|endtime = 2am
 
|venue = Flying Dutchman
 
|venue = Flying Dutchman
 
|linkvenue = http://www.the-flying-dutchman.nl/
 
|linkvenue = http://www.the-flying-dutchman.nl/
Line 105: Line 174:
 
{{ExternalEventSidebar
 
{{ExternalEventSidebar
 
|title = An awesome event
 
|title = An awesome event
 +
|image = Logo-heart 135px.png
 
|workgroup = An awesome crew
 
|workgroup = An awesome crew
 +
|topics = Some good topic
 
|date = 14 nov 2016
 
|date = 14 nov 2016
 
|time = 12am
 
|time = 12am
 +
|endtime = 2am
 
|venue = Flying Dutchman
 
|venue = Flying Dutchman
 
|linkvenue = http://www.the-flying-dutchman.nl/
 
|linkvenue = http://www.the-flying-dutchman.nl/

Latest revision as of 00:53, 7 March 2019

An awesome event Toicon-icon-avocado-schedule.svg
Logo-heart 135px.png
Date Mon 14 November 2016
Time 12:00am - 2: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
|image = Logo-heart 135px.png
|workgroup = An awesome crew
|topics = Some good topic
|date = 14 nov 2016
|time = 12am
|endtime = 2am
|venue = Flying Dutchman
|linkvenue = http://www.the-flying-dutchman.nl/
|address = Treasure Island 666
|postalcode = 9000
|city = Atlantica
|url = https://pirateparty.be
|price = free
}}