Difference between revisions of "Template:ConstituencyChanges2"

From blackwiki
Jump to navigation Jump to search
imported>FlyingChrysalis
(line break)
imported>TheDJ
(use data-sort-value)
 
Line 1: Line 1:
 
<includeonly>|-  
 
<includeonly>|-  
 
| <!-- begin hidden code to make date column sortable
 
| <!-- begin hidden code to make date column sortable
--><span class="sortkey" style="display:none">{{{year}}}-{{#if:{{{month|}}}|{{0expr|{{MONTHNUMBER|{{{month}}}}}}}|00}}-{{#iferror: {{#expr: {{{date}}} < 0}} | 00 | {{0expr|{{{date}}}}} }}</span> <!-- end hidden code
+
--><span data-sort-value="{{{year}}}-{{#if:{{{month|}}}|{{0expr|{{MONTHNUMBER|{{{month}}}}}}}|00}}-{{#iferror: {{#expr: {{{date}}} < 0}} | 00 | {{0expr|{{{date}}}}} }}"></span> <!-- end hidden code
 
  -->{{#if: {{{date|}}} |  
 
  -->{{#if: {{{date|}}} |  
 
{{nowrap|{{{date}}} {{{month}}} {{{year}}}}}
 
{{nowrap|{{{date}}} {{{month}}} {{{year}}}}}

Latest revision as of 13:36, 6 May 2019

Template documentation[view] [edit] [history] [purge]

The {{ConstituencyChanges2/start}}, {{ConstituencyChanges2}}, and {{end}} templates may be used to create a sortable table showing party/ConstituencyChanges2 over time. It's {{Constituency changes}}, but with Loss before Gain.

Usage

{{ConstituencyChanges2/start}}
{{ConstituencyChanges2
|date  = 
|month = 
|year  = 
|con   = 
|loss  = 
|gain  = 
|note  = 
}}
{{end}}

or

{{ConstituencyChanges2/start|con=Panel}}
{{ConstituencyChanges2
|date  = 
|month = 
|year  = 
|con   = 
|loss  = 
|gain  = 
|note  = 
}}
{{end}}

or

{{ConstituencyChanges2/start|nocon=true}}
{{ConstituencyChanges2
|date  = 
|month = 
|year  = 
|loss  = 
|gain  = 
|note  = 
}}
{{end}}

Example

{{ConstituencyChanges2/start}}
{{ConstituencyChanges2
|date  = 22
|month = December
|year  = 2011
|con   = 6th district
|loss  = Democratic Centre (Croatia)
|gain  = Croatian Democratic Union
|note  = [[Vesna Škare-Ožbolt]] of DC was replaced by Ivana Roksandić of HDZ
}}
{{ConstituencyChanges2
|date  = 30
|month = May
|year  = 2012
|con   = 4th district
|loss  = Croatian Democratic Union
|gain  = Croatian Democratic Alliance of Slavonia and Baranja
|note  = [[Josip Salapić]] left HDZ and joined HDSSB
}}
{{end}}
Date Script error: No such module "If empty". Loss Gain Note
22 December 2011 6th district DC HDZ Vesna Škare-Ožbolt of DC was replaced by Ivana Roksandić of HDZ
30 May 2012 4th district HDZ style="background-color: Template:Official Monster Raving Loony Party/meta/color" | [[Official Monster Raving Loony Party | Template:Official Monster Raving Loony Party/meta/shortname]] George III left HDZ and joined MRLP