Template:Referendum: Difference between revisions

From MicrasWiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 27: Line 27:
|bgcolor=eeeeee align=left |Valid votes
|bgcolor=eeeeee align=left |Valid votes
|bgcolor=eeeeee align=right|{{formatnum:{{#expr:{{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer|}}}|{{{Answer4number}}}|0}}}}}}
|bgcolor=eeeeee align=right|{{formatnum:{{#expr:{{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer|}}}|{{{Answer4number}}}|0}}}}}}
|bgcolor=eeeeee align=right|{{#expr:({{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4|}}}|{{{Answer4number}}}|0}})/({{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4|}}}|{{{Answer4number}}}|0}}+{{{Invalid1number|1}}})*100 round 2}}%
|bgcolor=eeeeee align=right|{{#iferror:{{#expr:({{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4|}}}|{{{Answer4number}}}|0}})/({{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4|}}}|{{{Answer4number}}}|0}}+{{{Invalid1number|1}}})*100 round 2}}|0}}%
|-
|-
|bgcolor=eeeeee align=left |Invalid votes
|bgcolor=eeeeee align=left |Invalid votes
|bgcolor=eeeeee align=right|{{formatnum:{{{Invalid1number|0}}}}}
|bgcolor=eeeeee align=right|{{formatnum:{{{Invalid1number|0}}}}}
|bgcolor=eeeeee align=right|{{#expr:{{{Invalid1number|0}}}/({{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4|}}}|{{{Answer4number}}}|0}}+{{{Invalid1number|1}}})*100 round 2}}%
|bgcolor=eeeeee align=right|{{#iferror:{{#expr:{{{Invalid1number|0}}}/({{{Answer1number|0}}}+{{{Answer2number|0}}}+{{#if:{{{Answer3|}}}|{{{Answer3number}}}|0}}+{{#if:{{{Answer4|}}}|{{{Answer4number}}}|0}}+{{{Invalid1number|1}}})*100 round 2}}|0}}%
|-
|-
!bgcolor=eeeeee align=left |Total votes
!bgcolor=eeeeee align=left |Total votes
Line 70: Line 70:
{{!}}bgcolor=eeeeee align=left {{!}} Valid votes
{{!}}bgcolor=eeeeee align=left {{!}} Valid votes
{{!}}bgcolor=eeeeee align=right{{!}} {{formatnum:{{#expr:{{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8|}}}|{{{Answer8number}}}|0}}}}}}
{{!}}bgcolor=eeeeee align=right{{!}} {{formatnum:{{#expr:{{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8|}}}|{{{Answer8number}}}|0}}}}}}
{{!}}bgcolor=eeeeee align=right{{!}} {{#expr:({{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8|}}}|{{{Answer8number}}}|0}})/({{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8|}}}|{{{Answer8number}}}|0}}+{{{Invalid2number|1}}})*100 round 2}}%
{{!}}bgcolor=eeeeee align=right{{!}} {{#iferror:{{#expr:({{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8|}}}|{{{Answer8number}}}|0}})/({{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8|}}}|{{{Answer8number}}}|0}}+{{{Invalid2number|1}}})*100 round 2}}|0}}%
{{!}}-
{{!}}-
{{!}}bgcolor=eeeeee align=left {{!}} Invalid votes
{{!}}bgcolor=eeeeee align=left {{!}} Invalid votes
{{!}}bgcolor=eeeeee align=right{{!}} {{formatnum:{{{Invalid2number|0}}}}}
{{!}}bgcolor=eeeeee align=right{{!}} {{formatnum:{{{Invalid2number|0}}}}}
{{!}}bgcolor=eeeeee align=right{{!}} {{#expr:{{{Invalid2number|0}}}/({{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8|}}}|{{{Answer8number}}}|0}}+{{{Invalid2number|1}}})*100 round 2}}%
{{!}}bgcolor=eeeeee align=right{{!}} {{#iferror:{{#expr:{{{Invalid2number|0}}}/({{{Answer5number|0}}}+{{{Answer6number|0}}}+{{#if:{{{Answer7|}}}|{{{Answer7number}}}|0}}+{{#if:{{{Answer8|}}}|{{{Answer8number}}}|0}}+{{{Invalid2number|1}}})*100 round 2}}|0}}%
{{!}}-
{{!}}-
{{!}}bgcolor=eeeeee align=left {{!}} Total votes
{{!}}bgcolor=eeeeee align=left {{!}} Total votes

Revision as of 01:02, 24 November 2020

Referendum
{{{Question1}}}
Results
Votes %
{{{Answer1}}} {{{Answer1number}}} 0%
{{{Answer2}}} {{{Answer2number}}} 0%
Valid votes 0 0%
Invalid votes 0 0%
Total votes 0 100%


[edit] [purge] Template documentation
  • You can use up to 4 options per referendum
  • Answers 3 and 4 are not shown when left blank
{{Referendum
|Question1      = Referendum question
|Answer1        = Answer 1
|Answer1number  = Number of votes for answer 1
|Answer2        = 
|Answer2number  = 
|Answer3        = 
|Answer3number  = 
|Answer4        = 
|Answer4number  = 
|Invalid1number = Number of invalid votes (must be at least 0)
|Question2      = Second referendum question
|Answer5        = Answer 1 to second question
|Answer5number  = 
|Answer6        = 
|Answer6number  = 
|Answer7        = 
|Answer7number  = 
|Answer8        = 
|Answer8number  = 
|Invalid2number = 
}}