Template:Infobox referendum: Difference between revisions

From TEPwiki, Urth's Encyclopedia
Jump to navigation Jump to search
Content added Content deleted
mNo edit summary
(Undo revision 22244 by Asmo (talk))
Tag: Undo
Line 1: Line 1:
<includeonly>{{infobox
{| class="wikitable" style="text-align:right; width:25em; margin:0"
| bodystyle = background:#ffffff; border-collapse:collapse; {{#switch: {{{float}}}
|+ style="background-color:#f2f2f2;margin-bottom:-1px;border:1px solid #aaa;padding:.2em .4em" | Results
| left = margin: 0.5em 1em 0.5em 0; float:left; clear:left;
|- style="background-color:#EEEEEE"
| none = float:none; clear:none; margin:0.5em 0.5em 0.5em 0
{{#if: {{{yes|}}} |
| right
{{!}} style="width: 17em; background-color:#f2f2f2" {{!}}
| #default =
! scope="col" style="width: 5em" {{!}} Votes
}}
! scope="col" style="width: 7em" {{!}} %
| abovestyle = background-color:#eeeeee; font-size:135%; border-bottom: #aaa 1px solid; padding:0.25em;
{{!}}-
| above = {{{name|}}}
{{#ifexpr: {{formatnum:{{{yes}}}|R}} > {{formatnum:{{{no}}}|R}} |
| headerstyle = background-color:#ccc;
{{!}} style="text-align: left;" {{!}} {{#if:{{{yes_text|}}}|'''{{{yes_text}}}'''|[[Image:Yes_check.svg|14px|link=|alt=]] '''Yes'''}}
| subheaderstyle = padding:0.2em
{{!}} style="text-align: right;margin-right: 0.5em" {{!}} '''{{formatnum: {{formatnum:{{{yes}}}|R}} }}'''
| subheader = {{{title|}}}
{{!}} style="text-align: right;margin-right: 0.5em" {{!}} '''{{percentage| done = {{formatnum:{{{yes}}}|R}} | total = {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} | pad = {{{pct_prec|2}}} }}'''

{{!}}-
| datastyle = padding:0.2em
{{!}} style="text-align: left;" {{!}} {{#if:{{{no_text|}}}|'''{{{no_text}}}'''|[[Image:X_mark.svg|14px|link=|alt=]] '''No'''}}
| image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{image_width|240px}}}|alt={{{image_alt|}}}}}
{{!}} style="text-align: right;" {{!}} {{formatnum: {{formatnum:{{{no}}}|R}} }}
| caption = {{{caption|}}}
{{!}} style="text-align: right;" {{!}} {{percentage| done = {{formatnum:{{{no}}}|R}} | total = {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} | pad = {{{pct_prec|2}}} }}
| imagestyle = border-bottom: 1px solid #CCC
{{!}}-

{{#if:{{{blank|}}}|
| label1 = Location
{{!}} style="text-align: left;" {{!}} {{#if:{{{blanktype|}}}|{{{blanktype}}}|Blank votes}}
| class1 = location
{{!}} style="text-align: right;" {{!}} {{formatnum: {{formatnum:{{{blank}}}|R}} }}
| data1 = {{{location|}}}
{{!}} style="text-align: right;" {{!}} {{percentage| done = {{formatnum:{{{blank}}}|R}} | total = {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} | pad = {{{pct_prec|2}}} }}

| label2 = Date
| data2 = {{{date|}}}

| label3 = Voting system
| data3 = {{{voting_system|}}}

| data4 = {{#if:{{{yes|}}}{{{no|}}}{{{blank|}}}{{{other|}}}{{{total|}}}|{{Infobox referendum/results| yes_text = {{{yes_text|}}}| yes = {{{yes|}}}| no_text = {{{no_text|}}}| no = {{{no|}}}| blanktype = {{{blanktype|}}} |blank = {{{blank|}}}| othertype = {{{othertype|}}} | other = {{{other|}}} | {{#ifeq:{{{invalid|Ø}}}|Ø|Ø|invalid}} = {{{invalid|}}} | total= {{{total|}}}| totalref= {{{totalref|}}} | turnoutpct = {{{turnoutpct|}}}| electorate = {{{electorate|}}}| voter_registration = {{{voter_registration|}}} }}
}}
}}

{{!}}-
{{#if:{{{other|}}}|
| data5 = {{#if:{{{map|}}}|{{Infobox referendum/map
|map = {{{map}}}
{{!}} style="text-align: left;" {{!}} {{#if:{{{othertype|}}}|{{{othertype}}}|Other}}
|map_header = Results by {{#if:{{{mapdivision|}}} | {{{mapdivision}}} | county }}
{{!}} style="text-align: right;" {{!}} {{formatnum: {{formatnum:{{{other}}}|R}} }}
|map_caption = {{{mapcaption|}}}
{{!}} style="text-align: right;" {{!}} {{percentage| done = {{formatnum:{{{other}}}|R}} | total = {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} | pad = {{{pct_prec|2}}} }}
|detailed_legend = {{{detailed_legend|}}}
}}
|legend_yes={{{legend_yes|#24B14C}}}
|
|legend_no={{{legend_no|#DF0A24}}}
{{!}} style="text-align: left;" {{!}} {{#if:{{{yes_text|}}}|{{{yes_text}}}|[[Image:Yes_check.svg|14px|link=|alt=]] Yes}}
|yes_text = {{{yes_text|Yes}}}
{{!}} style="text-align: right;margin-right: 0.5em" {{!}} {{formatnum: {{formatnum:{{{yes}}}|R}} }}
|no_text = {{{no_text|No}}}
{{!}} style="text-align: right;margin-right: 0.5em" {{!}} {{percentage| done = {{formatnum:{{{yes}}}|R}} | total = {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} | pad = {{{pct_prec|2}}} }}
{{!}}-
}}}}

{{!}} style="text-align: left;" {{!}} {{#if:{{{no_text|}}}|{{{no_text}}}|[[Image:X_mark.svg|14px|link=|alt=]] No}}
| data6 = {{#if:{{{map2|}}}|{{Infobox referendum/map
{{!}} style="text-align: right;margin-right: 0.5em" {{!}} '''{{formatnum: {{formatnum:{{{no}}}|R}} }}'''
|map = {{{map2}}}
{{!}} style="text-align: right;margin-right: 0.5em" {{!}} '''{{percentage| done = {{formatnum:{{{no}}}|R}} | total = {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} | pad = {{{pct_prec|2}}} }}'''
|map_header = Results by {{#if:{{{mapdivision2|}}} | {{{mapdivision2}}} | county }}
{{!}}-
|map_caption = {{{mapcaption2|}}}
{{#if:{{{blank|}}}|
|detailed_legend = {{{detailed_legend2|}}}
{{!}} style="text-align: left;" {{!}} {{#if:{{{blanktype|}}}|{{{blanktype}}}|Blank votes}}
|legend_yes={{{legend_yes2|#24B14C}}}
{{!}} style="text-align: right;" {{!}} {{formatnum: {{formatnum:{{{blank}}}|R}} }}
|legend_no={{{legend_no2|#DF0A24}}}
{{!}} style="text-align: right;" {{!}} {{percentage| done = {{formatnum:{{{blank}}}|R}} | total = {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} | pad = {{{pct_prec|2}}} }}
|yes_text = {{{yes_text2|Yes}}}
}}
|no_text = {{{no_text2|No}}}
{{!}}-
}}}}
{{#if:{{{other|}}}|

{{!}} style="text-align: left;" {{!}} {{#if:{{{othertype|}}}|{{{othertype}}}|Other}}
| header7 = {{{part1_subject|{{#if:{{{choice1|}}}{{{part1_choice1|}}}|Results|}}}}}
{{!}} style="text-align: right;" {{!}} {{formatnum: {{formatnum:{{{other}}}|R}} }}
| data8 = {{#if:{{{part1_subject|}}}{{{choice1|}}}{{{part1_choice1|}}}|{{bar box
{{!}} style="text-align: right;" {{!}} {{percentage| done = {{formatnum:{{{other}}}|R}} | total = {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} | pad = {{{pct_prec|2}}} }}
| border_width = 0
}}
| background-color = transparent
}}
| width = {{{width|240px}}}
{{!}}- style="background-color:#EEEEEE"
| barwidth = {{{barwidth|60px}}}
{{#if: {{{total|}}}{{{invalid|}}} |
| bars=
{{#if:{{{invalid|Ø}}}|
{{bar percent|barwidth={{{barwidth|60px}}}|{{{choice1|{{{part1_choice1|}}}}}}|{{{choice1_color|{{{part1_choice1_color|green}}}}}}|{{{percentage1|{{{part1_percentage1|}}}}}}}}
{{!}} style="text-align: left" {{!}} Valid votes
{{bar percent|barwidth={{{barwidth|60px}}}|{{{choice2|{{{part1_choice2|}}}}}}|{{{choice2_color|{{{part1_choice2_color|red}}}}}}|{{{percentage2|{{{part1_percentage2|}}}}}}}}
{{!}} style="text-align: right;" {{!}} {{formatnum: {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} }}
{{#if:{{{choice3|{{{part1_choice3|}}}}}}|{{bar percent|barwidth={{{barwidth|60px}}}|{{{choice3|{{{part1_choice3|}}}}}}|{{{choice3_color|{{{part1_choice3_color|blue}}}}}}|{{{percentage3|{{{part1_percentage3|}}}}}}}}}}
{{!}} style="text-align: right;" {{!}} {{percentage| done = {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} | total = {{formatnum:{{#if:{{{total|}}}|{{{total}}}|{{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}} + {{{invalid}}}|R}} }}}}|R}} | pad = {{{pct_prec|2}}} }}
{{#if:{{{choice4|{{{part1_choice4|}}}}}}|{{bar percent|barwidth={{{barwidth|60px}}}|{{{choice4|{{{part1_choice4|}}}}}}|{{{choice4_color|{{{part1_choice4_color|orange}}}}}}|{{{percentage4|{{{part1_percentage4|}}}}}}}}}}
{{!}}- style="background-color:#EEEEEE"
{{#if:{{{choice5|{{{part1_choice5|}}}}}}|{{bar percent|barwidth={{{barwidth|60px}}}|{{{choice5|{{{part1_choice5|}}}}}}|{{{choice5_color|{{{part1_choice5_color|teal}}}}}}|{{{percentage5|{{{part1_percentage5|}}}}}}}}}}
{{!}} style="text-align: left" {{!}} Invalid {{#ifeq:{{{othertype|}}}|Blank votes| |{{#if:{{{blank|}}}| |or blank}} }} votes
| caption = {{{results_caption|{{{results1_caption|{{{part1_caption|}}}}}}}}}
{{!}} style="text-align: right;" {{!}} {{formatnum: {{{invalid|{{#expr: {{formatnum:{{{total}}}|R}} - {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} }}}}} }}
}}|}}
{{!}} style="text-align: right;" {{!}} {{percentage| done = {{formatnum:{{{invalid|{{#expr: {{formatnum:{{{total}}}|R}} - {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} }}}}}|R}} | total = {{formatnum:{{#if:{{{total|}}}|{{{total}}}|{{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}} + {{{invalid}}}|R}} }}}}|R}} | {{{pct_prec|2}}} | pad = {{{pct_prec|2}}} }}

}}
| header9 = {{{part2_subject|}}}
{{!}}- style="background-color:#EEEEEE"
| data10 = {{#if:{{{part2_subject|}}}|{{bar box
{{!}} style="text-align: left" {{!}} '''Total votes'''{{{totalref|}}}
| border_width = 0
{{!}} style="text-align: right;" {{!}} '''{{formatnum:{{#if:{{{total|}}}|{{{total}}}|{{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}} + {{{invalid}}}|R}} }}}} }}'''
| background-color = transparent
{{!}} style="text-align: right;" {{!}} '''100.00%'''
| width = {{{width|240px}}}
}}|
| barwidth = {{{barwidth|60px}}}
{{!}}-
| bars=
{{!}} colspan="3" {{unk|Result not yet known}}
{{bar percent|barwidth={{{barwidth|60px}}}|{{{part2_choice1|}}}|{{{part2_choice1_color|green}}}|{{{part2_percentage1|}}}}}
}}
{{bar percent|barwidth={{{barwidth|60px}}}|{{{part2_choice2|}}}|{{{part2_choice2_color|red}}}|{{{part2_percentage2|}}}}}
|- style="background-color:#EEEEEE"
{{#if: {{both|{{{electorate|}}}|{{{total|}}}{{{invalid|}}}}}{{{turnoutpct|}}} |
{{#if:{{{part2_choice3|}}}|{{bar percent|barwidth={{{barwidth|60px}}}|{{{part2_choice3|}}}|{{{part2_choice3_color|blue}}}|{{{part2_percentage3|}}}}}}}
{{#if:{{{part2_choice4|}}}|{{bar percent|barwidth={{{barwidth|60px}}}|{{{part2_choice4|}}}|{{{part2_choice4_color|orange}}}|{{{part2_percentage4|}}}}}}}
{{!}} style="text-align: left" {{!}} {{nowrap|{{#ifeq:{{{voter_registration|}}}|no|Eligible to vote|Registered voters}}/turnout}}
{{#if:{{{part2_choice5|}}}|{{bar percent|barwidth={{{barwidth|60px}}}|{{{part2_choice5|}}}|{{{part2_choice5_color|teal}}}|{{{part2_percentage5|}}}}}}}
{{!}} style="text-align: right;" {{!}} {{formatnum: {{{electorate}}} }}
| caption = {{{results2_caption|{{{part2_caption|}}}}}}
{{!}} style="text-align: right;" {{!}} {{#if:{{{turnoutpct|}}}|{{{turnoutpct}}}%|{{percentage| done = {{formatnum:{{#if:{{{total|}}}|{{{total}}}|{{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}} + {{{invalid}}}|R}} }}}}|R}} | {{formatnum:{{{electorate}}}|R}} | 2 }}}}
}}
}}|}}

|}<noinclude>
| header11 = {{{part3_subject|}}}
| data12 = {{#if:{{{part3_subject|}}}|{{bar box
| border_width = 0
| background-color = transparent
| width = {{{width|240px}}}
| barwidth = {{{barwidth|60px}}}
| bars=
{{bar percent|barwidth={{{barwidth|60px}}}|{{{part3_choice1|}}}|{{{part3_choice1_color|green}}}|{{{part3_percentage1|}}}}}
{{bar percent|barwidth={{{barwidth|60px}}}|{{{part3_choice2|}}}|{{{part3_choice2_color|red}}}|{{{part3_percentage2|}}}}}
{{#if:{{{part3_choice3|}}}|{{bar percent|barwidth={{{barwidth|60px}}}|{{{part3_choice3|}}}|{{{part3_choice3_color|blue}}}|{{{part3_percentage3|}}}}}}}
{{#if:{{{part3_choice4|}}}|{{bar percent|barwidth={{{barwidth|60px}}}|{{{part3_choice4|}}}|{{{part3_choice4_color|orange}}}|{{{part3_percentage4|}}}}}}}
{{#if:{{{part3_choice5|}}}|{{bar percent|barwidth={{{barwidth|60px}}}|{{{part3_choice5|}}}|{{{part3_choice5_color|teal}}}|{{{part3_percentage5|}}}}}}}
| caption = {{{results3_caption|{{{part3_caption|}}}}}}
}}|}}

| header13 = {{{part4_subject|}}}
| data14 = {{#if:{{{part4_subject|}}}|{{bar box
| border_width = 0
| background-color = transparent
| width = {{{width|240px}}}
| barwidth = {{{barwidth|60px}}}
| bars=
{{bar percent|barwidth={{{barwidth|60px}}}|{{{part4_choice1|}}}|{{{part4_choice1_color|green}}}|{{{part4_percentage1|}}}}}
{{bar percent|barwidth={{{barwidth|60px}}}|{{{part4_choice2|}}}|{{{part4_choice2_color|red}}}|{{{part4_percentage2|}}}}}
{{#if:{{{part4_choice3|}}}|{{bar percent|barwidth={{{barwidth|60px}}}|{{{part4_choice3|}}}|{{{part4_choice3_color|blue}}}|{{{part4_percentage3|}}}}}}}
{{#if:{{{part4_choice4|}}}|{{bar percent|barwidth={{{barwidth|60px}}}|{{{part4_choice4|}}}|{{{part4_choice4_color|orange}}}|{{{part4_percentage4|}}}}}}}
{{#if:{{{part4_choice5|}}}|{{bar percent|barwidth={{{barwidth|60px}}}|{{{part4_choice5|}}}|{{{part4_choice5_color|teal}}}|{{{part4_percentage5|}}}}}}}
| caption = {{{results4_caption|{{{part4_caption|}}}}}}
}}|}}

|label15 = Outcome
|data15 = {{{outcome|}}}

| belowstyle = text-align:left; background:#fafafa; border-top: #aaa 1px solid; padding:0.2em;
| below = {{br separated entries
| 1 = {{#if:{{{website|}}}|'''Website''': {{{website}}}}}
| 2 = {{{notes|}}}
}}
}}</includeonly><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Revision as of 04:26, 19 July 2020