Template:Party table entry: Difference between revisions
From AlternateWiki
Content deleted Content added
No edit summary |
No edit summary |
||
(23 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#if:{{{dont_start_row|}}}||{{!}}-}}{{#if:{{{show_color|}}}|<nowiki/> |
|||
⚫ | |||
{{#if:{{{ |
{{!}} {{#if:{{{separate_desc|}}}|rowspan="2"}} bgcolor="{{GetJSON|{{{1}}}|{{{2}}}.color|none}}" {{!}}}} |
||
{{#if:{{{separate_desc|}}}|{{!}}rowspan="2"}}|{{#if:{{{show_emblem_with_name|}}}|<div style="text-align: center">[[File:{{GetJSON|{{{1}}}|{{{2}}}.logo}}|170x65px]]<br><br>}}{{GetJSON|{{{1}}}|{{{2}}}.name}}{{#if:{{{show_emblem_with_name|}}}|</div>}}{{#if:{{{show_emblem|}}}|<nowiki/> |
|||
⚫ | |||
{{!}}<div style="text-align: center">[[File:{{GetJSON|{{{1}}}|{{{2}}}.logo}}|70x70px]]</div>}}{{#if:{{{show_founded|}}}|<nowiki/> |
|||
{{!}}<div style="text-align: center">{{GetJSON|{{{1}}}|{{{2}}}.founded}}</div>}}{{#if:{{{show_position|}}}|<nowiki/> |
|||
{{!}}{{GetJSON|{{{1}}}|{{{2}}}.position}}}} |
|||
|{{#arraydefine:{{{2}}}.ideologies|{{GetJSON| |
|{{#arraydefine:{{{2}}}.ideologies|{{GetJSON|{{{1}}}|{{{2}}}.ideologies}}|;}} |
||
{{#arrayprint:{{{2}}}.ideologies|<br />}} |
{{nowrap|{{#arrayprint:{{{2}}}.ideologies|<br />}}}} |
||
|{{GetJSON|{{{1}}}|{{{2}}}.leader}} |
||{{GetJSON|{{{1}}}|{{{2}}}.leader}}{{#if:{{{separate_desc|}}}||<nowiki/> |
||
{{!}}{{GetJSON|{{{1}}}|{{{2}}}.desc}}}}{{#if:{{{show_seats|}}}{{{show_seats_auto|}}}|<nowiki/> |
|||
{{#if:{{{show_seats|}}}| |
{{!}}{{#if:{{{show_seats|}}}|{{GetJSON|{{{1}}}|{{{2}}}.seats}}}}<!-- |
||
-->{{#if:{{{show_seats_auto|}}}|{{#if:{{GetJSON|{{{1}}}|{{{2}}}.seats}}|{{#if:{{GetJSON|{{{1}}}|{{{2}}}.seats_total}}|{{#if:{{GetJSON|{{{1}}}|{{{2}}}.seats_label}}|{{GetJSON|{{{1}}}|{{{2}}}.seats_label}}<br>}}{{Composition bar|{{GetJSON|{{{1}}}|{{{2}}}.seats}}|{{GetJSON|{{{1}}}|{{{2}}}.seats_total}}|#{{GetJSON|{{{1}}}|{{{2}}}.color|CCCCCC}}}}}}}}}}<!-- |
|||
⚫ | |||
-->{{#if:{{{ |
-->}}{{#if:{{{show_seats2|}}}{{{show_seats2_auto|}}}|<nowiki/> |
||
{{!}}{{#if:{{{show_seats2|}}}|{{GetJSON|{{{1}}}|{{{2}}}.seats2}}}}<!-- |
|||
-->{{#if:{{{show_seats2_auto|}}}|{{#if:{{GetJSON|{{{1}}}|{{{2}}}.seats2}}|{{#if:{{GetJSON|{{{1}}}|{{{2}}}.seats2_total}}|{{#if:{{GetJSON|{{{1}}}|{{{2}}}.seats2_label}}|{{GetJSON|{{{1}}}|{{{2}}}.seats2_label}}<br>}}{{Composition bar|{{GetJSON|{{{1}}}|{{{2}}}.seats2}}|{{GetJSON|{{{1}}}|{{{2}}}.seats2_total}}|#{{GetJSON|{{{1}}}|{{{2}}}.color|CCCCCC}}}}}}}}}}<!-- |
|||
|-</includeonly><noinclude> |
|||
-->}}{{#if:{{{show_seats3|}}}{{{show_seats3_auto|}}}|<nowiki/> |
|||
{{#arraydefine:parties|conservatives;liberal unionists;liberal democrats;reform;sdp|;}} |
|||
⚫ | |||
-->{{#if:{{{show_seats3_auto|}}}|{{#if:{{GetJSON|{{{1}}}|{{{2}}}.seats3}}|{{#if:{{GetJSON|{{{1}}}|{{{2}}}.seats3_total}}|{{#if:{{GetJSON|{{{1}}}|{{{2}}}.seats3_label}}|{{GetJSON|{{{1}}}|{{{2}}}.seats3_label}}<br>}}{{Composition bar|{{GetJSON|{{{1}}}|{{{2}}}.seats3}}|{{GetJSON|{{{1}}}|{{{2}}}.seats3_total}}|#{{GetJSON|{{{1}}}|{{{2}}}.color|CCCCCC}}}}}}}}}}<!-- |
|||
-->}}{{#if:{{{after1|}}}|<nowiki/> |
|||
{{!}}{{GetJSON|{{{1}}}|{{{2}}}.{{{after1}}}}}{{#if:{{{after2|}}}|<nowiki/> |
|||
{{!}}{{GetJSON|{{{1}}}|{{{2}}}.{{{after2}}}}}{{#if:{{{after3|}}}|<nowiki/> |
|||
⚫ | |||
|-{{#if:{{{separate_desc|}}}|<nowiki/> |
|||
{{!}}- |
|||
{{!}}colspan="{{{separate_desc}}}"{{!}}{{GetJSON|{{{1}}}|{{{2}}}.desc}} |
|||
{{!}}- |
|||
⚫ | |||
'''Mandatory''' |
|||
* <code>1</code>: First parameter specifies JSON file to take information from. |
|||
* <code>2</code>: Second parameter specifies key that refers to an object representing the party in the file. |
|||
'''Optional''' |
|||
* <code>show_color</code>: Shows color block to the left of name with background color of <code>party.color</code>. |
|||
* <code>separate_desc</code>: Shows description (<code>party.desc</code>) underneath the information (except for the name/colour). Value should be the width of the description as so it horizontally fills the rest of the table. |
|||
* <code>show_emblem</code>: Shows emblem (<code>party.logo</code>) in column after name at size <code>70x70px</code>.<br><code>show_emblem_with_name</code>: Shows emblem (<code>party.logo</code>) in the same cell as the name. |
|||
* <code>show_founded</code>: Shows founding date/year (<code>party.founded</code>) in column after emblem. |
|||
* <code>show_position</code>: Shows political position (<code>party.position</code>) in column founded. |
|||
* <code>show_seats</code>: Shows seats (<code>party.seats</code>) in column after leader/summary.<br><code>show_seats_auto</code>: Shows a [[Template:Composition bar|Composition bar]] made from <code>party.seats</code>, <code>party.seats_total</code> and (if it exists) <code>party.color</code>. |
|||
* <code>after1</code>, <code>after2</code>, <code>after3</code>: Generic columns at the end to display special information (<code>party.after1</code>, <code>party.after2</code>, <code>party.after3</code>). |
|||
<nowiki>{{Party table entry|Template:Party_table_entry/JSON|cooperative}}</nowiki> |
|||
{| class="wikitable" style="text-align:left;" |
{| class="wikitable" style="text-align:left;" |
||
! |
!Name |
||
!Emblem |
|||
⚫ | |||
!Ideology |
!Ideology |
||
!Leader |
!Leader |
||
!Summary |
!Summary |
||
{{Party table entry|Template:Party_table_entry/JSON|cooperative}} |
|||
|} |
|||
<nowiki>{{Party table entry|Template:Party_table_entry/JSON|cooperative|show_color=y|show_founded=y|show_seats_auto=y|show_position=y|after1=membership|show_emblem_with_name=y|separate_desc=8}}</nowiki> |
|||
{| class="wikitable" style="text-align:left;" |
|||
!colspan="2"|Name |
|||
⚫ | |||
!Position |
|||
!Ideology |
|||
!Leader |
|||
!Seats |
|||
!Membership |
|||
{{Party table entry|Template:Party_table_entry/JSON|cooperative|show_color=y|show_founded=y|show_seats_auto=y|show_position=y|after1=membership|show_emblem_with_name=y|separate_desc=8}} |
|||
|} |
|} |
||
</noinclude> |
</noinclude> |