Difference between revisions of "Template:Election table/testcases"
imported>Gadget850 (create) |
imported>MSGJ |
||
| (4 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
{{Testcases notice <!--|toc=on-->}} | {{Testcases notice <!--|toc=on-->}} | ||
| − | == [[Template:{{TEMPLATENAME|testcases}}/sandbox|Sandbox version]] == | + | == [[Template:{{TEMPLATENAME|testcases}}/sandbox|Sandbox version]], two parameters == |
| + | <code><nowiki>{{electiontable/sandbox|Table template pagename|Title to display}}</nowiki></code> | ||
| + | {{electiontable/sandbox|Table template pagename|Title to display}} | ||
| + | |+ Summary of [[Mars|Martian]] election results, 2020 | ||
| + | |- style="background:#E9E9E9;" | ||
| + | ! colspan="2" style="text-align:left;" | Parties | ||
| + | ! Votes | ||
| + | ! % | ||
| + | ! ± | ||
| + | ! Seats | ||
| + | ! ± | ||
| + | |- | ||
| + | | style="background-color:#ff0000;" | | ||
| + | | style="text-align:left;" | The red party | ||
| + | | 6042 | ||
| + | | 45.40 | ||
| + | | -4.41 | ||
| + | | 23 | ||
| + | | -2 | ||
| + | |- | ||
| + | | style="background-color:#00ff00;" | | ||
| + | | style="text-align:left;" | The green party | ||
| + | | 5678 | ||
| + | | 42.67 | ||
| + | | +1.23 | ||
| + | | 21 | ||
| + | | 0 | ||
| + | |- | ||
| + | | style="background-color:#0000ff;" | | ||
| + | | style="text-align:left;" | Free Mars | ||
| + | | 345 | ||
| + | | 2.59 | ||
| + | | +2.59 | ||
| + | | 1 | ||
| + | | +1 | ||
| + | |- | ||
| + | | style="background-color:#eeeeee;" | | ||
| + | | style="text-align:left;" | None of the above (unfilled seats) | ||
| + | | 1242 | ||
| + | | 9.33 | ||
| + | | +.59 | ||
| + | | 5 | ||
| + | | +1 | ||
| + | |- style="background:#E9E9E9;" | ||
| + | ! colspan="2" style="text-align:left;" | Total | ||
| + | ! 13307 | ||
| + | ! style="text-align:center;" colspan="2" | 100% | ||
| + | ! style="text-align:center;" colspan="2" | 50 | ||
| + | |} | ||
| − | {{ | + | {{clear}} |
| − | {{electiontable/ | + | == [[Template:{{TEMPLATENAME|testcases}}|Main template]], two parameters == |
| − | + | <code><nowiki>{{electiontable|Table template pagename|Title to display}}</nowiki></code> | |
| − | 2020 | + | {{electiontable|Table template pagename|Title to display}} |
| − | |-style="background:#E9E9E9;" | + | |+ Summary of [[Mars|Martian]] election results, 2020 |
| − | ! colspan="2" style="text-align:left;" |Parties | + | |- style="background:#E9E9E9;" |
| − | !Votes | + | ! colspan="2" style="text-align:left;" | Parties |
| − | !% | + | ! Votes |
| − | ! | + | ! % |
| − | !Seats | + | ! ± |
| − | ! | + | ! Seats |
| + | ! ± | ||
|- | |- | ||
| style="background-color:#ff0000;" | | | style="background-color:#ff0000;" | | ||
| − | | style="text-align:left;" |The red party | + | | style="text-align:left;" | The red party |
| − | |6042 | + | | 6042 |
| − | |45.40 | + | | 45.40 |
| -4.41 | | -4.41 | ||
| − | |23 | + | | 23 |
| -2 | | -2 | ||
|- | |- | ||
| style="background-color:#00ff00;" | | | style="background-color:#00ff00;" | | ||
| − | | style="text-align:left;" |The green party | + | | style="text-align:left;" | The green party |
| − | |5678 | + | | 5678 |
| − | |42.67 | + | | 42.67 |
| +1.23 | | +1.23 | ||
| − | |21 | + | | 21 |
| − | |0 | + | | 0 |
|- | |- | ||
| style="background-color:#0000ff;" | | | style="background-color:#0000ff;" | | ||
| − | | style="text-align:left;" |Free Mars | + | | style="text-align:left;" | Free Mars |
| − | |345 | + | | 345 |
| − | |2.59 | + | | 2.59 |
| +2.59 | | +2.59 | ||
| − | |1 | + | | 1 |
| +1 | | +1 | ||
|- | |- | ||
| style="background-color:#eeeeee;" | | | style="background-color:#eeeeee;" | | ||
| − | | style="text-align:left;" |None of the above (unfilled seats) | + | | style="text-align:left;" | None of the above (unfilled seats) |
| − | |1242 | + | | 1242 |
| − | |9.33 | + | | 9.33 |
| +.59 | | +.59 | ||
| − | |5 | + | | 5 |
| +1 | | +1 | ||
| − | |-style="background:#E9E9E9;" | + | |- style="background:#E9E9E9;" |
| − | ! colspan="2" style="text-align:left;" |Total | + | ! colspan="2" style="text-align:left;" | Total |
| − | !13307 | + | ! 13307 |
| − | ! style="text-align:center;" colspan="2"|100% | + | ! style="text-align:center;" colspan="2" | 100% |
| − | ! style="text-align:center;" colspan="2"|50 | + | ! style="text-align:center;" colspan="2" | 50 |
|} | |} | ||
{{clear}} | {{clear}} | ||
| + | == [[Template:{{TEMPLATENAME|testcases}}|Main template]], one parameter for title (wrong usage) == | ||
| + | <code><nowiki>{{electiontable|Title to display}}</nowiki></code> | ||
| + | {{electiontable|Title to display}} | ||
| + | |+ Summary of [[Mars|Martian]] election results, 2020 | ||
| + | |- style="background:#E9E9E9;" | ||
| + | ! colspan="2" style="text-align:left;" | Parties | ||
| + | ! Votes | ||
| + | ! % | ||
| + | ! ± | ||
| + | ! Seats | ||
| + | ! ± | ||
| + | |- | ||
| + | | style="background-color:#ff0000;" | | ||
| + | | style="text-align:left;" | The red party | ||
| + | | 6042 | ||
| + | | 45.40 | ||
| + | | -4.41 | ||
| + | | 23 | ||
| + | | -2 | ||
| + | |- | ||
| + | | style="background-color:#00ff00;" | | ||
| + | | style="text-align:left;" | The green party | ||
| + | | 5678 | ||
| + | | 42.67 | ||
| + | | +1.23 | ||
| + | | 21 | ||
| + | | 0 | ||
| + | |- | ||
| + | | style="background-color:#0000ff;" | | ||
| + | | style="text-align:left;" | Free Mars | ||
| + | | 345 | ||
| + | | 2.59 | ||
| + | | +2.59 | ||
| + | | 1 | ||
| + | | +1 | ||
| + | |- | ||
| + | | style="background-color:#eeeeee;" | | ||
| + | | style="text-align:left;" | None of the above (unfilled seats) | ||
| + | | 1242 | ||
| + | | 9.33 | ||
| + | | +.59 | ||
| + | | 5 | ||
| + | | +1 | ||
| + | |- style="background:#E9E9E9;" | ||
| + | ! colspan="2" style="text-align:left;" | Total | ||
| + | ! 13307 | ||
| + | ! style="text-align:center;" colspan="2" | 100% | ||
| + | ! style="text-align:center;" colspan="2" | 50 | ||
| + | |} | ||
| − | + | {{clear}} | |
| − | |||
| − | |||
| − | {{electiontable| | + | == [[Template:{{TEMPLATENAME|testcases}}/sandbox|Sandbox version]], one parameter for title (wrong usage) == |
| − | + | <code><nowiki>{{electiontable/sandbox|Title to display}}</nowiki></code> | |
| − | 2020 | + | {{electiontable/sandbox|Title to display}} |
| − | |-style="background:#E9E9E9;" | + | |+ Summary of [[Mars|Martian]] election results, 2020 |
| − | ! colspan="2" style="text-align:left;" |Parties | + | |- style="background:#E9E9E9;" |
| − | !Votes | + | ! colspan="2" style="text-align:left;" | Parties |
| − | !% | + | ! Votes |
| − | ! | + | ! % |
| − | !Seats | + | ! ± |
| − | ! | + | ! Seats |
| + | ! ± | ||
|- | |- | ||
| style="background-color:#ff0000;" | | | style="background-color:#ff0000;" | | ||
| − | | style="text-align:left;" |The red party | + | | style="text-align:left;" | The red party |
| − | |6042 | + | | 6042 |
| − | |45.40 | + | | 45.40 |
| -4.41 | | -4.41 | ||
| − | |23 | + | | 23 |
| -2 | | -2 | ||
|- | |- | ||
| style="background-color:#00ff00;" | | | style="background-color:#00ff00;" | | ||
| − | | style="text-align:left;" |The green party | + | | style="text-align:left;" | The green party |
| − | |5678 | + | | 5678 |
| − | |42.67 | + | | 42.67 |
| +1.23 | | +1.23 | ||
| − | |21 | + | | 21 |
| − | |0 | + | | 0 |
|- | |- | ||
| style="background-color:#0000ff;" | | | style="background-color:#0000ff;" | | ||
| − | | style="text-align:left;" |Free Mars | + | | style="text-align:left;" | Free Mars |
| − | |345 | + | | 345 |
| − | |2.59 | + | | 2.59 |
| +2.59 | | +2.59 | ||
| − | |1 | + | | 1 |
| +1 | | +1 | ||
|- | |- | ||
| style="background-color:#eeeeee;" | | | style="background-color:#eeeeee;" | | ||
| − | | style="text-align:left;" |None of the above (unfilled seats) | + | | style="text-align:left;" | None of the above (unfilled seats) |
| − | |1242 | + | | 1242 |
| − | |9.33 | + | | 9.33 |
| +.59 | | +.59 | ||
| − | |5 | + | | 5 |
| +1 | | +1 | ||
| − | |-style="background:#E9E9E9;" | + | |- style="background:#E9E9E9;" |
| − | ! colspan="2" style="text-align:left;" |Total | + | ! colspan="2" style="text-align:left;" | Total |
| − | !13307 | + | ! 13307 |
| − | ! style="text-align:center;" colspan="2"|100% | + | ! style="text-align:center;" colspan="2" | 100% |
| − | ! style="text-align:center;" colspan="2"|50 | + | ! style="text-align:center;" colspan="2" | 50 |
|} | |} | ||
{{clear}} | {{clear}} | ||
| + | |||
<!-- | <!-- | ||
Latest revision as of 10:55, 24 November 2020
| This is the template test cases page for the sandbox of Template:Election table. Script error: No such module "Purge". to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki, see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins with these links: |
Contents
Sandbox version, two parameters
{{electiontable/sandbox|Table template pagename|Title to display}}
{| class="wikitable " style="text-align:right; font-size: 95%; "
|+ Title to display
|+ Summary of Martian election results, 2020
|- style="background:#E9E9E9;"
! colspan="2" style="text-align:left;" | Parties
! Votes
! %
! ±
! Seats
! ±
|-
| style="background-color:#ff0000;" |
| style="text-align:left;" | The red party
| 6042
| 45.40
| -4.41
| 23
| -2
|-
| style="background-color:#00ff00;" |
| style="text-align:left;" | The green party
| 5678
| 42.67
| +1.23
| 21
| 0
|-
| style="background-color:#0000ff;" |
| style="text-align:left;" | Free Mars
| 345
| 2.59
| +2.59
| 1
| +1
|-
| style="background-color:#eeeeee;" |
| style="text-align:left;" | None of the above (unfilled seats)
| 1242
| 9.33
| +.59
| 5
| +1
|- style="background:#E9E9E9;"
! colspan="2" style="text-align:left;" | Total
! 13307
! style="text-align:center;" colspan="2" | 100%
! style="text-align:center;" colspan="2" | 50
|}
Main template, two parameters
{{electiontable|Table template pagename|Title to display}}
| Parties | Votes | % | ± | Seats | ± | |
|---|---|---|---|---|---|---|
| The red party | 6042 | 45.40 | -4.41 | 23 | -2 | |
| The green party | 5678 | 42.67 | +1.23 | 21 | 0 | |
| Free Mars | 345 | 2.59 | +2.59 | 1 | +1 | |
| None of the above (unfilled seats) | 1242 | 9.33 | +.59 | 5 | +1 | |
| Total | 13307 | 100% | 50 | |||
Main template, one parameter for title (wrong usage)
{{electiontable|Title to display}}
| Parties | Votes | % | ± | Seats | ± | |
|---|---|---|---|---|---|---|
| The red party | 6042 | 45.40 | -4.41 | 23 | -2 | |
| The green party | 5678 | 42.67 | +1.23 | 21 | 0 | |
| Free Mars | 345 | 2.59 | +2.59 | 1 | +1 | |
| None of the above (unfilled seats) | 1242 | 9.33 | +.59 | 5 | +1 | |
| Total | 13307 | 100% | 50 | |||
Sandbox version, one parameter for title (wrong usage)
{{electiontable/sandbox|Title to display}}
{| class="wikitable " style="text-align:right; font-size: 95%; "
|+
|+ Summary of Martian election results, 2020
|- style="background:#E9E9E9;"
! colspan="2" style="text-align:left;" | Parties
! Votes
! %
! ±
! Seats
! ±
|-
| style="background-color:#ff0000;" |
| style="text-align:left;" | The red party
| 6042
| 45.40
| -4.41
| 23
| -2
|-
| style="background-color:#00ff00;" |
| style="text-align:left;" | The green party
| 5678
| 42.67
| +1.23
| 21
| 0
|-
| style="background-color:#0000ff;" |
| style="text-align:left;" | Free Mars
| 345
| 2.59
| +2.59
| 1
| +1
|-
| style="background-color:#eeeeee;" |
| style="text-align:left;" | None of the above (unfilled seats)
| 1242
| 9.33
| +.59
| 5
| +1
|- style="background:#E9E9E9;"
! colspan="2" style="text-align:left;" | Total
! 13307
! style="text-align:center;" colspan="2" | 100%
! style="text-align:center;" colspan="2" | 50
|}