Template:Tournament: Difference between revisions

>Kypho
No edit summary
Trim tournament infobox output whitespace
 
(47 intermediate revisions by 2 users not shown)
Line 10: Line 10:
|FwangoURL=URL
|FwangoURL=URL
}}
}}
</noinclude><includeonly>
<templatedata>{
{{#default_form:Tournament}}
"description":"Tournament infobox (stores to Cargo).",
<templatestyles src="Template:Infobox/styles.css" />
"params":{
<templatestyles src="Template:Tournament/styles.css" />
  "Name":{"label":"Name","type":"string","required":true,"suggested":true},
 
  "StartDate":{"label":"Start date","type":"date"},
<!-- store (normalize dates to ISO even if entered US-style) -->
  "EndDate":{"label":"End date","type":"date"},
{{#cargo_store:_table=Tournaments
  "City":{"label":"City","type":"string"},
  "Venue":{"label":"Venue","type":"string"},
  "Organizer":{"label":"Organizer","type":"string"},
  "Poster":{"label":"Poster file","type":"wiki-file-name"},
  "PosterCaption":{"label":"Poster caption","type":"string"},
  "FwangoURL":{"label":"Fwango URL","type":"url"}
}
}</templatedata>
</noinclude><includeonly>{{#default_form:Tournament}}<templatestyles src="Template:Infobox/styles.css" /><templatestyles src="Template:Tournament/styles.css" /><!-- -->{{#cargo_store:_table=Tournaments
|Name={{{Name|{{PAGENAME}}}}}
|Name={{{Name|{{PAGENAME}}}}}
|StartDate={{#time:Y-m-d|{{{StartDate|}}}}}
|StartDate={{{StartDate|}}}
|EndDate={{#time:Y-m-d|{{{EndDate|}}}}}
|EndDate={{{EndDate|}}}
|City={{{City|}}}
|City={{{City|}}}
|Venue={{{Venue|}}}
|Venue={{{Venue|}}}
Line 25: Line 33:
|Poster={{{Poster|}}}
|Poster={{{Poster|}}}
|FwangoURL={{{FwangoURL|}}}
|FwangoURL={{{FwangoURL|}}}
}}
}}<!-- --><table class="infobox infobox-tournament">
 
<tr><th class="infobox-title" colspan="2">{{{Name|{{PAGENAME}}}}}</th></tr>{{#if:{{{Poster|}}}|<tr><td class="infobox-image" colspan="2">[[File:{{{Poster}}}|frameless|250px]]</td></tr>{{#if:{{{PosterCaption|}}}|<tr><td class="infobox-caption" colspan="2">{{{PosterCaption}}}</td></tr>}}}}
<!-- infobox -->
<tr><th>Dates</th><td>{{#time:M j, Y|{{{StartDate|}}}}}</td></tr>
<div class="infobox">
{{#if:{{{City|}}}{{{Venue|}}}|<tr><th>Location</th><td>{{{City|}}}{{#if:{{{Venue|}}}| · {{{Venue}}}}}</td></tr>}}
  <div class="ib-title">{{{Name|{{PAGENAME}}}}}</div>
{{#if:{{{Organizer|}}}|<tr><th>Organizer</th><td>{{{Organizer}}}</td></tr>}}
  <div class="ib-img">{{#if:{{{Poster|}}}|[[File:{{{Poster}}}|340px]]}}</div>
{{#if:{{{Surface|}}}|<tr><th>Surface</th><td>{{{Surface}}}</td></tr>}}
 
{{#if:{{{Prize|}}}|<tr><th>Prize</th><td>{{{Prize}}}</td></tr>}}
  {{#if:{{{StartDate|}}}|
{{#if:{{{FwangoURL|}}}|<tr><th>Fwango</th><td>[{{{FwangoURL}}} View event]</td></tr>}}
    <div class="ib-row">
</table>[[Category:Tournaments]]</includeonly>
      <span class="ib-label">Dates</span>
      <span>{{#time:F j, Y|{{{StartDate}}}}}{{#if:{{{EndDate|}}}| – {{#time:F j, Y|{{{EndDate}}}}}}}</span>
    </div>}}
 
  {{#if:{{{City|}}}|
    <div class="ib-row">
      <span class="ib-label">Location</span>
      <span>{{{City}}}{{#if:{{{Venue|}}}| · {{{Venue}}}}}</span>
    </div>}}
 
  {{#if:{{{Organizer|}}}|
    <div class="ib-row">
      <span class="ib-label">Organizer</span><span>{{{Organizer}}}</span>
    </div>}}
 
  {{#if:{{{FwangoURL|}}}|
    <div class="ib-row">
      <span class="ib-label">Brackets</span>
      <span>[{{{FwangoURL}}} View on fwango.io]</span>
    </div>}}
</div>
 
<!-- default sections under the infobox -->
 
== Champions ==
<div class="chips">
{{#cargo_query:
tables=Podiums
|where=Tournament = "{{PAGENAME}}" AND Place=1
|fields=Division, Team
|order by=Division
|format=template
|template=Champion chip
|named args=yes
|default=No champions recorded yet. [[Special:FormEdit/Tournament/{{PAGENAME}}|Add podiums ▸]]
}}
</div>
 
== Divisions ==
<div class="chips">
{{#cargo_query:
tables=Divisions
|where=Tournament = "{{PAGENAME}}"
|fields=Division
|order by=Division
|format=template
|template=Division chip
|named args=yes
|default=No divisions yet. [[Special:FormEdit/Tournament/{{PAGENAME}}|Add divisions ▸]]
}}
</div>
 
<!-- The Division subtemplates inserted by the form will render below this line,
    each with its own podium table (handled inside Template:Division). -->
 
== Highlights ==
{{Tournament/Highlights}}
 
== Full match footage ==
{{Tournament/Footage}}
 
== Gallery ==
{{Tournament/Gallery}}
 
== References ==
<references/>
 
 
[[Category:Tournaments]]
</includeonly>