Template:Election: Difference between revisions

From TalossaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 31: Line 31:
|-
|-
{{#if: {{{party1|}}} |
{{#if: {{{party1|}}} |
{{!}} style="text-align: left;" {{!}} '''Party''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{party1|}}} | {{{party1|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{party2|}}} | {{{party2|}}} | }}|| style="text-align: center;" {{!}} {{#if: {{{party3|}}} | {{{party3|}}} | }}
{{!}} style="text-align: left;" {{!}} '''Party''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{party1|}}} | {{{party1|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{party2|}}} | {{{party2|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{party3|}}} | {{{party3|}}} | }}
| }}
| }}
|-
|-
Line 77: Line 77:
| || {{#if: {{{image4|}}} | [[Image:{{{image4|}}}{{!}}100px]] | }} || {{#if: {{{image5|}}} | [[Image:{{{image5|}}}{{!}}100px]] | }} || {{#if: {{{image6|}}} | [[Image:{{{image6|}}}{{!}}100px]] | }}
| || {{#if: {{{image4|}}} | [[Image:{{{image4|}}}{{!}}100px]] | }} || {{#if: {{{image5|}}} | [[Image:{{{image5|}}}{{!}}100px]] | }} || {{#if: {{{image6|}}} | [[Image:{{{image6|}}}{{!}}100px]] | }}
|-
|-
| || style="background:{{#if: {{{colour4|}}} | {{{colour4|}}} | transparent }};"| || style="background:{{#if: {{{colour5|}}} | {{{colour5|}}} | transparent }};"| || style="background:{{#if: {{{colour6|}}} | {{{colour6|}}} | transparent }};" |
| || style="background:{{#if: {{{colour4|}}} | {{{colour4|}}} | transparent }};" | <!-- empty --> || style="background:{{#if: {{{colour5|}}} | {{{colour5|}}} | transparent }};"| <!-- empty --> || style="background:{{#if: {{{colour6|}}} | {{{colour6|}}} | transparent }};" | <!-- empty -->
|- {{#if: {{{leader4|}}} |
|-
{{!}} style="text-align: left;" {{!}} '''Leader''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader4|}}} | {{{leader4|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader4|}}} | {{{leader4|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader6|}}} | {{{leader6|}}} | }}  
{{#if: {{{leader4|}}} |
{{!}} style="text-align: left;" {{!}} '''Leader''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader4|}}} | {{{leader4|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader5|}}} | {{{leader5|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader6|}}} | {{{leader6|}}} | }}  
| }}
| }}
|-
|-
Line 87: Line 88:
|-
|-
{{#if: {{{party4|}}} |
{{#if: {{{party4|}}} |
{{!}} style="text-align: left;" {{!}} '''Party''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{party4|}}} | {{{party4|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{party5|}}} | {{{party5|}}} | }}|| style="text-align: center;" {{!}} {{#if: {{{party6|}}} | {{{party6|}}} | }}
{{!}} style="text-align: left;" {{!}} '''Party''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{party4|}}} | {{{party4|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{party5|}}} | {{{party5|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{party6|}}} | {{{party6|}}} | }}
| }}
| }}
|-
|-
Line 130: Line 131:
| }}
| }}
|-
|-
|- <!-- THIRD GROUP OF PARTIES/CANDIDATES -->
| || {{#if: {{{image7|}}} | [[Image:{{{image7|}}}{{!}}100px]] | }} || {{#if: {{{image8|}}} | [[Image:{{{image8|}}}{{!}}100px]] | }} || {{#if: {{{image9|}}} | [[Image:{{{image9|}}}{{!}}100px]] | }}
|-
| || style="background:{{#if: {{{colour7|}}} | {{{colour7|}}} | transparent }};" | <!-- empty --> || style="background:{{#if: {{{colour8|}}} | {{{colour8|}}} | transparent }};"| <!-- empty --> || style="background:{{#if: {{{colour9|}}} | {{{colour9|}}} | transparent }};" | <!-- empty -->
|-
{{#if: {{{leader7|}}} |
{{!}} style="text-align: left;" {{!}} '''Leader''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader7|}}} | {{{leader7|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader8|}}} | {{{leader8|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader9|}}} | {{{leader9|}}} | }}
| }}
|-
{{#if: {{{candidate7|}}} |
{{!}} style="text-align: left;" {{!}} '''Candidate''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{candidate7|}}} | {{{candidate7|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{candidate8|}}} | {{{candidate8|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{candidate9|}}} | {{{candidate9|}}} | }}
| }}
|-
{{#if: {{{party7|}}} |
{{!}} style="text-align: left;" {{!}} '''Party''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{party7|}}} | {{{party7|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{party8|}}} | {{{party8|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{party9|}}} | {{{party9|}}} | }}
| }}
|-
{{#if: {{{alliance7|}}} |
{{!}} style="text-align: left;" {{!}} '''Alliance''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{alliance7|}}} | {{{alliance7|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{alliance8|}}} | {{{alliance8|}}} | }}{{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{alliance9|}}} | {{{alliance9|}}} | }}
| }}
|-
{{#if: {{{leader_since7|}}} |
{{!}} style="text-align: left;" {{!}} '''Leader since''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader_since7|}}} | {{{leader_since7|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader_since8|}}} | {{{leader_since8|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader_since9|}}} | {{{leader_since9|}}} | }}
| }}
|-
{{#if: {{{leader_seat7|}}} |
{{!}} style="text-align: left;" {{!}} '''Leader's seat''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader_seat7|}}} | {{{leader_seat7|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader_seat8|}}} | {{{leader_seat8|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{leader_seat9|}}} | {{{leader_seat9|}}} | }}
| }}
|-
{{#if: {{{last_election7|}}} |
{{!}} style="text-align: left;" {{!}} '''Last election''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{last_election7|}}} | {{{last_election7|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{last_election8|}}} | {{{last_election8|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{last_election9|}}} | {{{last_election9|}}} | }}
| }}
|-
{{#if: {{{seats_before7|}}} |
{{!}} style="text-align: left;" {{!}} '''Seats before''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{seats_before7|}}} | {{{seats_before7|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{seats_before8|}}} | {{{seats_before8|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{seats_before9|}}} | {{{seats_before9|}}} | }}
| }}
|-
{{#if: {{{seats7|}}} |
{{!}} style="text-align: left;" {{!}} '''Seats won''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{seats7|}}} | {{{seats7|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{seats8|}}} | {{{seats8|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{seats9|}}} | {{{seats9|}}} | }}
| }}
|-
{{#if: {{{seats_change7|}}} |
{{!}} style="text-align: left;" {{!}} '''Seat change''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{seats_change7|}}} | {{{seats_change7|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{seats_change8|}}} | {{{seats_change8|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{seats_change9|}}} | {{{seats_change9|}}} | }}
| }}
|-
{{#if: {{{popular_vote7|}}} |
{{!}} style="text-align: left;" {{!}} '''Popular vote''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{popular_vote7|}}} | {{{popular_vote7|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{popular_vote8|}}} | {{{popular_vote8|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{popular_vote9|}}} | {{{popular_vote9|}}} | }}
| }}
|-
{{#if: {{{percentage7|}}} |
{{!}} style="text-align: left;" {{!}} '''Percentage''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{percentage7|}}} | {{{percentage7|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{percentage8|}}} | {{{percentage8|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{percentage9|}}} | {{{percentage9|}}} | }}
| }}
|-
{{#if: {{{swing7|}}} |
{{!}} style="text-align: left;" {{!}} '''Swing''' {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{swing7|}}} | {{{swing7|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{swing8|}}} | {{{swing8|}}} | }} {{!}}{{!}} style="text-align: center;" {{!}} {{#if: {{{swing9|}}} | {{{swing9|}}} | }}
| }}
|-<!-- FOOTER -->
| style="text-align: center;" colspan="4" | <hr>{{#if: {{{img_name|}}} | [[Image:{{{img_name|}}}{{!}}{{#if: {{{img_size|}}} | {{{img_size|}}} | 400px }}]] | }}<br><small>{{#if: {{{img_caption|}}} | {{{img_caption|}}} | }}</small><br><hr>
| style="text-align: center;" colspan="4" | <hr>{{#if: {{{img_name|}}} | [[Image:{{{img_name|}}}{{!}}{{#if: {{{img_size|}}} | {{{img_size|}}} | 400px }}]] | }}<br><small>{{#if: {{{img_caption|}}} | {{{img_caption|}}} | }}</small><br><hr>
|-
|-
| style="text-align: left;" colspan="2" | {{#if: {{{title|}}} | '''Outgoing {{{title|}}}''' | }} || style="text-align: right;" colspan="2" | {{#if: {{{posttitle|}}} | '''Outgoing {{{posttitle|}}}''' | }}
| style="text-align: left;" colspan="2" | {{#if: {{{title|}}} | '''Outgoing {{{title|}}}''' | }} || style="text-align: right;" colspan="2" | {{#if: {{{posttitle|}}} | '''{{{posttitle|}}}''' | }}
|-
|-
| style="text-align: left;" colspan="2" | {{#if: {{{before_election|}}} | {{{before_election|}}} | }}<br>{{#if: {{{before_party|}}} | {{{before_party|}}} | }} || style="text-align: right;" colspan="2" | {{#if: {{{after_election|}}} | {{{after_election|}}} | }}<br>{{#if: {{{after_party|}}} | {{{after_party|}}} | }}
| style="text-align: left;" colspan="2" | {{#if: {{{before_election|}}} | {{{before_election|}}} | }}<br>{{#if: {{{before_party|}}} | {{{before_party|}}} | }} || style="text-align: right;" colspan="2" | {{#if: {{{after_election|}}} | {{{after_election|}}} | }}<br>{{#if: {{{after_party|}}} | {{{after_party|}}} | }}
Line 158: Line 216:
| voters_eligible    = Number of eligible voters; if empty, not displayed
| voters_eligible    = Number of eligible voters; if empty, not displayed
| voters_turnout      = Turnout percentage and shift; if empty, not displayed
| voters_turnout      = Turnout percentage and shift; if empty, not displayed
<!-- REPLACE # WITH 1 to 6 (eg. image1...swing1 for the first party/candidate, image2...swing2, ..., image6...swing6-->
<!-- REPLACE # WITH 1 to 9 (eg. image1...swing1 for the first party/candidate, image2...swing2, ..., image9...swing9-->
<!-- A maximum of six parties are supported -->
<!-- A maximum of nine parties/candidates are supported -->
| image#            = Party logo, or leader/candidate photo
| image#            = Party logo, or leader/candidate photo
| colour#            = Colour of the party/candidate's party
| colour#            = Colour of the party/candidate's party

Latest revision as of 07:43, 8 November 2019

Election
Flag.gif







Usage

This template is for pages about elections. To use it, copy and paste the following code to the page, substituting in the necessary variables where indicated.
It will probably be updated to support more options and election types.

{{Election
| icon                = Icon name (Cosa, Senate, provincial flag); if empty, Talossan flag
| election_name       = Name of the election; if empty, page name
| election_date_start = Date when the election started; only write this if single-day; if empty, not displayed
| election_date_end   = Date when the election ended; leave empty if single-day; if empty, not displayed
| previous_election   = Name of the previous election's page; if empty, not displayed
| previous_date       = Previous date (e.g. "2018", "Apr 2018"); if empty, "Previous"
| next_election       = Name of the next election's page; if empty, not displayed
| next_date           = Next date (e.g. "2018", "Apr 2018"); if empty, "Next"
| previous_mps        = List of members elected in the previous election; if empty, not displayed
| elected_mps         = List of members elected in this election; if empty, not displayed
| seats_up            = Number of seats up for reelection; if empty, the final string will not be displayed
| seats_all           = Number of total seats; if empty, the final string will begin with "All X seats"
| seats_assembly      = Name of the assembly for the seats up string; if empty, not displayed
| seats_majority      = Seats needed for a majority; if empty, not displayed
| voters_eligible     = Number of eligible voters; if empty, not displayed
| voters_turnout      = Turnout percentage and shift; if empty, not displayed
<!-- REPLACE # WITH 1 to 9 (eg. image1...swing1 for the first party/candidate, image2...swing2, ..., image9...swing9-->
<!-- A maximum of nine parties/candidates are supported -->
| image#             = Party logo, or leader/candidate photo
| colour#            = Colour of the party/candidate's party
| leader#            = Leader of the party; intended to be mutually exclusive with candidate#
| candidate#         = Candidate; intended to be mutually exclusive with leader#
| party#             = Name of the party, or candidate's party
| alliance#          = Name of the alliance, or candidate's alliance
| leader_since#      = Date of election as leader
| leader_seat#       = Seat held by the leader
| last_election#     = Seats won and vote percentage for the last election
| seats_before#      = Seats held before the election
| seats#             = Seats won
| seats_change#      = Seat number change
| popular_vote#      = Popular vote count
| percentage#        = Popular vote percentage
| swing#             = Popular vote swing

| img_name        = Image/map/chart
| img_size        = Size of the image (eg. 400px), default 400px
| img_caption     = Caption of the image
| title           = Name of the office decided by election (only name, eg. "Seneschal")
| posttitle       = Office after (full string, eg. "Presumptive nominee" or "Elected Seneschal")
| before_election = Previous holder of the office
| before_party    = Party of the incumbent/last holder
| after_election  = New holder of the office
| after_party     = Party of the new holder
}}