Difference between revisions of "Template:Progression"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
 
m (26 revisions imported)
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{| width={{#if:{{{width|}}}|{{{width|}}}|50%}} align=center style="background: transparent"
<noinclude>
|align=center|{{#if:{{{task|}}}|{{{task|}}}:&nbsp;}}<big>'''{{formatnum:{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|100}}}round 1}}|0}}}}%'''</big> complete
<languages />
</noinclude><includeonly>{| width={{#if:{{{width|}}}|{{{width|}}}|50%}} align=center style="background:transparent"
|align=center|{{#if:{{{task|}}}|{{{task|}}}:&nbsp;}}<translate><!--T:1--> <big>'''<tvar|1>{{formatnum:{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|100}}}round 1}}|0}}}}</>%'''</big> complete</translate>
|-
|-
|
|
{|style="border: 1px solid gray" cellspacing=1 width=100% height=15x
{|style="border:1px solid gray" cellspacing=1 width=100% height=15x
{{#ifeq:{{#if:{{{1|}}}|{{{1}}}|0}}|0| | {{!}}style="background: #5FDB00; width: {{#ifexpr:({{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|100}}}}}|0}}<1)|1%|{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|100}}}round 1}}|0}}%}}"{{!}} }}
{{#ifeq:{{#if:{{{1|}}}|{{{1}}}|0}}|0| | {{!}}style="background:#5FDB00; width:{{#ifexpr:({{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|100}}}}}|0}}<1)|1%|{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|100}}}round 1}}|0}}%}}"{{!}} }}
{{#ifeq:{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|100}}}}}|0}}|100|| {{!}}style="background: #E2E2E2;" {{!}} }}
{{#ifeq:{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|100}}}}}|0}}|100|| {{!}}style="background:#E2E2E2" {{!}} }}
|}
|}
|}</includeonly><noinclude>
|}</includeonly><noinclude>
{{ {{TNTN|documentation}} |content=
<translate>
=== Syntax === <!--T:2-->
</translate>
:<tt>'''<nowiki>{{Progression|</nowiki>'''''percent'''''<nowiki>}}</nowiki>'''</tt>
<translate>
<!--T:3-->
The <tt>percent</tt> is a number between 0 and 100, without the trailing <tt>%</tt>.
</translate>
:<tt>'''<nowiki>{{Progression|</nowiki>'''''param1'''''<nowiki>|</nowiki>'''''param2'''''<nowiki>}}</nowiki>'''</tt>
<translate>
<!--T:4-->
Calculates the progression as a function of <tt>param1/param2</tt>
</translate>
:<tt>'''<nowiki>{{Progression|</nowiki>'''''param1'''''<nowiki>|</nowiki>'''''param2'''''<nowiki>|</nowiki>task='''''param3'''''<nowiki>}}</nowiki>'''</tt>
<translate>
<!--T:5-->
Calculates the progression as a function of <tt>param1/param2</tt>, and displays a task label on the bar.
=== Examples === <!--T:6-->
==== 1 parameter (percent) ==== <!--T:7-->
</translate>
<tt><nowiki>{{TNT|Progression|0}}</nowiki></tt> :
{{ {{TNTN|Progression}} |0}}
<tt><nowiki>{{TNT|Progression|0.5}}</nowiki></tt> :
{{ {{TNTN|Progression}} |0.5}}
<tt><nowiki>{{TNT|Progression|1}}</nowiki></tt> :
{{ {{TNTN|Progression}} |1}}
<tt><nowiki>{{TNT|Progression|36.7}}</nowiki></tt> :
{{ {{TNTN|Progression}} |36.7}}
<tt><nowiki>{{TNT|Progression|100}}</nowiki></tt> :
{{ {{TNTN|Progression}} |100}}
<translate>
==== 2 parameters ==== <!--T:8-->
</translate>
<tt><nowiki>{{TNT|Progression|0|250}}</nowiki></tt> :
{{ {{TNTN|Progression}} |0|250}}
<tt><nowiki>{{TNT|Progression|100|250}}</nowiki></tt> :
{{ {{TNTN|Progression}} |100|250}}
<tt><nowiki>{{TNT|Progression|200|300}}</nowiki></tt> :
{{ {{TNTN|Progression}} |200|300}}
<tt><nowiki>{{TNT|Progression|300|300}}</nowiki></tt> :
{{ {{TNTN|Progression}} |300|300}}
<translate>
==== 3 parameters ==== <!--T:9-->
</translate>
<tt><nowiki>{{TNT|Progression|0|250|task=Sorting articles}}</nowiki></tt> :
{{ {{TNTN|Progression}} |0|250|task=Sorting articles}}
<tt><nowiki>{{TNT|Progression|100|250|task=Sorting articles}}</nowiki></tt> :
{{ {{TNTN|Progression}} |100|250|task=Sorting articles}}
<translate>
=== See also === <!--T:10-->
</translate>
* {{tl|Backlog progress bar}}
* {{tl|Percentage bar}}
* {{tl|Percent-done}}
* {{tl|Progress}}
* {{tl|Progress bar}}
* {{tl|Progress box}}
* {{tl|Progress meter}}
}}
[[Category:Utility templates{{translation}}]]
</noinclude>
</noinclude>

Latest revision as of 17:41, 27 December 2016

<languages />

{{ Template:TNTN |content=

<translate>

Syntax

</translate>

{{Progression|percent}}

<translate> The percent is a number between 0 and 100, without the trailing %. </translate>

{{Progression|param1|param2}}

<translate> Calculates the progression as a function of param1/param2 </translate>

{{Progression|param1|param2|task=param3}}

<translate> Calculates the progression as a function of param1/param2, and displays a task label on the bar.

Examples

1 parameter (percent)

</translate> {{TNT|Progression|0}} : {{ Template:TNTN |0}}

{{TNT|Progression|0.5}} : {{ Template:TNTN |0.5}}

{{TNT|Progression|1}} : {{ Template:TNTN |1}}

{{TNT|Progression|36.7}} : {{ Template:TNTN |36.7}}

{{TNT|Progression|100}} : {{ Template:TNTN |100}}

<translate>

2 parameters

</translate> {{TNT|Progression|0|250}} : {{ Template:TNTN |0|250}}

{{TNT|Progression|100|250}} : {{ Template:TNTN |100|250}}

{{TNT|Progression|200|300}} : {{ Template:TNTN |200|300}}

{{TNT|Progression|300|300}} : {{ Template:TNTN |300|300}}

<translate>

3 parameters

</translate> {{TNT|Progression|0|250|task=Sorting articles}} : {{ Template:TNTN |0|250|task=Sorting articles}}

{{TNT|Progression|100|250|task=Sorting articles}} : {{ Template:TNTN |100|250|task=Sorting articles}}

<translate>

See also

</translate>

}}