Template:CalendarEvent: Difference between revisions

From Pirate Party Belgium
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<includeonly><div class="pirate-event {{#if: {{{?Has event type|}}} | {{lc:{{{?Has event type}}}}}-event }}">{{CalendarDate|{{{?Has date}}}|{{{?Has time|}}}}}
<includeonly><div class="pirate-event {{#if: {{{?type|}}} | {{lc:{{{?type}}}}}-event }}">{{CalendarDate|{{{?date}}}|{{{?time|}}}}}
<div class="details">
<div class="details">
   <div class="title">{{#if: {{{?Has event type|}}}
   <div class="title">{{#if: {{{?type|}}}
| [[File:{{#switch: {{{?Has event type|}}}
| [[File:{{#switch: {{{?type|}}}
   | Meeting = Community_Noun_project_2280.svg
   | Meeting = Toicon-icon-avocado-cheer.svg
   | PirateBeer = Community Noun project 578510.svg
   | PirateBeer = Toicon-icon-avocado-chat.svg
   | External = Noun_project_-_Calendar.svg
   | External = Toicon-icon-avocado-schedule.svg
   }}|link=Category:{{#switch: {{{?Has event type}}}
   }}|link=Category:{{#switch: {{{?type}}}
   | External = External Event
   | External = External Event
   | {{{?Has event type}}}
   | {{{?type}}}
   }}|class=icon]]
   }}|class=icon]]
}}<span>{{NamedLink|{{{?Has page}}}|{{{?Has title|}}}}}</span></div>{{#if: {{{?Has location|}}}
}}<span>{{NamedLink|{{{?page}}}|{{{?title|}}}}}</span></div>{{#if: {{{?location|}}}
| <div class="location">[[File:Simpleicons Places placeholder-tool.svg|link=|Location|class=icon]]<span>{{{?Has location}}}</span></div>
| <div class="location">[[File:Toicon-icon-avocado-locate.svg|link=|Location|class=icon]]<span>{{{?location}}}</span></div>
}}{{#vardefine:tags
}}{{#vardefine:tags
| {{#arraymap:{{{?Organized by|}}},{{{?In topic|}}}|,|x|{{#ifeq:x|{{BASEPAGENAME}}||[[x|{{ShowTitle|x}}]]}}}}
| {{#arraymap:{{{?workgroup|}}},{{{?topics|}}}|,|x|{{#ifeq:x|{{BASEPAGENAME}}||[[x|{{ShowTitle|x}}]]}}}}
}}{{#if: {{#var:tags|}}
}}{{#if: {{#var:tags|}}
| <div class="tags">[[File:Tag icon.svg|link=|Tags|class=icon]]<span>{{#var:tags}}</span></div>  
| <div class="tags">[[File:Toicon-icon-avocado-tag.svg|link=|Tags|class=icon]]<span>{{#var:tags}}</span></div>  
}}
}}
</div></div></includeonly><noinclude>== Usage ==
</div></div></includeonly><noinclude>== Usage ==


  <nowiki>{{CalendarEvent
  <nowiki>{{CalendarEvent
| ?Has page = <!-- mandatory -->
| page = <!-- mandatory -->
| ?Has title =
| title =
| ?Has date =  <!-- mandatory, format = yyyy/mm/dd -->
| date =  <!-- mandatory, format = yyyy/mm/dd -->
| ?Has time = <!-- optional, format = hh:mm -->
| time = <!-- optional, format = hh:mm -->
| ?Organized by =
| workgroup =
| ?Has location =
| topics =
| ?In topic =  
| location =  
| ?Has event type =  
| type =  
}}</nowiki>
}}</nowiki>


== Example ==
== Example ==


{{#ask: [[Has event type::External]] [[Organized by::Crew BW]] [[Has date::~2017/10/01]]
=== External event ===
| ?Has page
 
| ?Has date
{{#ask: [[Has event type::External]] [[Organized by::Crew BW]]
| ?Has time
| ?Has page=page
| ?Has title
| ?Has date=date
| ?Has location
| ?Has time=time
| ?In topic
| ?Has title=title
| ?Organized by
| ?Has location=location
| ?Has event type
| ?In topic=topic
| ?Organized by=workgroup
| ?In topic=topics
| ?Has event type=type
| link = none
| template = CalendarEvent
| format = template
| mainlabel =-
| named args = yes
| limit = 1
| order = desc
| sort = Has date
| searchlabel =
}}
 
=== PirateBeer ===
 
{{#ask: [[Has event type::PirateBeer]] [[Organized by::Crew BW]]
| ?Has page=page
| ?Has date=date
| ?Has time=time
| ?Has title=title
| ?Has location=location
| ?In topic=topic
| ?Organized by=workgroup
| ?In topic=topics
| ?Has event type=type
| link = none
| template = CalendarEvent
| format = template
| mainlabel =-
| named args = yes
| limit = 1
| order = desc
| sort = Has date
| searchlabel =
}}
 
=== Meeting ===
 
{{#ask: [[Has event type::Meeting]] [[Organized by::Crew BW]]
| ?Has page=page
| ?Has date=date
| ?Has time=time
| ?Has title=title
| ?Has location=location
| ?In topic=topic
| ?Organized by=workgroup
| ?In topic=topics
| ?Has event type=type
| link = none
| link = none
| template = CalendarEvent
| template = CalendarEvent
| format = template
| format = template
| mainlabel =-
| mainlabel =-
| named args = 1
| named args = yes
| limit = 1
| order = desc
| sort = Has date
| searchlabel =
}}</noinclude>
}}</noinclude>

Revision as of 15:12, 29 October 2017

Usage

{{CalendarEvent
| page = <!-- mandatory -->
| title =
| date =  <!-- mandatory, format = yyyy/mm/dd -->
| time = <!-- optional, format = hh:mm -->
| workgroup =
| topics =
| location = 
| type = 
}}

Example

External event

<time datetime="Error: Invalid time." class="date">
Error: Invalid time.
Error: Invalid time.
Error: Invalid time.
 
[[{{{?page}}}]]

PirateBeer

Meeting

<time datetime="Error: Invalid time." class="date">
Error: Invalid time.
Error: Invalid time.
Error: Invalid time.
 
[[{{{?page}}}]]