Difference between revisions of "Template:Infobox referendum/results/sandbox"
Jump to navigation
Jump to search
imported>Elliot321 (update sandbox) |
imported>Tjmj |
||
Line 52: | Line 52: | ||
{{!}} style="text-align: left" {{!}} Valid votes | {{!}} style="text-align: left" {{!}} Valid votes | ||
{{!}} style="text-align: right;" {{!}} {{formatnum: {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} }} | {{!}} style="text-align: right;" {{!}} {{formatnum: {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} }} | ||
− | {{!}} style="text-align: right;" {{!}} {{percentage| {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} | {{formatnum:{{#if:{{{total|}}}|{{{total}}}|{{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}} + {{{invalid}}}|R}} }}}}|R}} | pad = {{{pct_prec|2}}} }} | + | {{!}} style="text-align: right;" {{!}} {{percentage| {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} | {{formatnum:{{#if:{{{total|}}}|{{formatnum:{{{total}}}|R}}|{{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}} + {{{invalid}}}|R}} }}}}|R}} | pad = {{{pct_prec|2}}} }} |
{{!}}- style="background-color:#EEEEEE" | {{!}}- style="background-color:#EEEEEE" | ||
{{!}} style="text-align: left" {{!}} Invalid {{#ifeq:{{{othertype|}}}|Blank votes| |{{#if:{{{blank|}}}| |or blank}} }} votes | {{!}} style="text-align: left" {{!}} Invalid {{#ifeq:{{{othertype|}}}|Blank votes| |{{#if:{{{blank|}}}| |or blank}} }} votes | ||
− | {{!}} 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;" {{!}} {{formatnum: {{formatnum: {{{invalid|{{#expr: {{formatnum:{{{total}}}|R}} - {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} }}}}} |R}} }} |
− | {{!}} style="text-align: right;" {{!}} {{percentage| {{formatnum:{{{invalid|{{#expr: {{formatnum:{{{total}}}|R}} - {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} }}}}}|R}} | {{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}}} }} | + | {{!}} style="text-align: right;" {{!}} {{percentage| {{formatnum:{{{invalid|{{#expr: {{formatnum:{{{total}}}|R}} - {{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}}|R}} }} }}}}}|R}} | {{formatnum:{{#if:{{{total|}}}|{{formatnum:{{{total}}}|R}}|{{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}} + {{{invalid}}}|R}} }}}}|R}} | {{{pct_prec|2}}} | pad = {{{pct_prec|2}}} }} |
}} | }} | ||
{{!}}- style="background-color:#EEEEEE" | {{!}}- style="background-color:#EEEEEE" | ||
{{!}} style="text-align: left" {{!}} '''Total votes'''{{{totalref|}}} | {{!}} style="text-align: left" {{!}} '''Total votes'''{{{totalref|}}} | ||
− | {{!}} style="text-align: right;" {{!}} '''{{formatnum:{{#if:{{{total|}}}|{{{total}}}|{{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}} + {{{invalid}}}|R}} }}}} }}''' | + | {{!}} style="text-align: right;" {{!}} '''{{formatnum:{{#if:{{{total|}}}|{{formatnum:{{{total}}}|R}}|{{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}} + {{{invalid}}}|R}} }}}} }}''' |
{{!}} style="text-align: right;" {{!}} '''100.00%''' | {{!}} style="text-align: right;" {{!}} '''100.00%''' | ||
}}| | }}| | ||
Line 69: | Line 69: | ||
{{#if: {{both|{{{electorate|}}}|{{{total|}}}{{{invalid|}}}}}{{{turnoutpct|}}} | | {{#if: {{both|{{{electorate|}}}|{{{total|}}}{{{invalid|}}}}}{{{turnoutpct|}}} | | ||
{{!}} style="text-align: left" {{!}} {{nowrap|{{#ifeq:{{{voter_registration|}}}|no|Eligible to vote|Registered voters}}/turnout}} | {{!}} style="text-align: left" {{!}} {{nowrap|{{#ifeq:{{{voter_registration|}}}|no|Eligible to vote|Registered voters}}/turnout}} | ||
− | {{!}} style="text-align: right;" {{!}} {{formatnum: {{{electorate}}} }} | + | {{!}} style="text-align: right;" {{!}} {{formatnum: {{formatnum: {{{electorate}}} |R}} }} |
− | {{!}} style="text-align: right;" {{!}} {{#if:{{{turnoutpct|}}}|{{{turnoutpct}}}%|{{percentage| {{formatnum:{{#if:{{{total|}}}|{{{total}}}|{{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}} + {{{invalid}}}|R}} }}}}|R}} | {{formatnum:{{{electorate}}}|R}} | 2 }}}} | + | {{!}} style="text-align: right;" {{!}} {{#if:{{{turnoutpct|}}}|{{{turnoutpct}}}%|{{percentage| {{formatnum:{{#if:{{{total|}}}|{{formatnum:{{{total}}}|R}}|{{#expr: {{formatnum:{{{yes}}} + {{{no}}} + {{#if:{{{blank|}}}|{{{blank}}}|0}} + {{#if:{{{other|}}}|{{{other}}}|0}} + {{{invalid}}}|R}} }}}}|R}} | {{formatnum:{{{electorate}}}|R}} | 2 }}}} |
}} | }} | ||
|}<noinclude> | |}<noinclude> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 17:05, 23 November 2020
colspan="3" Template:Unk |
![]() | This is the template sandbox page for Template:Infobox referendum/results (diff). |
Usage
This subtemplate of {{Infobox referendum/results}} is used to generate the referendum results, it should not be used directly.
Examples
{{Infobox referendum/results|yes=218,000|no=217,000}}
Response
|
Votes | % |
---|---|---|
![]() |
218,000 | Template:Percentage |
![]() |
217,000 | Template:Percentage |
{{Infobox referendum/results|yes=218,000|no=217,000|total=450,000}}
Response
|
Votes | % |
---|---|---|
![]() |
218,000 | Template:Percentage |
![]() |
217,000 | Template:Percentage |
Valid votes | 435,000 | Template:Percentage |
Invalid or blank votes | 15,000 | Template:Percentage |
Total votes | 450,000 | 100.00% |
{{Infobox referendum/results|yes=217,000|no=218,000|total=450,000}}
Response
|
Votes | % |
---|---|---|
![]() |
217,000 | Template:Percentage |
![]() |
218,000 | Template:Percentage |
Valid votes | 435,000 | Template:Percentage |
Invalid or blank votes | 15,000 | Template:Percentage |
Total votes | 450,000 | 100.00% |
{{Infobox referendum/results|yes=218,000|no=217,000|other=5,000|othertype=Blank votes|total=450,000}}
Response
|
Votes | % |
---|---|---|
![]() |
218,000 | Template:Percentage |
![]() |
217,000 | Template:Percentage |
Blank votes | 5,000 | Template:Percentage |
Valid votes | 440,000 | Template:Percentage |
Invalid votes | 10,000 | Template:Percentage |
Total votes | 450,000 | 100.00% |
{{Infobox referendum/results|yes=218,000|no=217,000|blank=5,000|total=450,000}}
Response
|
Votes | % |
---|---|---|
![]() |
218,000 | Template:Percentage |
![]() |
217,000 | Template:Percentage |
Blank votes | 5,000 | Template:Percentage |
Valid votes | 440,000 | Template:Percentage |
Invalid votes | 10,000 | Template:Percentage |
Total votes | 450,000 | 100.00% |
{{Infobox referendum/results|yes=218,000|no=217,000|electorate=800,000}}
Response
|
Votes | % |
---|---|---|
![]() |
218,000 | Template:Percentage |
![]() |
217,000 | Template:Percentage |
{{Infobox referendum/results|yes=218,000|no=217,000|total=450,000|electorate=800,000}}
Response
|
Votes | % |
---|---|---|
![]() |
218,000 | Template:Percentage |
![]() |
217,000 | Template:Percentage |
Valid votes | 435,000 | Template:Percentage |
Invalid or blank votes | 15,000 | Template:Percentage |
Total votes | 450,000 | 100.00% |
Registered voters/turnout | 800,000 | Template:Percentage |
{{Infobox referendum/results|yes=217,000|no=218,000|total=450,000|electorate=800,000}}
Response
|
Votes | % |
---|---|---|
![]() |
217,000 | Template:Percentage |
![]() |
218,000 | Template:Percentage |
Valid votes | 435,000 | Template:Percentage |
Invalid or blank votes | 15,000 | Template:Percentage |
Total votes | 450,000 | 100.00% |
Registered voters/turnout | 800,000 | Template:Percentage |
{{Infobox referendum/results|yes=217,000|no=218,000|invalid=15,000|electorate=800,000}}
Response
|
Votes | % |
---|---|---|
![]() |
217,000 | Template:Percentage |
![]() |
218,000 | Template:Percentage |
Valid votes | 435,000 | Template:Percentage |
Invalid or blank votes | 15,000 | Template:Percentage |
Total votes | 450,000 | 100.00% |
Registered voters/turnout | 800,000 | Template:Percentage |
{{Infobox referendum/results|yes=217,000|no=218,000|invalid=|total=450,000|electorate=800,000}}
Response
|
Votes | % |
---|---|---|
![]() |
217,000 | Template:Percentage |
![]() |
218,000 | Template:Percentage |
Total votes | 450,000 | 100.00% |
Registered voters/turnout | 800,000 | Template:Percentage |
{{Infobox referendum/results|electorate=800,000}}
colspan="3" Template:Unk |
{{Infobox referendum/results|invalid=15,000}}
colspan="3" Template:Unk |
{{Infobox referendum/results|turnoutpct=95.1}}
colspan="3" Template:Unk | ||
Registered voters/turnout | 95.1% |
{{Infobox referendum/results}}
colspan="3" Template:Unk |
The above documentation is transcluded from Template:Infobox referendum/results/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |