Template:ExternalEventSidebar: Difference between revisions

From Pirate Party Belgium
Jump to navigation Jump to search
No edit summary
(subobject)
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" | {{#if: {{{title|}}}
! style="text-align: center; background-color: #692D89; color:white;padding:0.3em; font-size:medium;" colspan="2" | {{#if: {{{title|}}}
   | [[Has title::{{{title}}}]]
   | {{{title}}}
   | ?
   | ?
   }}
   }}
Line 7: Line 7:
{{#if: {{{workgroup|}}} |
{{#if: {{{workgroup|}}} |
! style="vertical-align: top;" {{!}} {{int:sidebar-workgroup}}
! style="vertical-align: top;" {{!}} {{int:sidebar-workgroup}}
{{!}} [[Organized by::{{{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|}}} | {{#arraymap:{{{date}}}|,|x|{{#time:D j F Y|x|{{int:language-code}} }}|<br />}} | ? }}  
|-
|-
! 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 31: Line 31:
! style="vertical-align: top;" | {{int:sidebar-price}}
! style="vertical-align: top;" | {{int:sidebar-price}}
| {{#switch: {{lc:{{{price|free}}}}}
| {{#switch: {{lc:{{{price|free}}}}}
   | free = [[Has price::0|{{int:sidebar-price-free}}]]
   | free = {{int:sidebar-price-free}}
   | gratuit = [[Has price::0|{{int:sidebar-price-free}}]]
   | gratuit = {{int:sidebar-price-free}}
   | gratis = [[Has price::0|{{int:sidebar-price-free}}]]
   | gratis = {{int:sidebar-price-free}}
   | 0 = [[Has price::0|{{int:sidebar-price-free}}]]
   | 0 = {{int:sidebar-price-free}}
   | [[Has price::{{{price}}}]]
   | {{{price}}}
   }}
   }}
|-
|-
{{#if: {{{url|}}}
{{#if: {{{url|}}}
| ! style="vertical-align: top;" {{!}} {{int:sidebar-url}}
| ! style="vertical-align: top;" {{!}} {{int:sidebar-url}}
{{!}} [[Has url::{{{url}}}]]
{{!}} {{{url}}}
{{!}}-  
{{!}}- }}
| [[Has url::{{fullurl:{{FULLPAGENAME}}}}| ]] }}
{{#if: {{{city|}}}  
{{#if: {{{city|}}}  
| {{#vardefine: coords  
| {{#vardefine: coords  
Line 51: Line 50:
     }}  
     }}  
   }}{{#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 62: Line 61:
{{!}}- }}
{{!}}- }}
| 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}} }}
|} {{#if: {{{nocat|}}}  
|}{{#arraymap:{{{date|}}}|,|{date}|{{#subobject:External
    | Has title={{{title|}}}
    | {{#arraymap:{{{workgroup|}}}|,|x|Organized by=x|{{!}} }}
    | 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 price={{#switch: {{lc:{{{price|free}}}}}
      | free = 0
      | gratuit = 0
      | gratis = 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|}}}
    }}
  }}
}} {{#if: {{{nocat|}}}  
| <!-- no categories -->
| <!-- no categories -->
| [[Category:Event]] [[Category:External Event]]  
| [[Category:Event]] [[Category:External Event]]  
}} {{#set: Has location={{#if: {{{venue|}}}
  | {{{venue}}} {{#if: {{{address|}}}{{{city|}}} | – }}
  }} {{#if: {{{address|}}}
  | {{{address}}}{{#if: {{{city|}}} | , }}
  }} {{{city|}}}
}} [[Has default form::External event| ]] [[Has event type::External| ]]</includeonly><noinclude>{{ExternalEventSidebar
}} [[Has default form::External event| ]] [[Has event type::External| ]]</includeonly><noinclude>{{ExternalEventSidebar
|title = An awesome event
|title = An awesome event

Revision as of 22:07, 7 March 2017

An awesome event
Workgroup An awesome crew
Date Mon 14 November 2016
Time 12:00am
Venue Flying Dutchman
Address
Treasure Island 666
9000 Atlantica
City
Price Free
Website https://pirateparty.be
Loading map...
Export Template:Event ics
Clone this event

}}

Usage

{{ExternalEventSidebar
|title = An awesome event
|workgroup = An awesome crew
|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
}}