Template:Officeholder infobox/office: Difference between revisions
Jump to navigation
Jump to search
(create) |
No edit summary |
||
Line 2: | Line 2: | ||
{{#if:{{{affiliation|}}}| | {{#if:{{{affiliation|}}}| | ||
{{#ifeq:{{{affiliation}}}|{{{prevaffiliation}}}|<!--no header-->| | {{#ifeq:{{{affiliation}}}|{{{prevaffiliation}}}|<!--no header-->| | ||
<tr> | <tr class="center"> | ||
<th colspan="2" style="font-size:115%;">[[{{{affiliation}}}]]</th> | <th colspan="2" style="font-size:115%;">[[{{#if:{{{game|}}}|{{{affiliation}}} in {{abbrgame|{{{game}}}|full}}|{{{affiliation}}}}}]]</th> | ||
</tr>}}}}<tr> | </tr>}}}}<tr class="center"> | ||
<th colspan="2">{{{office}}}</th> | <th colspan="2">{{{office}}}</th> | ||
</tr>{{#if:{{{start}}}{{{end}}}| | </tr>{{#if:{{{start}}}{{{end}}}| | ||
<tr> | <tr class="center"> | ||
<td colspan="2">{{#if:{{{start|}}}|{{#time:j F Y|{{{start}}}}}|Unknown}} – {{#if:{{{end|}}}|{{#time:j F Y|{{{end}}}}}|Present}}</td> | <td colspan="2">{{#if:{{{start|}}}|{{#time:j F Y|{{{start}}}}}|Unknown}} – {{#if:{{{end|}}}|{{#time:j F Y|{{{end}}}}}|Present}}</td> | ||
</tr>}}{{#if:{{{prev|}}}| | </tr>}}{{#if:{{{prev|}}}| | ||
<tr> | <tr> | ||
<th>Preceded by</th> | <th style="width:40%;">Preceded by</th> | ||
<td>[[{{{prev}}}]]</td> | <td>[[{{{prev}}}]]</td> | ||
</tr>}}{{#if:{{{next|}}}| | </tr>}}{{#if:{{{next|}}}| | ||
<tr> | <tr> | ||
<th>Succeeded by</th> | <th style="width:40%;">Succeeded by</th> | ||
<td>[[{{{next}}}]]</td> | <td>[[{{{next}}}]]</td> | ||
</tr>}} | </tr>}} | ||
}}</includeonly><noinclude>{{documentation}}</noinclude> | }}</includeonly><noinclude>{{documentation}}</noinclude> |
Revision as of 12:11, 2 July 2020
Documentation [edit]
This is a helper template for Template:Officeholder infobox to make it easier to change the way offices are displayed or add more. It contains all the code and logic for offices. Please see the parent template for details on the parameters.
The following named parameters must be passed through:
- game
- office
- prevoffice - this is just office[n-1], to check if the current one is the same (affiliations must also match).
- affiliation
- prevaffiliation - this is just affiliation[n-1], to check if the current one is the same.
- start
- end
- prev
- next
The above documentation is transcluded from Template:Officeholder infobox/office/doc.