Template:Event: Difference between revisions
From MoHA Wiki
No edit summary |
m (Text replacement - "Opportunity type" to "Opportunity format") |
||
(107 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 url={{{Event url|{{fullurl:{{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|}}} | ||
|Presented by={{{Presented by|}}}|+sep= | |Event short description={{{Event short description|}}} | ||
|Sponsored by={{{Sponsored by|}}}|+sep= | |Presented by={{{Presented by|}}}|+sep=; | ||
|Funded by={{{Funded by|}}}|+sep= | |Sponsored by={{{Sponsored by|}}}|+sep=; | ||
|Fundraiser for={{{Fundraiser for|}}}|+sep= | |Funded by={{{Funded by|}}}|+sep=; | ||
|Associated Program={{{Associated Program|}}}|+sep= | |Fundraiser for={{{Fundraiser for|}}}|+sep=; | ||
|Event artist={{{Event artist|}}}|+sep= | |Associated Program={{{Associated Program|}}}|+sep=; | ||
|Event | |Event artist={{{Event artist|}}}|+sep=; | ||
|Event | |Event location={{{Event location|}}}|+sep=; | ||
| | |Event format={{{Event format|}}}|+sep=; | ||
|Event | |Event medium={{{Event medium|}}}|+sep=; | ||
|Is public={{{Is public|}}} | |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|}}} | |||
|Event image={{#if:{{{Event image|}}}|File:{{PAGENAME:{{{Event image|}}}}}}} | |Event image={{#if:{{{Event image|}}}|File:{{PAGENAME:{{{Event image|}}}}}}} | ||
|Event image caption={{{Event image caption|}}} | |Event image caption={{{Event image caption|}}} | ||
|Airtable Record ID={{{Airtable Record ID|}}} | |||
|Airtable Last Modified={{{Airtable Last Modified|}}} | |||
}} | }} | ||
</div> | </div> | ||
<div id="moha-infobox" class="col-12 col-md-5 col-lg-4 col-xl-3 mb-4 ml-0 ml-md-3 ml-lg-4"> | <div id="moha-infobox" class="col-12 col-md-5 col-lg-4 col-xl-3 mb-4 ml-0 ml-md-3 ml-lg-4"> | ||
<div class="moha-infobox-section"> | <div class="moha-infobox-section"> | ||
<div class="moha-infobox-section-header"> | <div class="moha-infobox-section-header"></div> | ||
<div class="moha-infobox-section-body"> | <div class="moha-infobox-section-body"> | ||
{{#if:{{{Event image|}}} | {{#if:{{{Event image|}}} | ||
Line 39: | Line 54: | ||
<div class="moha-infobox-section-body"> | <div class="moha-infobox-section-body"> | ||
<table> | <table> | ||
{{#ifeq: {{#time: Ymd|{{{Date Start|}}}}}|{{#time: Ymd|{{{Date End|}}}}}| | |||
<tr> | |||
<td>Date</td> | |||
<td>{{#time: m.d.y|{{{Date Start|}}}}}</td> | |||
</tr> | |||
| | |||
{{#if: {{{Date Start|}}}| | {{#if: {{{Date Start|}}}| | ||
<tr> | <tr> | ||
<td>Date {{#if: {{{Date End|}}}|start}}</td> | <td>Date {{#if: {{{Date End|}}}|start}}</td> | ||
<td>{{#time: d | <td>{{#time: m.d.y|{{{Date Start|}}}}}</td> | ||
</tr> | </tr> | ||
}}<!-- | }}<!-- | ||
Line 49: | Line 70: | ||
<tr> | <tr> | ||
<td>Date end</td> | <td>Date end</td> | ||
<td>{{#time: d | <td>{{#time: m.d.y|{{{Date End|}}}}}</td> | ||
</tr> | </tr> | ||
}} | |||
}}<!-- | }}<!-- | ||
-->{{# | -->{{#if: {{{Doors|}}}| | ||
<tr> | <tr> | ||
<td> | <td>Doors</td> | ||
<td>{{{ | <td>{{#time: g:ia|{{{Doors|}}}}}</td> | ||
</tr> | </tr> | ||
}}<!-- | }}<!-- | ||
--><tr> | -->{{#if: {{{Date Start|}}}{{{Date End|}}} | ||
<td> | |{{#ifeq: {{#time: Ymd|{{{Date Start|}}}}}|{{#time: Ymd|{{{Date End|}}}}} | ||
<td>{{#arraymap:{{{ | |{{#ifeq: {{#time: Hi|{{{Date Start|}}}}}|{{#time: Hi|{{{Date End|}}}}}||<tr> | ||
<td>Time</td> | |||
<td>{{Event dates | |||
|Date Start={{{Date Start|}}} | |||
|link text=@ | |Date End={{{Date End|}}} | ||
|Event types[Event | }}</td> | ||
</tr> | |||
}} | |||
|{{#if: {{{Date Start|}}} | |||
|<tr> | |||
<td>Start Time</td> | |||
<td>{{#time: g{{#ifexpr: 0{{#time:i|{{{Date Start|}}}}} = 0 ||:i}}a|{{{Date Start|}}}}}</td> | |||
</tr> | |||
}}<!---->{{#if: {{{DateEnd|}}} | |||
|<tr> | |||
<td>End Time</td> | |||
<td>{{#time: g{{#ifexpr: 0{{#time:i|{{{Date Start|}}}}} = 0 ||:i}}a|{{{Date End|}}}}}</td> | |||
</tr> | |||
}} | |||
}} | |||
}}<!-- | |||
-->{{#if: {{{Open hours|}}}|<tr> | |||
<td>Schedule</td> | |||
<td><ul> | |||
{{{Open hours|}}} | |||
</ul></td> | |||
</tr> | |||
}}<!-- | |||
-->{{#if: {{{Event format|}}}|<tr> | |||
<td>Format</td> | |||
<td><ul>{{#arraymap: {{{Event format|}}} | |||
|; | |||
|@@@ | |||
|<li>{{#queryformlink: form=Event types | |||
|link text=@@@ | |||
|Event types[Event format]=@@@ | |||
|Event types[param]=Event format | |||
|Event types[value]=@@@ | |||
|_run=1 | |||
}}</li> | |||
| | |||
}}</ul> | |||
</td> | |||
</tr>}}<!-- | |||
-->{{#if: {{{Event medium|}}}|<tr> | |||
<td>Medium</td> | |||
<td><ul>{{#arraymap: {{{Event medium|}}} | |||
|; | |||
|@@@ | |||
|<li>{{#queryformlink: form=Event types | |||
|link text=@@@ | |||
|Event types[Event medium]=@@@ | |||
|Event types[param]=Event medium | |||
|Event types[value]=@@@ | |||
|_run=1 | |_run=1 | ||
}} | }}</li> | ||
| | |||
}}</ul></td> | |||
</tr><!-- | </tr>}}<!-- | ||
-->{{#switch: {{{Event location|}}} | -->{{#switch: {{{Event location|}}} | ||
Line 79: | Line 152: | ||
|#default = <tr> | |#default = <tr> | ||
<td>Location</td> | <td>Location</td> | ||
<td>{{{Event location|}}}</td> | <td><ul>{{#arraymap: {{{Event location|}}} | ||
|; | |||
|@@@ | |||
|<li>{{#queryformlink: form=Event types | |||
|link text=@@@ | |||
|Event types[Event location]=@@@ | |||
|Event types[param]=Event location | |||
|Event types[value]=@@@ | |||
|_run=1 | |||
}}</li> | |||
| | |||
}}</ul></td> | |||
</tr> | </tr> | ||
}}<!-- | }}<!-- | ||
-->{{# | -->{{#switch: {{{Is public|}}} | ||
|Yes | |Yes | ||
|{{# | |1=<tr> | ||
< | <td>Admission</td> | ||
<td> | <td>{{#switch: {{{Event admission type|}}} | ||
<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|}}}–{{{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 102: | Line 200: | ||
{{#arraymap: | {{#arraymap: | ||
Event artist | Event artist | ||
Presented by | Presented by | ||
Sponsored by | Sponsored by | ||
Line 113: | Line 210: | ||
<td>@@@</td> | <td>@@@</td> | ||
<td><ul>{{#arraymap: {{{@@@|}}} | <td><ul>{{#arraymap: {{{@@@|}}} | ||
| | |; | ||
|$$$ | |$$$ | ||
|<li>{{#queryformlink: form=Event types | |<li>{{#queryformlink: form=Event types | ||
|link text= | |link text=$$$ | ||
|Event types[@@@]=$$$ | |Event types[@@@]=$$$ | ||
|Event types[param]=@@@ | |||
|Event types[value]=$$$ | |||
|_run=1 | |_run=1 | ||
}}</li> | }}</li> | ||
Line 131: | Line 230: | ||
<td>Associated Program</td> | <td>Associated Program</td> | ||
<td>{{#arraymap: {{{Associated Program|}}} | <td>{{#arraymap: {{{Associated Program|}}} | ||
| | |; | ||
|@@@ | |@@@ | ||
|[ | |{{#formredlink: form=Program | ||
|link text=@@@ | |||
|existing page link text=@@@ | |||
|target=@@@ | |||
|Program[Associated Program]=@@@ | |||
}} | |||
| ·  | | ·  | ||
}}</td> | }}</td> | ||
Line 143: | 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"> | <div class="moha-infobox-section-header" style="text-align:center">Links · Resources</div> | ||
<div class="moha-infobox-section-body"> | <div class="moha-infobox-section-body"> | ||
<table> | <table> | ||
{{{Resources|}}} | <tr> | ||
<td>Resources</td> | |||
<td>{{{Resources|}}}</td> | |||
</tr> | |||
</table> | </table> | ||
</div> | </div> | ||
</div> | </div> | ||
}}{{#if: {{CURRENTLOGGEDUSER}}| | |||
<table class="w-100"> | |||
<tr class="editor-tools"> | |||
<th class="py-2 px-3">{{#formlink: form=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]={{#ask:[[{{FULLPAGENAME}}]]|link=none}} | |||
}} | |||
<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> | |||
</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> | ||
{{{Event description|}}} | {{{Event description|}}} | ||
<div class="moha-bottom-table"> | |||
<!-- | |||
### Opportunities | |||
-->{{#ask: | |||
[[Category:Opportunities]] | |||
[[Associated Event::{{#ask: [[{{PAGENAME}}]]|link=none}}]] | |||
|mainlabel=Opportunity | |||
|?Opportunity format=Opportunity format | |||
|?Opportunity short description=Description | |||
|?Opportunity start date=Start | |||
|?Opportunity end date=End | |||
|?Opportunity link=Link | |||
|named args=yes | |||
|format=plainlist | |||
|template=Opportunity list row 2 | |||
|link=none | |||
|intro=<table cellspacing="3" class="with-header border-bottom-0"><tr><td>'''Opportunities'''</td></tr></table> | |||
<table cellspacing="3" class="sortable mb-3 border-top-0"> | |||
<tr> | |||
<th>Opportunity</th> | |||
<th>Type</th> | |||
<th>Description</th> | |||
<th>Start</th> | |||
<th>End</th> | |||
<th>Link</th> | |||
</tr> | |||
|outro=</table> | |||
|headers=plain | |||
|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> | |||
{{DISPLAYTITLE: {{{Event display name|}}}}} | {{DISPLAYTITLE: {{{Event display name|}}}}} | ||
[[Category:Events]] | {{#if: {{{Associated Program|}}} | ||
|{{Styled event of|{{#explode:{{{Associated Program|}}}|,|0}}}} | |||
|[[Category:Events]] | |||
}} | |||
{{#ifexpr: 0{{#time: Ymd|{{{Date Start|}}}}}<={{#time: Ymd|now}} and 0{{#time: Ymd|{{{Date End|}}}}}>={{#time: Ymd|now}} | |||
| [[Category:Current Events]] | |||
| {{#ifexpr: {{#time: Ymd|{{{Date Start|}}}}}>{{#time: Ymd|now}} | |||
| [[Category:Upcoming Events]] | |||
}} {{#ifexpr: {{#time: Ymd235959|{{{Date End|}}}}}<{{#time: Ymd000000|now}} | |||
| [[Category:Past Events]] | |||
}} | |||
}} | |||
</includeonly> | </includeonly> |