Difference between revisions of "Template:Events"

From Earth Science Information Partners (ESIP)
(Created page with "<includeonly><div class="d-none" hidden> {{DISPLAYTITLE: {{{Event title|}}}}} {{DEFAULTSORTKEY: {{{Event title|}}}}} Category:Events [[News feed::{{{News feed|}}}]] </div>")
 
 
(20 intermediate revisions by the same user not shown)
Line 4: Line 4:
  
 
[[Category:Events]]
 
[[Category:Events]]
[[News feed::{{{News feed|}}}]]
+
 
+
{{#vardefine: committee
 +
  |{{#show: {{#titleparts: {{FULLPAGENAME}}|1|0}} |?Committee }}
 +
}}
 +
 
 +
{{#vardefine: coordinates
 +
  |{{#if: {{{Event coordinates|}}}
 +
    |{{{Event coordinates|}}}
 +
    |{{#ifeq: {{#sub:{{#geocode: {{{Event location|}}}}}|0|3}}
 +
        |Geo
 +
        |
 +
        |{{#geocode: {{{Event location|}}} }}
 +
      }}
 +
  }}
 +
}}
 +
 
 +
{{#vardefine: duration_label
 +
  |{{#ifeq:{{{Start date|}}}
 +
    |{{{End date|}}}
 +
    |{{#time: Y-m-d|{{{Start date|}}} }} {{{Start hour|}}}:{{{Start minute|}}}-{{{End hour|}}}:{{{End minute|}}}
 +
    |{{#time: Y-m-d|{{{Start date|}}} }} {{{Start hour|}}}:{{{Start minute|}}} - {{#time: Y-m-d|{{{End date|}}} }} {{{End hour|}}}:{{{End minute|}}}
 +
  }}
 +
}}
 +
 
 +
{{#set:
 +
|Start date={{{Start date|}}} {{{Start hour|}}}:{{{Start minute|}}}
 +
|End date={{{End date|}}} {{{End hour|}}}:{{{End minute|}}}
 +
|Portal={{{Portal|}}}
 +
|Committee={{#var: committee}}
 +
|Event tag={{{Event tag|}}}|+sep=;
 +
|Event location={{{Event location|}}}
 +
|Event coordinates={{#var: coordinates}}
 +
|Event participant={{{Event participant|}}}|+sep=;
 +
|Event duration label={{#var: duration_label}}
 +
}}
 +
</div>
 +
<div class="row">
 +
<div class="col-12 col-md-7"><!--
 +
 
 +
####### NEWS FEED #######
 +
 
 +
--><div class="d-block d-md-flex">
 +
<div class="text-muted d-block d-md-flex" style="width:100px">Committee:</div>'''{{#var: committee}}'''
 +
</div> <!--
 +
 
 +
###### NEWS TAG ######
 +
 
 +
-->{{#if: {{{Event tag|}}}
 +
    |<div class="d-block d-md-flex">
 +
<div class="text-muted d-block d-md-flex" style="width:100px">Tags:</div>{{#arraymap: {{{Event tag|}}}
 +
        |;
 +
        |@@@
 +
        |<span class="text-nowrap"><i class="fa fa-hashtag small"></i> '''@@@'''</span>
 +
        |&#32;
 +
      }}</div>
 +
  }} <!--
 +
 
 +
####### DURATION #######
 +
 
 +
--><div class="d-block d-md-flex">
 +
<div class="text-muted d-block d-md-flex" style="width:100px">Duration:</div>{{#ifeq:{{{Start date|}}}
 +
  |{{{End date|}}}
 +
  |{{#time: M j, Y|{{{Start date|}}} }} <span class="text-muted d-inline-block ml-2">{{{Start hour|}}}:{{{Start minute|}}}-{{{End hour|}}}:{{{End minute|}}}</span>
 +
  |{{#time: M j, Y|{{{Start date|}}} }} <span class="text-muted d-inline-block ml-2">{{{Start hour|}}}:{{{Start minute|}}}</span> - {{#time: M j, Y|{{{End date|}}} }} <span class="text-muted">{{{End hour|}}}:{{{End minute|}}}</span>
 +
}}
 +
</div> <!--
 +
 
 +
####### LOCATION #######
 +
 
 +
-->{{#if: {{{Event location|}}}
 +
    |<div class="d-block d-md-flex">
 +
<div class="text-muted d-flex d-md-block" style="width:100px">Location:</div>'''{{{Event location|}}}'''
 +
</div>
 +
}} <!--
 +
 
 +
####### PARTICIPANTS #######
 +
 
 +
-->{{#if: {{{Event participant|}}}
 +
    |<div class="d-block d-md-flex">
 +
<div class="text-muted d-flex d-md-block" style="width:100px">Participants:</div>{{#arraymap: {{{Event participant|}}}
 +
  |;
 +
  |@@@
 +
  |'''@@@'''
 +
  |,&#32;
 +
}}
 +
</div>
 +
}}
 +
</div>
 +
<div class="col-12 col-md-5"><!--
 +
 
 +
####### MAP ######
 +
 
 +
-->{{#if: {{#var: coordinates}}
 +
    |
 +
<div class="card d-block mt-3 mt-md-0 shadow-sm">
 +
  <div class="card-img-top">{{#display_map: {{#var: coordinates}}|height=130}}</div>
 +
</div>
 +
}}
 +
</div>
 +
</div><!--
 +
 
 +
####### EVENT DESCRIPTION #######
 +
 
 +
--><div class="my-3">
 +
{{{Event description|}}}
 +
</div><!--
 +
 
 +
####### ATTACHMENTS #######
 +
 
 +
-->
 +
<div class="card-columns news-metadata">
 +
{{{Event attachments|}}}
 
</div>
 
</div>

Latest revision as of 17:17, July 20, 2020