Difference between revisions of "Template:Hitchability"

From Hitchwiki
Jump to navigation Jump to search
 
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>{{#switch: {{#expr: floor({{{1}}}+0.2) }}
+
<includeonly>{{#ifexpr: {{{1}}} >= 1 and {{{1}}} <=5 | {{{1}}}/5 {{#switch: {{#expr: {{{1}}} round 0 }}
 
| 1 = {{senseless}}
 
| 1 = {{senseless}}
 
| 2 = {{bad}}
 
| 2 = {{bad}}
 
| 3 = {{average}}
 
| 3 = {{average}}
 
| 4 = {{good}}
 
| 4 = {{good}}
| 5 = {{very good}}
+
| 5 = {{very good}} }}
| {{unvalued}} }}
+
{{#if: {{{2|}}} | <sup>''based on {{{2}}} rating{{#ifeq: 1 | {{{2|}}} ||s}}''</sup> }} | {{unvalued}} }}</includeonly><noinclude>
{{#if: {{{2|}}} | <sup>''based on 7 rating{{#ifeq: 1 | {{{2|}}} ||s}}''</sup> }}</includeonly>
+
Shows the hitchability rating icon and text based by number 1-5. Any other value is taken as unvalued. Second (optional) parameter is for ratings count.
<noinclude>
 
Shows the hitchability rating icon and text based by number 1-5. Any other value is taken as unvalued. Second optional parameter is for ratings count.
 
  
 +
== How to use this template ==
 
<pre>{{Hitchability|2}}</pre>
 
<pre>{{Hitchability|2}}</pre>
 
{{Hitchability|2}}
 
{{Hitchability|2}}

Latest revision as of 15:42, 19 December 2013

Shows the hitchability rating icon and text based by number 1-5. Any other value is taken as unvalued. Second (optional) parameter is for ratings count.

How to use this template

{{Hitchability|2}}

2/5 Bad.png (bad)

{{Hitchability|4.6|7}}

4.6/5 Verygood.png (very good) based on 7 ratings