From c9b41e2d3ffcd58b6e37c94c153e62ef87ed5337 Mon Sep 17 00:00:00 2001 From: Gesina Schwalbe Date: Sun, 3 Jan 2021 00:08:21 +0100 Subject: [PATCH] renamed item list templates More precise names for: - item overview list template for actor sheet - inline templates in item overview list template --- src/module/ds4.ts | 2 +- src/templates/actor/actor-sheet.hbs | 2 +- .../{items.hbs => items-overview.hbs} | 48 +++++++++---------- 3 files changed, 26 insertions(+), 26 deletions(-) rename src/templates/actor/partials/{items.hbs => items-overview.hbs} (89%) diff --git a/src/module/ds4.ts b/src/module/ds4.ts index ba0d3017..18e066a5 100644 --- a/src/module/ds4.ts +++ b/src/module/ds4.ts @@ -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); } diff --git a/src/templates/actor/actor-sheet.hbs b/src/templates/actor/actor-sheet.hbs index 99de9e32..4f0c21f5 100644 --- a/src/templates/actor/actor-sheet.hbs +++ b/src/templates/actor/actor-sheet.hbs @@ -246,6 +246,6 @@ {{!-- Items Tab --}} - {{> systems/ds4/templates/actor/partials/items.hbs}} + {{> systems/ds4/templates/actor/partials/items-overview.hbs}} \ No newline at end of file diff --git a/src/templates/actor/partials/items.hbs b/src/templates/actor/partials/items-overview.hbs similarity index 89% rename from src/templates/actor/partials/items.hbs rename to src/templates/actor/partials/items-overview.hbs index 792891f4..f0840f59 100644 --- a/src/templates/actor/partials/items.hbs +++ b/src/templates/actor/partials/items-overview.hbs @@ -10,7 +10,7 @@ !-- !-- @param datType: hand over the dataType to the partial as hash parameter --}} -{{#*inline "addButton"}} +{{#*inline "addItemButton"}}
@@ -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" }}
  • {{!-- equipped --}} {{#if (ne dataType 'equipment')}} @@ -57,7 +57,7 @@ {{!-- description --}}
    {{localize 'DS4.Description'}}
    {{!-- add button --}} - {{> addButton dataType=dataType }} + {{> addItemButton dataType=dataType }}
  • {{/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"}}
  • {{!-- equipped --}} {{#if (ne item.data.data.equipped undefined)}} @@ -108,7 +108,7 @@ {{!-- WEAPONS --}}

    {{localize 'DS4.ItemTypeWeapon'}}

      - {{#> listHeader dataType='weapon'}} + {{#> itemListHeader dataType='weapon'}}
      {{localize 'DS4.AttackTypeAbbr'}}
      {{localize 'DS4.WeaponBonusAbbr'}} @@ -116,31 +116,31 @@
      {{localize 'DS4.OpponentDefenseAbbr'}}
      - {{/listHeader}} + {{/itemListHeader}} {{#each itemsByType.weapon as |item id|}} - {{#> listEntry item=item}} + {{#> itemListEntry item=item}}
      {{ item.data.data.weaponBonus}}
      {{ item.data.data.opponentDefense}}
      - {{/listEntry}} + {{/itemListEntry}} {{/each}}
    {{!-- ARMOR --}}

    {{localize 'DS4.ItemTypeArmor'}}

      - {{#> listHeader dataType='armor'}} + {{#> itemListHeader dataType='armor'}}
      {{localize 'DS4.ArmorMaterialTypeAbbr'}}
      {{localize 'DS4.ArmorTypeAbbr'}}
      {{localize 'DS4.ArmorValueAbbr'}}
      - {{/listHeader}} + {{/itemListHeader}} {{#each itemsByType.armor as |item id|}} - {{#> listEntry item=item }} + {{#> itemListEntry item=item }}
      {{lookup ../../config.armorMaterialTypesAbbr item.data.data.armorMaterialType}}
      @@ -148,7 +148,7 @@ {{lookup ../../config.armorTypesAbbr item.data.data.armorType}}
  • {{ item.data.data.armorValue}}
    - {{/listEntry}} + {{/itemListEntry}} {{/each}} @@ -156,41 +156,41 @@ {{!-- SHIELD --}}

    {{localize 'DS4.ItemTypeShield'}}

    {{!-- SPECIFIC --}}
      - {{#> listHeader dataType='shield' }} + {{#> itemListHeader dataType='shield' }}
      {{localize 'DS4.ArmorValueAbbr'}}
      - {{/listHeader}} + {{/itemListHeader}} {{#each itemsByType.shield as |item id|}} - {{#> listEntry item=item }} + {{#> itemListEntry item=item }}
      {{item.data.data.armorValue}}
      {{!-- SPECIFIC --}} - {{/listEntry}} + {{/itemListEntry}} {{/each}}
    {{!-- TRINKET --}}

    {{localize 'DS4.ItemTypeTrinket'}}

      - {{#> listHeader dataType='trinket'}} + {{#> itemListHeader dataType='trinket'}}
      {{localize 'DS4.StorageLocation'}}
      - {{/listHeader}} + {{/itemListHeader}} {{#each itemsByType.trinket as |item id|}} - {{#> listEntry item=item }} + {{#> itemListEntry item=item }}
      {{{item.data.data.storageLocation}}}
      - {{/listEntry}} + {{/itemListEntry}} {{/each}}
    {{!-- EQUIPMENT --}}

    {{localize 'DS4.ItemTypeEquipment'}}

      - {{#> listHeader dataType='equipment'}} + {{#> itemListHeader dataType='equipment'}}
      {{localize 'DS4.StorageLocation'}}
      - {{/listHeader}} + {{/itemListHeader}} {{#each itemsByType.equipment as |item id|}} - {{#> listEntry item=item }} + {{#> itemListEntry item=item }}
      {{{item.data.data.storageLocation}}}
      - {{/listEntry}} + {{/itemListEntry}} {{/each}}
    \ No newline at end of file