Template:Event: Difference between revisions

From MoHA Wiki
No edit summary
m (Text replacement - "Opportunity type" to "Opportunity format")
 
(77 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
<div class="d-none" hidden>
<div class="d-none" hidden>
{{#arraydefine: years
  |{{#time: Y|{{{Date Start|}}}}};{{#time: Y|{{{Date End|}}}}}
  |;
  |unique
}}
{{#set:
{{#set:
|Event name={{FULLPAGENAME}}
|Event name={{FULLPAGENAME}}
|Event url={{FULLPAGENAME}}
|Event url={{{Event url|{{fullurl:{{FULLPAGENAME}}}}}}}
|Event wiki link={{FULLPAGENAME}}
|Event wiki link={{FULLPAGENAME}}
|Date Start={{{Date Start|}}}
|Date Start={{{Date Start|}}}
|Date End={{{Date End|}}}
|Date End={{{Date End|}}}
|Year number={{#arrayprint: years|;}}|+sep=;
|Doors={{{Doors|}}}
|Event description={{{Event description|}}}
|Event description={{{Event description|}}}
|Event short description={{{Event short description|}}}
|Event short description={{{Event short description|}}}
Line 18: Line 25:
|Event format={{{Event format|}}}|+sep=;
|Event format={{{Event format|}}}|+sep=;
|Event medium={{{Event medium|}}}|+sep=;
|Event medium={{{Event medium|}}}|+sep=;
|Event ticket price={{{Event ticket price|}}}
|Event admission type={{{Event admission type|}}}
|Event admission price={{{Event admission price|0}}} USD
|Event admission price sliding low={{#ifeq: {{{Event admission type|}}}|Sliding Scale|{{{Event admission price sliding low|0}}} USD}}
|Event admission price sliding high={{#ifeq: {{{Event admission type|}}}|Sliding Scale|{{{Event admission price sliding high|0}}} USD}}
|Is public={{{Is public|}}}
|Is public={{{Is public|}}}
|Event image={{#if:{{{Event image|}}}|File:{{PAGENAME:{{{Event image|}}}}}}}
|Event image={{#if:{{{Event image|}}}|File:{{PAGENAME:{{{Event image|}}}}}}}
Line 44: Line 54:
<div class="moha-infobox-section-body">
<div class="moha-infobox-section-body">
<table>
<table>
{{#ifeq: {{{Date Start|}}}|{{{Date End|}}}|
{{#ifeq: {{#time: Ymd|{{{Date Start|}}}}}|{{#time: Ymd|{{{Date End|}}}}}|
<tr>
<tr>
<td>Date</td>
<td>Date</td>
Line 64: Line 74:
}}
}}
}}<!--
}}<!--
-->{{#if: {{{Doors|}}}|
<tr>
<td>Doors</td>
<td>{{#time: g:ia|{{{Doors|}}}}}</td>
</tr>
}}<!--
-->{{#if: {{{Date Start|}}}{{{Date End|}}}
    |{{#ifeq: {{#time: Ymd|{{{Date Start|}}}}}|{{#time: Ymd|{{{Date End|}}}}}
        |{{#ifeq: {{#time: Hi|{{{Date Start|}}}}}|{{#time: Hi|{{{Date End|}}}}}||<tr>
<td>Time</td>
<td>{{Event dates
      |Date Start={{{Date Start|}}}
      |Date End={{{Date End|}}}
    }}</td>
</tr>
}}
        |{{#if: {{{Date Start|}}}
          |<tr>
<td>Start Time</td>
<td>{{#time: g{{#ifexpr: 0{{#time:i|{{{Date Start|}}}}} = 0 ||&#58;i}}a|{{{Date Start|}}}}}</td>
</tr>
}}<!---->{{#if: {{{DateEnd|}}}
          |<tr>
<td>End Time</td>
<td>{{#time: g{{#ifexpr: 0{{#time:i|{{{Date Start|}}}}} = 0 ||&#58;i}}a|{{{Date End|}}}}}</td>
</tr>
}}
      }}
  }}<!--
-->{{#if: {{{Open hours|}}}|<tr>
<td>Schedule</td>
<td><ul>
{{{Open hours|}}}
</ul></td>
</tr>
  }}<!--


-->{{#if: {{{Event format|}}}|<tr>
-->{{#if: {{{Event format|}}}|<tr>
Line 118: Line 167:
}}<!--
}}<!--


-->{{#ifeq: {{{Is public|}}}
-->{{#switch: {{{Is public|}}}
   |Yes
   |Yes
   |{{#if: {{{Event ticket price|}}}|
   |1=<tr>
<tr>
<td>Admission</td>
<td>Ticket price</td>
<td>{{#switch: {{{Event admission type|}}}
<td>{{#ifeq: {{{Event ticket price|}}}|0 USD|Free|${{#replace:{{{Event ticket price|}}}|USD|<nowiki> </nowiki>}}}}</td>
      |Set Price={{#ifeq: {{{Event admission price|0}}}|0|Free|${{{Event admission price|}}}}}
      |Suggested Donation={{#ifeq: {{{Event admission price|0}}}|0|Donation|{{{Event admission type|}}} ${{{Event admission price|}}}}}
      |Sliding Scale=${{{Event admission price sliding low|}}}&ndash;{{{Event admission price sliding high|}}}<br/>{{{Event admission type|}}}
      |#default=Free
    }}</td>
</tr><!--
 
--><tr>
<td colspan=2>{{#if: {{#ask:[[-Has subobject::<q>[[{{FULLPAGENAME}}]][[Category:Current Events||Upcoming Events]]</q>]][[Event link::+]] }}
    |<span class="moha-button mb-0 cta">[{{#ask:[[-Has subobject::<q>[[{{FULLPAGENAME}}]][[Category:Current Events||Upcoming Events]]</q>]][[Event link::+]]|?Event link|mainlabel=-|headers=hide|link=none|limit=1|searchlabel=}} {{#switch: {{{Event admission type|}}}
      |Suggested Donation=RSVP
      |Sliding Scale
      |Set Price=Tickets
      |Free=Attend
      }}]</span>
  }}</td>
</tr>
</tr>
  }}
}}
}}
</table>
</table>
Line 169: Line 232:
  |;
  |;
  |@@@
  |@@@
  |[[@@@]]
  |{{#formredlink: form=Program
    |link text=@@@
    |existing page link text=@@@
    |target=@@@
    |Program[Associated Program]=@@@
  }}
  |&#32;&middot;&#32;
  |&#32;&middot;&#32;
}}</td>
}}</td>
Line 179: Line 247:
{{#if: {{{Resources|}}}|
{{#if: {{{Resources|}}}|
<div class="moha-infobox-section">
<div class="moha-infobox-section">
<div class="moha-infobox-section-header" style="text-align:center">Follow &middot; Contact</div>
<div class="moha-infobox-section-header" style="text-align:center">Links &middot; Resources</div>
<div class="moha-infobox-section-body">
<div class="moha-infobox-section-body">
<table>
<table>
<tr>
<tr>
<td>Resources</td>
<td>Resources</td>
{{{Resources|}}}
<td>{{{Resources|}}}</td>
</tr>
</tr>
</table>
</table>
</div>
</div>
</div>
</div>
}}
}}{{#if: {{CURRENTLOGGEDUSER}}|
<table class="w-100">
<table class="w-100">
<tr>
<tr class="editor-tools">
<th class="py-2 px-3">{{#formlink: form=Opportunity
<th class="py-2 px-3">{{#formlink: form=Opportunity
       |link text=+ Add opportunity
       |link text=<span type="button" class="mw-ui-button mw-ui-quiet"><i class="fas fa-pen-alt mr-1"></i> Add opportunity</span>
       |Opportunity[Associated Event]={{FULLPAGENAME}}
       |Opportunity[Associated Event]={{#ask:[[{{FULLPAGENAME}}]]|link=none}}
     }}</th>
     }}  
<div class="d-flex flex-column flex-md-row gap-3 mb-3">
<div class="data-button">
<div class="dropdown notspecial">
  <div type="button" class="dropdown-toggle mw-ui-button mw-ui-quiet" data-toggle="dropdown"><i class="fas fa-pen-alt mr-1"></i> Cross-event opportunities</div>
  <div class="dropdown-menu">
{{#arraymap: {{#ask: [[Category:Cross-event opportunities]]
  |link=none
  |sep=;
}}|;
  |@@@
  |<span class="dropdown-item">{{#autoedit: form=Opportunity
    |link text=@@@
    |Opportunity[Associated Event]+={{#ask:[[{{FULLPAGENAME}}]]|link=none}}
    |target=@@@
    |reload
  }}</span>
  |\s
}}
</div>
</div>
</div></th>
</tr>
</tr>
</table>
</table>
}}
{{#if: {{#ask:
  [[Press:+]]
  [[Category:Press]]
  [[Event name::{{FULLPAGENAME}}]]
  |limit=1
  |searchlabel=
  |default=
}}
  |<div class="moha-infobox-section">
    <div class="moha-infobox-section-header" style="text-align:center">Press</div>
    <div class="moha-infobox-section-body">{{#ask:
  [[Press:+]]
  [[Category:Press]]
  [[Event name::{{FULLPAGENAME}}]]
  |?Press Publication
  |?Press Date
  |?Press Type
  |?Press URL
  |?Press Headline
  |?Press Author
  |?Press Description
  |sort=Press Date
  |order=desc
  |mainlabel=Press
  |format=plainlist
  |link=none
  |named args=yes
  |template=Event press
  |intro=<table>
  |outro=</table>
}}
    </div>
  </div>
}}
</div>
</div>
</div>
</div>
Line 208: Line 332:
-->{{#ask:
-->{{#ask:
   [[Category:Opportunities]]
   [[Category:Opportunities]]
   [[Associated Event::{{PAGENAME}}]]
   [[Associated Event::{{#ask: [[{{PAGENAME}}]]|link=none}}]]
   |mainlabel=Opportunity
   |mainlabel=Opportunity
   |?Opportunity type=Opportunity type
   |?Opportunity format=Opportunity format
   |?Date Start=Start
   |?Opportunity short description=Description
   |?Date End=End
  |?Opportunity start date=Start
   |?Opportunity end date=End
   |?Opportunity link=Link
   |?Opportunity link=Link
   |named args=yes
   |named args=yes
  |sort=Date Start
  |order=desc
   |format=plainlist
   |format=plainlist
   |template=Opportunity list row
   |template=Opportunity list row 2
   |link=none
   |link=none
   |intro=<table cellspacing="3" class="with-header border-bottom-0"><tr><td>'''Opportunities'''</td></tr></table>
   |intro=<table cellspacing="3" class="with-header border-bottom-0"><tr><td>'''Opportunities'''</td></tr></table>
Line 225: Line 348:
   <th>Opportunity</th>
   <th>Opportunity</th>
   <th>Type</th>
   <th>Type</th>
  <th>Description</th>
   <th>Start</th>
   <th>Start</th>
   <th>End</th>
   <th>End</th>
Line 232: Line 356:
   |headers=plain
   |headers=plain
   |limit=500
   |limit=500
}}<!--
### Articles
-->{{#if: {{#ask: [[Category:Published articles]][[Associated Event::{{PAGENAME}}]]}}
    |<table cellspacing="3" class="with-header border-bottom-0 mt-3"><tr><td>'''Articles'''</td></tr></table>
  }}
{{#ask: [[Category:Published articles]][[Associated Event::{{PAGENAME}}]]
  |format=table
  |limit=100
  |searchlabel=
  |class=mt-0 w-100 smwtable sortable
  |headers=plain
  |mainlabel=-
  |?Date Published#-F[m.d.y]=Date
  |?=Title
  |?Article author=Author(s)
  |?Additional category=Category
}}
}}
</div>
</div>
Line 243: Line 385:
| {{#ifexpr: {{#time: Ymd|{{{Date Start|}}}}}>{{#time: Ymd|now}}
| {{#ifexpr: {{#time: Ymd|{{{Date Start|}}}}}>{{#time: Ymd|now}}
| [[Category:Upcoming Events]]
| [[Category:Upcoming Events]]
}} {{#ifexpr: {{#time: Ymd|{{{Date End|}}}}}<{{#time: Ymd|now}}
}} {{#ifexpr: {{#time: Ymd235959|{{{Date End|}}}}}<{{#time: Ymd000000|now}}
| [[Category:Past Events]]
| [[Category:Past Events]]
}}
}}
}}
}}
</includeonly>
</includeonly>

Latest revision as of 09:32, July 28, 2024