Difference between revisions of "Template:Past Poll"

m
m
 
(5 intermediate revisions by 2 users not shown)
Line 20: Line 20:
 
|option8=
 
|option8=
 
|result8=
 
|result8=
 +
|option9=
 +
|result9=
 +
|option10=
 +
|result10=
 
|totalvotes=
 
|totalvotes=
 
}}</nowiki>
 
}}</nowiki>
Line 146: Line 150:
 
|denotes=the percentage of voters that chose the eighth option in the poll
 
|denotes=the percentage of voters that chose the eighth option in the poll
 
|generates=the percentage bar that corresponds to the eighth option in the poll
 
|generates=the percentage bar that corresponds to the eighth option in the poll
 +
|validvalues=Any positive number.
 +
}}
 +
{{Template Parameter
 +
|name=option9
 +
|takes=a string or strings
 +
|denotes=the ninth option that voters could choose in the poll
 +
|generates=the ninth option in the poll
 +
|validvalues=Any string or strings.
 +
}}
 +
{{Template Parameter
 +
|name=result9
 +
|takes=a number
 +
|denotes=the percentage of voters that chose the ninth option in the poll
 +
|generates=the percentage bar that corresponds to the ninth option in the poll
 +
|validvalues=Any positive number.
 +
}}
 +
{{Template Parameter
 +
|name=option10
 +
|takes=a string or strings
 +
|denotes=the tenth option that voters could choose in the poll
 +
|generates=the tenth option in the poll
 +
|validvalues=Any string or strings.
 +
}}
 +
{{Template Parameter
 +
|name=result10
 +
|takes=a number
 +
|denotes=the percentage of voters that chose the tenth option in the poll
 +
|generates=the percentage bar that corresponds to the tenth option in the poll
 
|validvalues=Any positive number.
 
|validvalues=Any positive number.
 
}}
 
}}
Line 156: Line 188:
 
|validvalues=Any positive whole number.
 
|validvalues=Any positive whole number.
 
}}
 
}}
</noinclude><includeonly>{| style="border:1px solid #000000; border-collapse:collapse; margin:1px; width:auto;"
+
</noinclude><includeonly>{| class="uoguidetable open leftalign"
 
|-
 
|-
! colspan="2" style="background-color:#9F3215; border:1px solid #000000; color:#FFFFFF; padding:3px;" | {{{question}}}
+
! colspan="2" | {{{question}}}
 
|-
 
|-
| style="background-color:#F6F6F6; padding:3px 5px; width:auto;" | {{{option1}}}
+
| {{{option1}}}
| style="background-color:#F6F6F6; padding:3px; width:auto;" |
+
|
 
{| style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{| style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
|-
 
|-
| style="background-color:#F6F6F6; font-size:10px; padding:0px 3px 0px 10px; text-align:right;" | {{{result1}}}%
+
| style="font-size:10px; padding:0px 3px 0px 10px; text-align:right;" | {{{result1}}}%
 
{{#if: {{{result1|}}}
 
{{#if: {{{result1|}}}
 
| {{#ifexpr: {{{result1}}} > 0
 
| {{#ifexpr: {{{result1}}} > 0
   | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result1}}} * 2}}px;" {{!}}
+
   | {{!}} style="background-color:#0010BF; width:{{#expr: {{{result1}}} * 2}}px;" {{!}}
 
   }}
 
   }}
 
}}
 
}}
 
|}
 
|}
 
|-
 
|-
| style="background-color:#F6F6F6; padding:3px 5px;" | {{{option2}}}
+
| {{{option2}}}
| style="background-color:#F6F6F6; padding:3px;" |
+
|
 
{| style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{| style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
|-
 
|-
| style="background-color:#F6F6F6; font-size:10px; padding:0px 3px 0px 10px; text-align:right;" | {{{result2}}}%
+
| style="font-size:10px; padding:0px 3px 0px 10px; text-align:right;" | {{{result2}}}%
 
{{#if: {{{result2|}}}
 
{{#if: {{{result2|}}}
 
| {{#ifexpr: {{{result2}}} > 0
 
| {{#ifexpr: {{{result2}}} > 0
   | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result2}}} * 2}}px;" {{!}}
+
   | {{!}} style="background-color:#0010BF; width:{{#expr: {{{result2}}} * 2}}px;" {{!}}
 
   }}
 
   }}
 
}}
 
}}
Line 185: Line 217:
 
{{#if: {{{option3|}}}
 
{{#if: {{{option3|}}}
 
| {{!}}-
 
| {{!}}-
{{!}} style="background-color:#F6F6F6; padding:3px 5px;" {{!}} {{{option3}}}
+
{{!}} {{{option3}}}
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}}
+
{{!}}
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{!}}-
 
{{!}}-
{{!}} style="background-color:#F6F6F6; font-size:10px; padding:0px 3px 0px 10px; text-align:right;" {{!}} {{{result3}}}%
+
{{!}} style="font-size:10px; padding:0px 3px 0px 10px; text-align:right;" {{!}} {{{result3}}}%
 
{{#if: {{{result3|}}}
 
{{#if: {{{result3|}}}
 
| {{#ifexpr: {{{result3}}} > 0
 
| {{#ifexpr: {{{result3}}} > 0
   | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result3}}} * 2}}px;" {{!}}
+
   | {{!}} style="background-color:#0010BF; width:{{#expr: {{{result3}}} * 2}}px;" {{!}}
 
   }}
 
   }}
 
}}
 
}}
Line 198: Line 230:
 
   {{#if: {{{option4|}}}
 
   {{#if: {{{option4|}}}
 
   | {{!}}-
 
   | {{!}}-
{{!}} style="background-color:#F6F6F6; padding:3px 5px;" {{!}} {{{option4}}}
+
{{!}} {{{option4}}}
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}}
+
{{!}}
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{!}}-
 
{{!}}-
{{!}} style="background-color:#F6F6F6; font-size:10px; padding:0px 3px 0px 10px; text-align:right;" {{!}} {{{result4}}}%
+
{{!}} style="font-size:10px; padding:0px 3px 0px 10px; text-align:right;" {{!}} {{{result4}}}%
 
{{#if: {{{result4|}}}
 
{{#if: {{{result4|}}}
 
| {{#ifexpr: {{{result4}}} > 0
 
| {{#ifexpr: {{{result4}}} > 0
   | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result4}}} * 2}}px;" {{!}}
+
   | {{!}} style="background-color:#0010BF; width:{{#expr: {{{result4}}} * 2}}px;" {{!}}
 
   }}
 
   }}
 
}}
 
}}
Line 211: Line 243:
 
     {{#if: {{{option5|}}}
 
     {{#if: {{{option5|}}}
 
     | {{!}}-
 
     | {{!}}-
{{!}} style="background-color:#F6F6F6; padding:3px 5px;" {{!}} {{{option5}}}
+
{{!}} {{{option5}}}
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}}
+
{{!}}
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{!}}-
 
{{!}}-
{{!}} style="background-color:#F6F6F6; font-size:10px; padding:0px 3px 0px 10px; text-align:right;" {{!}} {{{result5}}}%
+
{{!}} style="font-size:10px; padding:0px 3px 0px 10px; text-align:right;" {{!}} {{{result5}}}%
 
{{#if: {{{result5|}}}
 
{{#if: {{{result5|}}}
 
| {{#ifexpr: {{{result5}}} > 0
 
| {{#ifexpr: {{{result5}}} > 0
   | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result5}}} * 2}}px;" {{!}}
+
   | {{!}} style="background-color:#0010BF; width:{{#expr: {{{result5}}} * 2}}px;" {{!}}
 
   }}
 
   }}
 
}}
 
}}
Line 224: Line 256:
 
       {{#if: {{{option6|}}}
 
       {{#if: {{{option6|}}}
 
       | {{!}}-
 
       | {{!}}-
{{!}} style="background-color:#F6F6F6; padding:3px 5px;" {{!}} {{{option6}}}
+
{{!}} {{{option6}}}
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}}
+
{{!}}
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{!}}-
 
{{!}}-
{{!}} style="background-color:#F6F6F6; font-size:10px; padding:0px 3px 0px 10px; text-align:right;" {{!}} {{{result6}}}%
+
{{!}} style="font-size:10px; padding:0px 3px 0px 10px; text-align:right;" {{!}} {{{result6}}}%
 
{{#if: {{{result6|}}}
 
{{#if: {{{result6|}}}
 
| {{#ifexpr: {{{result6}}} > 0
 
| {{#ifexpr: {{{result6}}} > 0
   | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result6}}} * 2}}px;" {{!}}
+
   | {{!}} style="background-color:#0010BF; width:{{#expr: {{{result6}}} * 2}}px;" {{!}}
 
   }}
 
   }}
 
}}
 
}}
Line 237: Line 269:
 
         {{#if: {{{option7|}}}
 
         {{#if: {{{option7|}}}
 
         | {{!}}-
 
         | {{!}}-
{{!}} style="background-color:#F6F6F6; padding:3px 5px;" {{!}} {{{option7}}}
+
{{!}} {{{option7}}}
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}}
+
{{!}}
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{!}}-
 
{{!}}-
{{!}} style="background-color:#F6F6F6; font-size:10px; padding:0px 3px 0px 10px; text-align:right;" {{!}} {{{result7}}}%
+
{{!}} style="font-size:10px; padding:0px 3px 0px 10px; text-align:right;" {{!}} {{{result7}}}%
 
{{#if: {{{result7|}}}
 
{{#if: {{{result7|}}}
 
| {{#ifexpr: {{{result7}}} > 0
 
| {{#ifexpr: {{{result7}}} > 0
   | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result7}}} * 2}}px;" {{!}}
+
   | {{!}} style="background-color:#0010BF; width:{{#expr: {{{result7}}} * 2}}px;" {{!}}
 
   }}
 
   }}
 
}}
 
}}
Line 250: Line 282:
 
           {{#if: {{{option8|}}}
 
           {{#if: {{{option8|}}}
 
           | {{!}}-
 
           | {{!}}-
{{!}} style="background-color:#F6F6F6; padding:3px 5px;" {{!}} {{{option8}}}
+
{{!}} {{{option8}}}
{{!}} style="background-color:#F6F6F6; padding-right:3px; text-align:right;" {{!}}
+
{{!}}
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 
{{!}}-
 
{{!}}-
{{!}} style="background-color:#F6F6F6; font-size:10px; padding:0px 3px 0px 10px; text-align:right;" {{!}} {{{result8}}}%
+
{{!}} style="font-size:10px; padding:0px 3px 0px 10px; text-align:right;" {{!}} {{{result8}}}%
 
{{#if: {{{result8|}}}
 
{{#if: {{{result8|}}}
 
| {{#ifexpr: {{{result8}}} > 0
 
| {{#ifexpr: {{{result8}}} > 0
   | {{!}} style="background-color:#0010BF; color:#FFFFFF; width:{{#expr: {{{result8}}} * 2}}px;" {{!}}
+
   | {{!}} style="background-color:#0010BF; width:{{#expr: {{{result8}}} * 2}}px;" {{!}}
 +
  }}
 +
}}
 +
{{!}}}
 +
          {{#if: {{{option9|}}}
 +
          | {{!}}-
 +
{{!}} {{{option9}}}
 +
{{!}}
 +
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 +
{{!}}-
 +
{{!}} style="font-size:10px; padding:0px 3px 0px 10px; text-align:right;" {{!}} {{{result9}}}%
 +
{{#if: {{{result9|}}}
 +
| {{#ifexpr: {{{result9}}} > 0
 +
  | {{!}} style="background-color:#0010BF; width:{{#expr: {{{result9}}} * 2}}px;" {{!}}
 +
  }}
 +
}}
 +
{{!}}}
 +
          {{#if: {{{option10|}}}
 +
            | {{!}}-
 +
{{!}} {{{option10}}}
 +
{{!}}
 +
{{{!}} style="border-collapse:collapse; margin-left:auto; margin-right:0px; width:auto;"
 +
{{!}}-
 +
{{!}} style="font-size:10px; padding:0px 3px 0px 10px; text-align:right;" {{!}} {{{result10}}}%
 +
{{#if: {{{result10|}}}
 +
| {{#ifexpr: {{{result10}}} > 0
 +
  | {{!}} style="background-color:#0010BF; width:{{#expr: {{{result10}}} * 2}}px;" {{!}}
 
   }}
 
   }}
 
}}
 
}}
 
{{!}}}
 
{{!}}}
 +
              }}
 +
            }}
 
           }}
 
           }}
 
         }}
 
         }}
Line 268: Line 328:
 
}}
 
}}
 
|-
 
|-
| colspan="3" style="background-color:#F6F6F6; font-size:10px; padding:3px; text-align:right;" | ({{{totalvotes}}} votes total)
+
| colspan="2" style="font-size:10px; padding:3px; text-align:right;" | '''Total Votes:''' {{{totalvotes}}}
 
|}</includeonly>
 
|}</includeonly>

Latest revision as of 14:29, 12 March 2012

Template:Past Poll is designed for use on all pages to display a poll that was once featured on the front page of UOGuide and has since been archived.

Template

{{Past Poll
|question=
|option1=
|result1=
|option2=
|result2=
|option3=
|result3=
|option4=
|result4=
|option5=
|result5=
|option6=
|result6=
|option7=
|result7=
|option8=
|result8=
|option9=
|result9=
|option10=
|result10=
|totalvotes=
}}

Parameters

question

  • Usage: Mandatory
  • Description: The question parameter takes a string or strings denoting the question that the poll asked voters to choose an answer for. This is used to generate the question in the header of the template.
  • Valid Value(s): Any string or strings.

option1

  • Usage: Mandatory
  • Description: The option1 parameter takes a string or strings denoting the first option that voters could choose in the poll. This is used to generate the first option in the poll.
  • Valid Value(s): Any string or strings.

result1

  • Usage: Mandatory
  • Description: The result1 parameter takes a number denoting the percentage of voters that chose the first option in the poll. This is used to generate the percentage bar that corresponds to the first option in the poll.
  • Valid Value(s): Any positive number.

option2

  • Usage: Mandatory
  • Description: The option2 parameter takes a string or strings denoting the second option that voters could choose in the poll. This is used to generate the second option in the poll.
  • Valid Value(s): Any string or strings.

result2

  • Usage: Mandatory
  • Description: The result2 parameter takes a number denoting the percentage of voters that chose the first option in the poll. This is used to generate the percentage bar that corresponds to the first option in the poll.
  • Valid Value(s): Any positive number.

option3

  • Usage: Optional
  • Description: The option3 parameter takes a string or strings denoting the third option that voters could choose in the poll. This is used to generate the third option in the poll.
  • Valid Value(s): Any string or strings.

result3

  • Usage: Optional
  • Description: The result3 parameter takes a number denoting the percentage of voters that chose the third option in the poll. This is used to generate the percentage bar that corresponds to the third option in the poll.
  • Valid Value(s): Any positive number.

option4

  • Usage: Optional
  • Description: The option4 parameter takes a string or strings denoting the fourth option that voters could choose in the poll. This is used to generate the fourth option in the poll.
  • Valid Value(s): Any string or strings.

result4

  • Usage: Optional
  • Description: The result4 parameter takes a number denoting the percentage of voters that chose the fourth option in the poll. This is used to generate the percentage bar that corresponds to the fourth option in the poll.
  • Valid Value(s): Any positive number.

option5

  • Usage: Optional
  • Description: The option5 parameter takes a string or strings denoting the fifth option that voters could choose in the poll. This is used to generate the fifth option in the poll.
  • Valid Value(s): Any string or strings.

result5

  • Usage: Optional
  • Description: The result5 parameter takes a number denoting the percentage of voters that chose the fifth option in the poll. This is used to generate the percentage bar that corresponds to the fifth option in the poll.
  • Valid Value(s): Any positive number.

option6

  • Usage: Optional
  • Description: The option6 parameter takes a string or strings denoting the sixth option that voters could choose in the poll. This is used to generate the sixth option in the poll.
  • Valid Value(s): Any string or strings.

result6

  • Usage: Optional
  • Description: The result6 parameter takes a number denoting the percentage of voters that chose the sixth option in the poll. This is used to generate the percentage bar that corresponds to the sixth option in the poll.
  • Valid Value(s): Any positive number.

option7

  • Usage: Optional
  • Description: The option7 parameter takes a string or strings denoting the seventh option that voters could choose in the poll. This is used to generate the seventh option in the poll.
  • Valid Value(s): Any string or strings.

result7

  • Usage: Optional
  • Description: The result7 parameter takes a number denoting the percentage of voters that chose the seventh option in the poll. This is used to generate the percentage bar that corresponds to the seventh option in the poll.
  • Valid Value(s): Any positive number.

option8

  • Usage: Optional
  • Description: The option8 parameter takes a string or strings denoting the eighth option that voters could choose in the poll. This is used to generate the eighth option in the poll.
  • Valid Value(s): Any string or strings.

result8

  • Usage: Optional
  • Description: The result8 parameter takes a number denoting the percentage of voters that chose the eighth option in the poll. This is used to generate the percentage bar that corresponds to the eighth option in the poll.
  • Valid Value(s): Any positive number.

option9

  • Usage: Optional
  • Description: The option9 parameter takes a string or strings denoting the ninth option that voters could choose in the poll. This is used to generate the ninth option in the poll.
  • Valid Value(s): Any string or strings.

result9

  • Usage: Optional
  • Description: The result9 parameter takes a number denoting the percentage of voters that chose the ninth option in the poll. This is used to generate the percentage bar that corresponds to the ninth option in the poll.
  • Valid Value(s): Any positive number.

option10

  • Usage: Optional
  • Description: The option10 parameter takes a string or strings denoting the tenth option that voters could choose in the poll. This is used to generate the tenth option in the poll.
  • Valid Value(s): Any string or strings.

result10

  • Usage: Optional
  • Description: The result10 parameter takes a number denoting the percentage of voters that chose the tenth option in the poll. This is used to generate the percentage bar that corresponds to the tenth option in the poll.
  • Valid Value(s): Any positive number.

totalvotes

  • Usage: Mandatory
  • Description: The totalvotes parameter takes a number denoting the total number of votes that the poll garnered. This is used to generate the "Total Votes" item in the bottom-right corner of the template.
  • Valid Value(s): Any positive whole number.