renamed item list templates

More precise names for:
- item overview list template for actor sheet
- inline templates in item overview list template
This commit is contained in:
Gesina Schwalbe 2021-01-03 00:08:21 +01:00
parent 6fe95d10db
commit c9b41e2d3f
3 changed files with 26 additions and 26 deletions

View file

@ -36,7 +36,7 @@ async function registerHandlebarsPartials() {
"systems/ds4/templates/item/partials/details.hbs", "systems/ds4/templates/item/partials/details.hbs",
"systems/ds4/templates/item/partials/effects.hbs", "systems/ds4/templates/item/partials/effects.hbs",
"systems/ds4/templates/item/partials/body.hbs", "systems/ds4/templates/item/partials/body.hbs",
"systems/ds4/templates/actor/partials/items.hbs", "systems/ds4/templates/actor/partials/items-overview.hbs",
]; ];
return loadTemplates(templatePaths); return loadTemplates(templatePaths);
} }

View file

@ -246,6 +246,6 @@
</div> </div>
{{!-- Items Tab --}} {{!-- Items Tab --}}
{{> systems/ds4/templates/actor/partials/items.hbs}} {{> systems/ds4/templates/actor/partials/items-overview.hbs}}
</section> </section>
</form> </form>

View file

@ -10,7 +10,7 @@
!-- !--
!-- @param datType: hand over the dataType to the partial as hash parameter !-- @param datType: hand over the dataType to the partial as hash parameter
--}} --}}
{{#*inline "addButton"}} {{#*inline "addItemButton"}}
<div class="item-controls"> <div class="item-controls">
<a class="item-control item-create" title="Create item" data-type="{{dataType}}" {{!-- SPECIFIC --}}> <a class="item-control item-create" title="Create item" data-type="{{dataType}}" {{!-- SPECIFIC --}}>
<i class="fas fa-plus"></i> <i class="fas fa-plus"></i>
@ -40,7 +40,7 @@
!-- @param datType: hand over the dataType to the partial as hash parameter !-- @param datType: hand over the dataType to the partial as hash parameter
!-- @param partial-block: hand over custom children of the flexbox in the partial block. !-- @param partial-block: hand over custom children of the flexbox in the partial block.
--}} --}}
{{#*inline "listHeader" }} {{#*inline "itemListHeader" }}
<li class="item flexrow item-header"> <li class="item flexrow item-header">
{{!-- equipped --}} {{!-- equipped --}}
{{#if (ne dataType 'equipment')}} {{#if (ne dataType 'equipment')}}
@ -57,7 +57,7 @@
{{!-- description --}} {{!-- description --}}
<div class="flex4">{{localize 'DS4.Description'}}</div> <div class="flex4">{{localize 'DS4.Description'}}</div>
{{!-- add button --}} {{!-- add button --}}
{{> addButton dataType=dataType }} {{> addItemButton dataType=dataType }}
</li> </li>
{{/inline}} {{/inline}}
@ -72,7 +72,7 @@
!-- @param item: hand over the item to the partial as hash parameter !-- @param item: hand over the item to the partial as hash parameter
!-- @param partial-block: hand over custom children of the flexbox in the partial block. !-- @param partial-block: hand over custom children of the flexbox in the partial block.
--}} --}}
{{#*inline "listEntry"}} {{#*inline "itemListEntry"}}
<li class="item flexrow" data-item-id="{{item._id}}"> <li class="item flexrow" data-item-id="{{item._id}}">
{{!-- equipped --}} {{!-- equipped --}}
{{#if (ne item.data.data.equipped undefined)}} {{#if (ne item.data.data.equipped undefined)}}
@ -108,7 +108,7 @@
{{!-- WEAPONS --}} {{!-- WEAPONS --}}
<h4 class="items-list-title">{{localize 'DS4.ItemTypeWeapon'}}</h4> <h4 class="items-list-title">{{localize 'DS4.ItemTypeWeapon'}}</h4>
<ol class="items-list"> <ol class="items-list">
{{#> listHeader dataType='weapon'}} {{#> itemListHeader dataType='weapon'}}
<div title="{{localize 'DS4.AttackType'}}" class="flex05">{{localize 'DS4.AttackTypeAbbr'}}</div> <div title="{{localize 'DS4.AttackType'}}" class="flex05">{{localize 'DS4.AttackTypeAbbr'}}</div>
<div class="item-num-val flex05" title="{{localize 'DS4.WeaponBonus'}}"> <div class="item-num-val flex05" title="{{localize 'DS4.WeaponBonus'}}">
{{localize 'DS4.WeaponBonusAbbr'}} {{localize 'DS4.WeaponBonusAbbr'}}
@ -116,31 +116,31 @@
<div class="item-num-val flex05" title="{{localize 'DS4.OpponentDefense'}}"> <div class="item-num-val flex05" title="{{localize 'DS4.OpponentDefense'}}">
{{localize 'DS4.OpponentDefenseAbbr'}} {{localize 'DS4.OpponentDefenseAbbr'}}
</div> </div>
{{/listHeader}} {{/itemListHeader}}
{{#each itemsByType.weapon as |item id|}} {{#each itemsByType.weapon as |item id|}}
{{#> listEntry item=item}} {{#> itemListEntry item=item}}
<div class="flex05"> <div class="flex05">
<img src="{{lookup ../../config.attackTypesIcons item.data.data.attackType}}" <img src="{{lookup ../../config.attackTypesIcons item.data.data.attackType}}"
title="{{lookup ../../config.attackTypes item.data.data.attackType}}" width="24" height="24" /> title="{{lookup ../../config.attackTypes item.data.data.attackType}}" width="24" height="24" />
</div> </div>
<div class="item-num-val flex05">{{ item.data.data.weaponBonus}}</div> <div class="item-num-val flex05">{{ item.data.data.weaponBonus}}</div>
<div class="item-num-val flex05">{{ item.data.data.opponentDefense}}</div> <div class="item-num-val flex05">{{ item.data.data.opponentDefense}}</div>
{{/listEntry}} {{/itemListEntry}}
{{/each}} {{/each}}
</ol> </ol>
{{!-- ARMOR --}} {{!-- ARMOR --}}
<h4 class="items-list-title">{{localize 'DS4.ItemTypeArmor'}}</h4> <h4 class="items-list-title">{{localize 'DS4.ItemTypeArmor'}}</h4>
<ol class="items-list"> <ol class="items-list">
{{#> listHeader dataType='armor'}} {{#> itemListHeader dataType='armor'}}
<div title="{{localize 'DS4.ArmorMaterialType'}}">{{localize 'DS4.ArmorMaterialTypeAbbr'}}</div> <div title="{{localize 'DS4.ArmorMaterialType'}}">{{localize 'DS4.ArmorMaterialTypeAbbr'}}</div>
<div title="{{localize 'DS4.ArmorType'}}">{{localize 'DS4.ArmorTypeAbbr'}}</div> <div title="{{localize 'DS4.ArmorType'}}">{{localize 'DS4.ArmorTypeAbbr'}}</div>
<div class="flex05 item-num-val" title="{{localize 'DS4.ArmorValue'}}"> <div class="flex05 item-num-val" title="{{localize 'DS4.ArmorValue'}}">
{{localize 'DS4.ArmorValueAbbr'}} {{localize 'DS4.ArmorValueAbbr'}}
</div> </div>
{{/listHeader}} {{/itemListHeader}}
{{#each itemsByType.armor as |item id|}} {{#each itemsByType.armor as |item id|}}
{{#> listEntry item=item }} {{#> itemListEntry item=item }}
<div title="{{lookup ../../config.armorMaterialTypes item.data.data.armorMaterialType}}"> <div title="{{lookup ../../config.armorMaterialTypes item.data.data.armorMaterialType}}">
{{lookup ../../config.armorMaterialTypesAbbr item.data.data.armorMaterialType}} {{lookup ../../config.armorMaterialTypesAbbr item.data.data.armorMaterialType}}
</div> </div>
@ -148,7 +148,7 @@
{{lookup ../../config.armorTypesAbbr item.data.data.armorType}} {{lookup ../../config.armorTypesAbbr item.data.data.armorType}}
</div> </div>
<div class="flex05 item-num-val">{{ item.data.data.armorValue}}</div> <div class="flex05 item-num-val">{{ item.data.data.armorValue}}</div>
{{/listEntry}} {{/itemListEntry}}
{{/each}} {{/each}}
</ol> </ol>
@ -156,41 +156,41 @@
{{!-- SHIELD --}} {{!-- SHIELD --}}
<h4 class="items-list-title">{{localize 'DS4.ItemTypeShield'}}</h4> {{!-- SPECIFIC --}} <h4 class="items-list-title">{{localize 'DS4.ItemTypeShield'}}</h4> {{!-- SPECIFIC --}}
<ol class="items-list"> <ol class="items-list">
{{#> listHeader dataType='shield' }} {{#> itemListHeader dataType='shield' }}
<div class="flex05 item-num-val" title="{{localize 'DS4.ArmorValue'}}"> <div class="flex05 item-num-val" title="{{localize 'DS4.ArmorValue'}}">
{{localize 'DS4.ArmorValueAbbr'}} {{localize 'DS4.ArmorValueAbbr'}}
</div> </div>
{{/listHeader}} {{/itemListHeader}}
{{#each itemsByType.shield as |item id|}} {{#each itemsByType.shield as |item id|}}
{{#> listEntry item=item }} {{#> itemListEntry item=item }}
<div class="flex05 item-num-val">{{item.data.data.armorValue}}</div> {{!-- SPECIFIC --}} <div class="flex05 item-num-val">{{item.data.data.armorValue}}</div> {{!-- SPECIFIC --}}
{{/listEntry}} {{/itemListEntry}}
{{/each}} {{/each}}
</ol> </ol>
{{!-- TRINKET --}} {{!-- TRINKET --}}
<h4 class="items-list-title">{{localize 'DS4.ItemTypeTrinket'}}</h4> <h4 class="items-list-title">{{localize 'DS4.ItemTypeTrinket'}}</h4>
<ol class="items-list"> <ol class="items-list">
{{#> listHeader dataType='trinket'}} {{#> itemListHeader dataType='trinket'}}
<div class="flex2">{{localize 'DS4.StorageLocation'}}</div> <div class="flex2">{{localize 'DS4.StorageLocation'}}</div>
{{/listHeader}} {{/itemListHeader}}
{{#each itemsByType.trinket as |item id|}} {{#each itemsByType.trinket as |item id|}}
{{#> listEntry item=item }} {{#> itemListEntry item=item }}
<div class="flex2">{{{item.data.data.storageLocation}}}</div> <div class="flex2">{{{item.data.data.storageLocation}}}</div>
{{/listEntry}} {{/itemListEntry}}
{{/each}} {{/each}}
</ol> </ol>
{{!-- EQUIPMENT --}} {{!-- EQUIPMENT --}}
<h4 class="items-list-title">{{localize 'DS4.ItemTypeEquipment'}}</h4> <h4 class="items-list-title">{{localize 'DS4.ItemTypeEquipment'}}</h4>
<ol class="items-list"> <ol class="items-list">
{{#> listHeader dataType='equipment'}} {{#> itemListHeader dataType='equipment'}}
<div class="flex2">{{localize 'DS4.StorageLocation'}}</div> <div class="flex2">{{localize 'DS4.StorageLocation'}}</div>
{{/listHeader}} {{/itemListHeader}}
{{#each itemsByType.equipment as |item id|}} {{#each itemsByType.equipment as |item id|}}
{{#> listEntry item=item }} {{#> itemListEntry item=item }}
<div class="flex2">{{{item.data.data.storageLocation}}}</div> <div class="flex2">{{{item.data.data.storageLocation}}}</div>
{{/listEntry}} {{/itemListEntry}}
{{/each}} {{/each}}
</ol> </ol>
</div> </div>