Template:Progression: Difference between revisions

From Wikiciv
Jump to navigation Jump to search
PolarTwin (talk | contribs)
Test
Tag: Blanking
PolarTwin (talk | contribs)
Undo revision 3066 by PolarTwin (talk)
Tag: Undo
 
Line 1: Line 1:
<noinclude>
<languages/>
</noinclude><includeonly><!--
--><table width={{#if:{{{width|}}}|{{{width|}}}|50%}} align=center style="background:transparent">
<tr>
<td 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></td>
</tr>
<tr>
<td>
<table style="border:1px solid gray" cellspacing=1 width=100% height=15x>
<tr>
{{#ifeq:{{#if:{{{1|}}}|{{{1}}}|0}}|0| | <td 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}}%}}">&nbsp;</td> }}
{{#ifeq:{{#if:{{{1|}}}|{{#expr:100*{{{1}}}/{{{2|100}}}}}|0}}|100|| <td style="background:#E2E2E2">&nbsp;</td> }}
</tr>
</table></td>
</tr>
</table>
</includeonly><noinclude>
{{documentation|content=


<translate>
=== Syntax === <!--T:2-->
</translate>
:{{tlx|Progression|''percent''}}
<translate>
<!--T:3-->
The <tvar|1><code>percent</code></> is a number between 0 and 100, without the trailing <tvar|2><code>%</code></>.
</translate>
:{{tlx|Progression|''param1''|''param2''}}
<translate>
<!--T:4-->
Calculates the progression as a function of <tvar|1><code>param1/param2</code></>
</translate>
:{{tlx|Progression|''param1''|''param2''|task=''param3''}}
<translate>
<!--T:5-->
Calculates the progression as a function of <tvar|1><code>param1/param2</code></>, and displays a task label on the bar.
=== Examples === <!--T:6-->
==== 1 parameter (percent) ==== <!--T:7-->
</translate>
{{tlx|Progression|0}}:
{{Progression|0}}
{{tlx|Progression|0.5}}:
{{Progression|0.5}}
{{tlx|Progression|1}}:
{{Progression|1}}
{{tlx|Progression|36.7}}:
{{Progression|36.7}}
{{tlx|Progression|100}}:
{{Progression|100}}
<translate>
==== 2 parameters ==== <!--T:8-->
</translate>
{{tlx|Progression|0|250}}:
{{Progression|0|250}}
{{tlx|Progression|100|250}}:
{{Progression|100|250}}
{{tlx|Progression|200|300}}:
{{Progression|200|300}}
{{tlx|Progression|300|300}}:
{{Progression|300|300}}
<translate>
==== 3 parameters ==== <!--T:9-->
</translate>
{{tlx|Progression|0|250|task{{=}}Sorting articles}}:
{{Progression|0|250|task=Sorting articles}}
{{tlx|Progression|100|250|task{{=}}Sorting articles}}:
{{Progression|100|250|task=Sorting articles}}
}}
[[Category:Utility templates{{#translation:}}]]
</noinclude>

Latest revision as of 11:36, 14 January 2023

<languages/>

{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}{{#if:<translate>

Syntax

</translate>

Template:Tlx

<translate> The <tvar| [[Category:Template documentation pages{{#translation:}}]] }} [[Category:Utility templates{{#translation:}}]]