Template:Infobox officeholder: Difference between revisions

Internal code layout and formatting to aid comprehension/navigation, reducing gap between "In office" and dates. (Why has gap appeared at top of page?)
m (+iw)
(Internal code layout and formatting to aid comprehension/navigation, reducing gap between "In office" and dates. (Why has gap appeared at top of page?))
Line 1:
{| class="infobox" style="width:23em; font-size:90%; text-align:left;" <!--cellpadding="3"-->
 
|+ style="font-size:larger;" | '''{{{name|{{PAGENAME}}}}}'''<!--
<!----- Name ----->
-->{{#if:{{{image|}}}|<tr style="text-align:center;"><td colspan="2">[[Image:{{{image}}}|{{#if:{{{imagesize|}}}|{{{imagesize}}}|200px}}|{{PAGENAME}}]]<br /><small>{{{caption|}}}<small/></td></tr>}}<!--
-->{{#if:{{{smallimage|}}}|<tr+ style="textfont-alignsize:center120%;"><td| colspan="2">[[Image:'''{{{smallimage}}}name|{{PAGENAME}}]]<br />{{{caption|}}}</td></tr>}}<!--'''
|-->{{#if:{{{order|}}}|<tr style="text-align:center;"><th colspan="2">{{{order}}}</th></tr>}}<!--
 
-->{{#if:{{{term_start|}}}|{{#if:{{{term_end|}}}|<!--then: in office from/to--><tr><th style="border-bottom:none; text-align:center;" colspan="2">In&nbsp;office</th></tr><tr><td style="border-top:none; text-align:center;" colspan="2">{{{term_start}}}&nbsp;&ndash;&nbsp;{{{term_end}}}</td></tr>|<!--else: assume current--><tr><th style="text-align:center; background:#B0C4DE;" colspan="2">[[Incumbent]]</th></tr>
<!----- Image ----->
-->{{#if:{{{image|}}} |<!--then:--> <tr style="text-align:center;"><td colspan="2"> [[Image:{{{image}}}|{{#if:{{{imagesize|}}}|<!--then:-->{{{imagesize}}}|200px}}|{{PAGENAME}}]]<br /> <small>{{{caption|}}}<small/></td></tr>}}<!--
-->{{#if:{{{order2smallimage|}}} |<!--then:--> <tr style="text-align:center;"><thtd colspan="2"> [[Image:{{{order2smallimage}}}|{{PAGENAME}}]]<br/>{{{caption|}}}</thtd></tr>}}<!--
 
<!----- Order ----->
{{#if:{{{order|}}} |<!--then:--> <tr style="text-align:center;"><th colspan="2">{{{order}}}</th></tr>}}<!--
 
<!----- Term ----->
{{#if:{{{term_start|}}} |<!--then:-->
{{#if:{{{term_end|}}} |<!--then:--> <!--term has start and end-->
<tr><th colspan="2" style="border-bottom:none; text-align:center;">In&nbsp;office</th></tr>
<tr><td colspan="2" style="border-top:none; text-align:center;"> {{{term_start}}}&nbsp;&ndash;&nbsp;{{{term_end}}}</td></tr>
|<!--else:--> <!--term is ongoing-->
<tr><th colspan="2" style="text-align:center; background:#b0c4de;">[[Incumbent]]</th></tr>}}
{{#if:{{{term_end|}}} |<!--then:--> <!--(nothing)-->
-->{{#if:{{{term_end|}}}|<!--then--> |<!--else:--> <tr><th>In&nbsp;office&nbsp;since</th><td>{{{term_start}}}</td></tr>}}}}<!--
}}<!--
 
-->{{#if:{{{term_end|}}}|<!--then--> |<!--else--><tr><th>In&nbsp;office&nbsp;since</th><td>{{{term_start}}}</td></tr>}}}}<!--
<!----- Vice president/s, Vice prime minister/s, Deputy/ies ----->
-->{{#if:{{{vicepresident|}}}|<tr><th>Vice&nbsp;President(s)&nbsp;&nbsp;</th><td>{{{vicepresident}}}</td></tr> }}<!--
-->{{#if:{{{vice prime ministervicepresident|}}} |<!--then:--> <tr><th>Vice&nbsp;Prime MinisterPresident(s)&nbsp;&nbsp;</th><td>{{{vice prime ministervicepresident}}}</td></tr>}}<!--
-->{{#if:{{{deputyvice prime minister|}}} |<!--then:--> <tr><th>Deputy<small>Vice&nbsp;Prime&nbsp;Minister(s)</small>&nbsp;&nbsp;</th><td>{{{deputyvice prime minister}}}</td></tr> }}<!--
-->{{#if:{{{predecessordeputy|}}} |<!--then:--> <tr><th>Preceded&nbsp;byDeputy</th><td>{{{predecessordeputy}}}</td></tr>}}<!--
 
-->{{#if:{{{successor|}}}|<tr><th>Succeeded&nbsp;by</th><td>{{{successor}}}</td></tr>}}<!--
<!----- Predecessor/Successor ----->
-->{{#if:{{{order2|}}}|<tr style="text-align:center;"><th colspan="2">{{{order2}}}</th></tr>}}<!--
-->{{#if:{{{predecessor2predecessor|}}} |<!--then:--> <tr><th>Preceded&nbsp;by</th><td>{{{predecessor2predecessor}}}</td></tr>}}<!--
-->{{#if:{{{term_start2|}}}|{{#if:{{{term_end2|}}}|<!--then: in office from/to--><tr><th style="border-bottom:none; text-align:center;" colspan="2">In&nbsp;office</th></tr><tr><td style="border-top:none; text-align:center;" colspan="2">{{{term_start2}}}&nbsp;&ndash;&nbsp;{{{term_end2}}}</td></tr>|<!--else: assume current--><tr><th style="text-align:center; background:#B0C4DE;" colspan="2">[[Incumbent]]</th></tr>}}<!--
-->{{#if:{{{term_end2successor|}}} |<!--then:--> |<!--else--><tr><th>InSucceeded&nbsp;office&nbsp;sinceby</th><td>{{{term_start2successor}}}</td></tr>}}}}<!--
 
-->{{#if:{{{president|}}}|<tr><th>President</th><td>{{{president}}}</td></tr>}}<!--
<!----- Second order/term ----->
-->{{#if:{{{predecessor2|}}}|<tr><th>Preceded&nbsp;by</th><td>{{{predecessor2}}}</td></tr>}}<!--
-->{{#if:{{{successor2order2|}}} |<tr!--then:--> <th>Succeeded&nbsptr style="text-align:center;by"></th colspan="2"><td> {{{successor2order2}}}</tdth></tr>}}
{{#if:{{{term_start2|}}} |<!--then:-->
|-
{{#if:{{{term_end2|}}} |<!--then:--> <!--term has start and end-->
! Born
<tr><th colspan="2" style="border-bottom:none; text-align:center;">In&nbsp;office</th></tr>
| {{{birth_date|}}}<br />{{{birth_place|}}}<!--
<tr><td colspan="2" style="border-top:none; text-align:center;"> {{{term_start2}}}&nbsp;&ndash;&nbsp;{{{term_end2}}}</td></tr>
-->{{#if:{{{death_date|}}}|<tr><th>Died</th><td>{{{death_date}}}<br />{{{death_place|}}}</td></tr>}}<!--
|<!--else:--> <!--term is ongoing-->
-->{{#if:{{{constituency|}}}|<tr><th>Constituency</th><td>{{{constituency}}}</td></tr>}}<!--
<tr><th colspan="2" style="text-align:center; background:#b0c4de;">[[Incumbent]]</th></tr>}}
-->{{#if:{{{party|}}}|<tr><th>Political&nbsp;party</th>
{{#if:{{{term_end2|}}} |<!--then:--> <!--(nothing)-->
<td>
|<!--else:--> <tr><th>In&nbsp;office&nbsp;since</th><td>{{{term_start2}}}</td></tr>}}
{{ #switch: {{{party}}}
}}<!--
 
<!----- President ----->
-->{{#if:{{{vicepresidentpresident|}}} |<!--then:--><tr><th>Vice&nbsp;President(s)&nbsp;&nbsp;</th><td>{{{vicepresidentpresident}}}</td></tr> }}<!--
 
<!----- Second predecessor/successor ----->
-->{{#if:{{{constituencypredecessor2|}}} |<!--then:--><tr><th>ConstituencyPreceded&nbsp;by</th><td>{{{constituencypredecessor2}}}</td></tr>}}<!--
-->{{#if:{{{successorsuccessor2|}}} |<!--then:--><tr><th>Succeeded&nbsp;by</th><td>{{{successorsuccessor2}}}</td></tr>}}<!--
 
<!----- Birth/Death ----->
| <tr><th>Born</th><td>{{{birth_date|}}}<br />{{{birth_place|}}}<!--/td></tr>
-->{{#if:{{{death_date|}}} |<!--then:--> <tr><th>Died</th><td>{{{death_date}}}<br />{{{death_place|}}}</td></tr>}}<!--
 
<!----- Constituency ----->
-->{{#if:{{{presidentconstituency|}}} |<!--then:--><tr><th>PresidentConstituency</th><td>{{{presidentconstituency}}}</td></tr>}}<!--
 
<!----- Party ----->
-->{{#if:{{{party|}}} |<!--then:--> <tr><th>Political&nbsp;party</th><td>{{#switch:{{{party}}}
| [[United States Democratic Party|Democrat]]
| [[Democratic Party (United States)|Democratic]]
| [[Democratic Party (United States)|Democrat]] = [[Democratic Party (United States)|Democratic]]
| [[Republican Party (United States)|Republican]]
| [[United States Republican Party]]
Line 34 ⟶ 68:
| [[Republican Party (United States)|Republican Party]] = [[United States Republican party|Republican]]
| [[Conservative Party (UK)|Conservative Party]]
| [[Conservative Party (UK)|Conservative]] = [[Conservative Party (UK)|Conservative]]
| [[Labour Party (UK)|Labour Party]]
| [[Labour Party (UK)|Labour]] = [[Labour Party (UK)|Labour]]
| {{{party}}} }}
}}<!--
 
</td></tr>}}<!--
<!----- Spouse etc ----->
-->{{#if:{{{spouse|}}}|<tr><th>Spouse</th><td>{{{spouse}}}</td></tr>}}<!--
-->{{#if:{{{professionspouse|}}} |<!--then:--><tr><th>ProfessionSpouse</th><td>{{{professionspouse}}}</td></tr>}}<!--
-->{{#if:{{{religionprofession|}}} |<!--then:--><tr><th>ReligionProfession</th><td>{{{religionprofession}}}</td></tr>}}<!--
-->{{#if:{{{signaturereligion|}}} |<!--then:--><tr><th>SignatureReligion</th><td>[[Image:{{{signaturereligion}}}|128px]]</td></tr>}}<!--
-->{{#if:{{{footnotessignature|}}}|<tr><td colspan="2" style="font-size: smaller; border |<!--topthen: 1px solid;"--><tr><th>Signature</th><td>[[Image:{{{footnotessignature}}}|128px]]</td></tr>}}
{{#if:{{{footnotes|}}} |<!--then:--><tr><td colspan="2" style="font-size:smaller; border-top:1px solid;">{{{footnotes}}}</td></tr>}}
|}<noinclude>
 
{{esoteric}}
|}<noinclude><hr><nowiki>{{esoteric}}</nowiki><hr>
----
 
Please use the most appropriate name when placing this template on a page: -
 
 
Please use the most appropriate name when placing this template on a page: -(i.e. the following all redirect here):
*'''Infobox Chancellor'''
*'''Infobox Governor General'''
Line 55 ⟶ 92:
*'''Infobox Vice President'''
 
 
<!--Categories-->
[[Category:Templates using ParserFunctions|{{PAGENAME}}]]
[[Category:People infobox templates|Officeholder]]
[[Category:Politics infobox templates|Officeholder]]
 
<!--Other languages-->
[[ast:Plantilla:Info presidentes]]
[[bg:Шаблон:Президент инфо]]