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/effects.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);
}

View file

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

View file

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