Difference between revisions of "Template:Event"

From Wikimedia District of Columbia
Jump to navigation Jump to search
(Testing)
(Testing)
Line 1: Line 1:
 
{{#iferror:{{#switch:{{{mode}}}
 
{{#iferror:{{#switch:{{{mode}}}
 
|summary={{#ifexpr:{{is upcoming|month={{{month}}}|day={{{day}}}|year={{{year}}}}}|
 
|summary={{#ifexpr:{{is upcoming|month={{{month}}}|day={{{day}}}|year={{{year}}}}}|
<span style="float:left; padding-right:10px; padding-bottom:20px">{{date box|month={{{month}}}|day={{{day}}}}}</span>
+
<span style="float:left; padding-right:10px; {{#if:{{{cancelled|}}}{{{virtual|}}}|padding-bottom:20px;}}">{{date box|month={{{month}}}|day={{{day}}}}}</span>
 
<p>{{#ifeq:{{{cancelled|}}}|yes|'''[[Upcoming events#{{{month}}} {{{day}}}|<span style="color:#808080;"><s>'''{{{title}}}'''</s></span>]]'''<br/><span style="color:#990000; font-variant:small-caps;">[event postponed or cancelled]</span>|[[Upcoming events#{{{month}}} {{{day}}}|'''{{{title}}}''']]{{#ifeq:{{{virtual|}}}|yes|<br/><span style="color:#009900; font-variant:small-caps;">[virtual event]</span>}}}}</p><div style="clear:both;"></div>}}
 
<p>{{#ifeq:{{{cancelled|}}}|yes|'''[[Upcoming events#{{{month}}} {{{day}}}|<span style="color:#808080;"><s>'''{{{title}}}'''</s></span>]]'''<br/><span style="color:#990000; font-variant:small-caps;">[event postponed or cancelled]</span>|[[Upcoming events#{{{month}}} {{{day}}}|'''{{{title}}}''']]{{#ifeq:{{{virtual|}}}|yes|<br/><span style="color:#009900; font-variant:small-caps;">[virtual event]</span>}}}}</p><div style="clear:both;"></div>}}
 
|#default={{#ifexpr:({{#switch:{{{mode}}}|upcoming=1|#default=0}} and {{is future|month={{{month}}}|day={{{day}}}|year={{{year|}}} }}) or ({{#switch:{{{mode}}}|recent=1|#default=0}} and {{is recent|month={{{month}}}|day={{{day}}}|year={{{year|}}} }}) or {{#switch:{{{mode}}}|recent|upcoming=0|#default=1}}|
 
|#default={{#ifexpr:({{#switch:{{{mode}}}|upcoming=1|#default=0}} and {{is future|month={{{month}}}|day={{{day}}}|year={{{year|}}} }}) or ({{#switch:{{{mode}}}|recent=1|#default=0}} and {{is recent|month={{{month}}}|day={{{day}}}|year={{{year|}}} }}) or {{#switch:{{{mode}}}|recent|upcoming=0|#default=1}}|

Revision as of 21:43, 12 March 2020