Template:CalendarEvent: Difference between revisions

From Pirate Party Belgium
Jump to navigation Jump to search
(space between address and tags)
mNo edit summary
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div style="overflow:hidden;">{{CalendarDate|{{{?Has date}}}|{{{?Has time|}}}}}
<includeonly><div class="pirate-event {{#if: {{{type|}}} | {{lc:{{{type}}}}}-event }}">{{CalendarDate|{{{date}}}|{{{time|}}}}}
<div style="margin:0 .75em 6.5px 0; padding: 0 .6em;">
<div class="details">
   <div style="font-weight:bold;">{{NamedLink|{{{?Has page}}}|{{{?Has title|}}}}}</div>
   <div class="title">{{#if: {{{type|}}}
  <div style="font-size:small;">{{{?Has location|}}}</div>{{#if: {{{?Organized by|}}}{{{?In topic|}}}
| [[File:{{#switch: {{{type|}}}
| <br /><div style="font-size:small;>Tags: {{#arraymap:{{{?Organized by|}}},{{{?In topic|}}}|,|x|[[x|{{ShowTitle|x}}]]}}</div>  
  | Meeting = Toicon-icon-avocado-discuss.svg
  | PirateDrink = Toicon-icon-avocado-cheer.svg
  | External = Toicon-icon-avocado-schedule.svg
  }}|link=Category:{{#switch: {{{type}}}
  | External = External Event
  | {{{type}}}
  }}|class=icon]]
}}<span>{{NamedLink|{{{page}}}|{{{title|}}}}}</span></div>{{#if: {{{location|}}}
| <div class="location">[[File:Toicon-icon-avocado-locate.svg|link=|Location|class=icon]]<span>{{{location}}}</span></div>
}}{{#vardefine:tags
| {{#arraymap:{{{workgroup|}}},{{{topics|}}}|,|x|{{#ifeq:x|{{BASEPAGENAME}}||[[x|{{ShowTitle|x}}]]}}}}
}}{{#if: {{#var:tags|}}
| <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 -->
| date =  <!-- mandatory, format = yyyy/mm/dd -->
| ?Has time =
| time = <!-- optional, format = hh:mm -->
| ?Organized by =
| workgroup =
| ?Has location =
| topics =
| ?In topic =  
| location =  
| 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
| ?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 =
}}
 
=== PirateDrink ===
 
{{#ask: [[Has event type::PirateDrink]] [[Organized by::Crew BW]]
| ?Has page=page
| ?Has date=date
| ?Has time=time
| ?Has title=title
| ?Has location=location
| ?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
| ?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>

Latest revision as of 12:50, 5 March 2019

Usage

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

Example

External event

LocationAssociation des Habitants de Louvain-la-Neuve – 3, scavée du Biéreau, Louvain-la-Neuve

PirateDrink

LocationBlack Friars – rue René Magritte 7, Louvain-la-Neuve

Meeting

LocationBlackfriars – rue René Magritte 7, Louvain-la-Neuve