Zeile 2: |
Zeile 2: |
| | | |
| // Define letter/symbol used for gold in current language | | // Define letter/symbol used for gold in current language |
− | -->{{#arraydefine:$lang_qp_gold|g}}<!-- | + | -->{{#arraydefine:$lang_qp_gold|G}}<!-- |
| // Items that get autofilled by Infobox and therefore need to be autotranslated to fill in link | | // Items that get autofilled by Infobox and therefore need to be autotranslated to fill in link |
| // (other items are tested below, but the tested values should be image names which are same on all sites) | | // (other items are tested below, but the tested values should be image names which are same on all sites) |
Zeile 49: |
Zeile 49: |
| }}}} | | }}}} |
| |{{{2|0}}} | | |{{{2|0}}} |
− | }}}}{{#arraydefine:$qplink|{{#if:{{{link|}}}|{{{link}}}|{{ParseInputValues|code=qitem|{{{1|}}}|translate=true}}}}}}<!-- | + | }}}}{{#arraydefine:$qplink|{{#ifeq:{{{link}}}|||{{#if:{{{link|}}}|{{{link}}}|{{ParseInputValues|code=qitem|{{{1|}}}|translate=true|default=true}}}}}}}}<!-- |
− | // If $qpprice is a text value (non-numeric) display it and quit; set sortkey=0 so it doesn't mess up table | + | // Display sort key (0 for text/non-numeric price so it doesn't mess up table) |
− | -->{{#iferror:{{#expr:{{#arrayprint:$qpprice}}>0}} | + | --><span class="sortkey" style="display:none;">{{#iferror: |
− | |<span class="sortkey" style="display:none;">0</span>''{{{2|}}}''<!--
| + | {{#expr:{{#arrayprint:$qpprice}}>0}} |
− | // Display sort key and start table
| + | |0 |
− | --> |<span class="sortkey" style="display:none;">{{#expr:trunc(({{#arrayprint:$qpmult}})*trunc({{#arrayprint:$qpprice}}))}}</span>
| + | |{{#expr:trunc(({{#arrayprint:$qpmult}})*trunc({{#arrayprint:$qpprice}}))}}}}</span><!-- |
− | {{{!}} class="no-wrap" style="border-spacing: 0;"<!-- | + | // Start table and loop through each requested quality |
− | | + | // Display icon using Quality template and calculate/display price--> |
− | // Loop through each requested quality. Display icon using Quality template and calculate/display price
| + | {{{!}} class="no-wrap" style="border-spacing: 0;" |
− | -->{{#arrayprint:$qpqual||@qual@|<nowiki/>
| + | {{#arrayprint:$qpqual||@qual@|<nowiki/> |
| {{!}}- | | {{!}}- |
− | {{!}} {{Quality|{{{1|}}}|@qual@| size={{#if:{{{size|}}}|{{{size}}}|24}} |link={{#arrayprint:$qplink}} |alt={{#if:{{{alt|}}}|{{{alt}}}|{{#if:{{#arrayprint:$qplink}}|{{#arrayprint:$qplink}}|{{{1|}}}}}}}}} | + | {{!}} {{Quality|{{{1|}}}|@qual@| size={{#if:{{{size|}}}|{{{size}}}|24}} |link={{#arrayprint:$qplink}} |alt={{#ifeq:{{{alt}}}|||{{#if:{{{alt|}}}|{{{alt}}}|{{#if:{{#arrayprint:$qplink}}|{{#arrayprint:$qplink}}|{{{1|}}}}}}}}}}} |
− | {{!}} {{formatnum:{{#expr: | + | {{!}} {{#iferror:{{#expr:{{#arrayprint:$qpprice}}>0}} |
− | trunc( ({{#arrayprint:$qpmult}}) *
| + | |''{{{2|}}}'' |
− | trunc ( {{#switch:@qual@|Silver=1.25|Gold=1.5|Iridium=2|Normal|#default=1}} *
| + | |{{formatnum:{{#expr: |
− | trunc({{#arrayprint:$qpprice}}) ) )
| + | trunc( ({{#arrayprint:$qpmult}}) * |
− | }}}}{{#arrayprint:$lang_qp_gold}}
| + | trunc ( {{#switch:@qual@|Silver=1.25|Gold=1.5|Iridium=2|Normal|#default=1}} * |
− | }} | + | trunc({{#arrayprint:$qpprice}}) ) ) |
| + | }}}}{{#arrayprint:$lang_qp_gold}} |
| + | }}}} |
| {{!}}}<!-- | | {{!}}}<!-- |
− | -->}}</includeonly><noinclude>{{Englishdoc}}{{#ifexist:{{FULLPAGENAME}}/doc |<nowiki/> | + | --></includeonly><noinclude>{{Englishdoc}}{{#ifexist:{{FULLPAGENAME}}/doc |<nowiki/> |
| {{{{FULLPAGENAME}}/doc}} }}</noinclude> | | {{{{FULLPAGENAME}}/doc}} }}</noinclude> |