Modèle:Item infobox/infoboxView : Différence entre versions
(4 révisions intermédiaires par le même utilisateur non affichées) | |||
Ligne 17 : | Ligne 17 : | ||
//images area (images, autoswing, stack) |
//images area (images, autoswing, stack) |
||
--><div class="section images"><!-- |
--><div class="section images"><!-- |
||
− | -->{{#if:{{#var:ii: |
+ | --><ul class="infobox-{{#if:{{#var:ii:ext:imagebreak}}|block|inline}}"><!-- |
− | -- |
+ | -->{{#if:{{#var:ii:imagealt}}|<!-- |
+ | --><li>{{#var:ii:imagealt}}</li><!-- |
||
− | + | -->|<!-- |
|
− | --><ul class="infobox-{{#if:{{#var:ii:ext:imagebreak}}|block|inline}}"><!-- |
||
//main image |
//main image |
||
-->{{#if:{{#var:ii:image}}|<li>{{#var:ii:image}}{{#if:{{#var:ii:imageold}}| {{#var:ii:imageold}}}}</li>}}<!-- |
-->{{#if:{{#var:ii:image}}|<li>{{#var:ii:image}}{{#if:{{#var:ii:imageold}}| {{#var:ii:imageold}}}}</li>}}<!-- |
||
Ligne 29 : | Ligne 29 : | ||
//female image |
//female image |
||
-->{{#if:{{#var:ii:imagefemale}}|<li>{{#var:ii:imagefemale}}</li>}}<!-- |
-->{{#if:{{#var:ii:imagefemale}}|<li>{{#var:ii:imagefemale}}</li>}}<!-- |
||
− | --> |
+ | -->}}<!-- |
− | --> |
+ | --></ul><!-- |
//autoswing |
//autoswing |
||
-->{{#if:{{#var:ii:autoswing}}|<!-- |
-->{{#if:{{#var:ii:autoswing}}|<!-- |
||
Ligne 155 : | Ligne 155 : | ||
--></span>}}</td><!-- |
--></span>}}</td><!-- |
||
--></tr><!-- |
--></tr><!-- |
||
− | -->|{{#if:{{#var:ii: |
+ | -->|{{#if:{{#lstind:ammunition|{{#var:ii:types}}|/}}||<!-- |
-->{{#if:{{#var:ii:consumable}}|<!-- |
-->{{#if:{{#var:ii:consumable}}|<!-- |
||
+ | // only display consumable if not placeable and not ammo |
||
--><tr><!-- |
--><tr><!-- |
||
--><th>{{l10n|item_infobox|th:consumable}}</th><!-- |
--><th>{{l10n|item_infobox|th:consumable}}</th><!-- |
||
Ligne 183 : | Ligne 184 : | ||
--><tr><!-- |
--><tr><!-- |
||
--><th>{{l10n|item_infobox|th:cri}}</th><!-- |
--><th>{{l10n|item_infobox|th:cri}}</th><!-- |
||
⚫ | |||
− | --><td>{{#iferror:{{#expr:{{#var:ii:critical}}+1}}|{{#var:ii:critical}}|{{percent|{{#var:ii:critical}}%}}}}</td><!-- |
||
+ | -->{{percent|<!-- |
||
+ | -->{{#var:ii:critical}}<!-- |
||
+ | -->{{#iferror:{{#expr:{{#var:ii:critical}}+1}}||%}}<!-- append a percentage sign if ii:critical is a raw number |
||
+ | -->}}<!-- |
||
+ | --></td><!-- |
||
--></tr><!-- |
--></tr><!-- |
||
-->}}<!-- |
-->}}<!-- |
||
Ligne 280 : | Ligne 286 : | ||
--><td>{{buff|id={{#var:ii:buff@@@@:mobile}}{{#var:ii:buff@@@@:id}}|class=break}}</td><!-- |
--><td>{{buff|id={{#var:ii:buff@@@@:mobile}}{{#var:ii:buff@@@@:id}}|class=break}}</td><!-- |
||
-->|<!-- |
-->|<!-- |
||
− | --><td>{{item|{{#var:ii:buff@@@@:link|{{#var:ii:buff@@@@:name}}}}|{{tr|{{#var:ii:buff@@@@:name}}}}|class=break}}</td><!-- |
+ | --><td>{{item|{{#var:ii:buff@@@@:link|{{#var:ii:buff@@@@:name}}}}|{{tr|{{#var:ii:buff@@@@:name}}}}|image={{#var:ii:buff@@@@:name}}.png|class=break}}</td><!-- |
-->}}<!-- |
-->}}<!-- |
||
--></tr><!-- |
--></tr><!-- |
||
Ligne 408 : | Ligne 414 : | ||
-->}}<!-- |
-->}}<!-- |
||
-->{{#if:{{#var:ii:idbuff}}|<!-- |
-->{{#if:{{#var:ii:idbuff}}|<!-- |
||
− | --><li>{{l10n|item_infobox|id:buff}}<b> |
+ | --><li>{{l10n|item_infobox|id:buff}}<b><!-- |
+ | -->{{#listmap:<!-- |
||
− | -->{{#lstmap:{{#lstrm:₰₰|{{#var:ii:idbuff}}|₪|₪}}|₪|@@@@|<esc>{{#or:<!-- remove empty elements |
||
− | -->{{# |
+ | -->|list={{#lstrm:₰₰|{{#var:ii:idbuff}}|₪|₪}}<!-- remove empty elements |
− | -->|<!-- |
+ | -->|insep=₪|outsep={{l10n|comma|sep1}}<!-- |
+ | -->|fieldsep=₰|token=$1,$2,$3<!-- split elements on ₰: $1=mobile, $2=ID, $3=vanity ID |
||
− | -->{{#explode:@@@@|₰|1}} {{eicons|errorcate=n|{{getBuffInfo|{{#explode:@@@@|₰|0}}{{#explode:@@@@|₰|1}}|page}}}}<!-- |
||
− | --> |
+ | -->|pattern=<esc>{{#or:$3|<!-- |
+ | -->$2 {{eicons|errorcate=n|{{pagename2en|{{getBuffInfo|$1$2|page}}}}}}<!-- |
||
⚫ | |||
+ | -->}}</esc><!-- |
||
+ | -->}}<!-- |
||
+ | --></b></li><!-- |
||
-->}}<!-- |
-->}}<!-- |
||
-->{{#if:{{#var:ii:idprojectile}}|<!-- |
-->{{#if:{{#var:ii:idprojectile}}|<!-- |
||
− | --><li>{{l10n|item_infobox|id:projectile}}<b>{{#lstsep:{{#var:ii:idprojectile}}|,| |
+ | --><li>{{l10n|item_infobox|id:projectile}}<b>{{#lstsep:{{#var:ii:idprojectile}}|,|{{l10n|comma|sep1}}}}</b></li><!-- |
-->}}<!-- |
-->}}<!-- |
||
--></ul></div><!-- div.section.ids |
--></ul></div><!-- div.section.ids |
Version actuelle datée du 11 février 2021 à 02:20
Internal subtemplate. Handles the output of the default "infobox" view of {{item infobox}}.