{{!-- TODO: Refactor to avoid code duplication with creature-special-abilities-overview and talents-overview --}} {{!-- ======================================================================== --}} {{!-- INLINE PARTIAL DEFINITIONS --}} {{!-- ======================================================================== --}} {{!-- !-- Render the given partial block only if the given itemsArray has length > 0, !-- else only an add button. !-- !-- @param itemsArray: the array with the items to check the length of !-- @param dataType: the string type of the item --}} {{#*inline "ifHasItemOfType"}} {{#if (and (ne itemsArray undefined) (gt itemsArray.length 0))}} {{> @partial-block}} {{/if}} {{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }} {{/inline}} {{!-- !-- Render a talent list row from a given item. !-- It is a flexbox with a child for each item value of interest. !-- The partial assumes a variable item to be given in the context. !-- !-- @param item: hand over the item to the partial as hash parameter --}} {{#*inline "talentListEntry"}}
  • {{!-- image --}}
    {{!-- name --}} {{!-- talent tank equation --}} {{> systems/ds4/templates/actor/partials/talent-rank-equation.hbs talentRank=item.data.rank}} {{!-- description --}}
    {{{item.data.description}}}
    {{!-- control buttons --}} {{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
  • {{/inline}} {{!-- !-- Render a list header for a base item list entry from a given item. !-- The partial assumes a variable dataType to be given in the context. --}} {{#*inline "talentListHeader"}}
  • {{!-- image --}}
    {{!-- name --}}
    {{localize 'DS4.ItemName'}}
    {{!-- rank info --}}
    {{localize 'DS4.TalentRank'}}
    {{!-- description --}}
    {{localize 'DS4.Description'}}
    {{!-- control buttons placeholder --}}
  • {{/inline}} {{!-- !-- Render a list row for a base item from a given item. !-- Base item means it just has an image, a description, and a name (and effects). !-- It is a flexbox with a child for each item value of interest. !-- The partial assumes a variable item to be given in the context. !-- !-- @param item: hand over the item to the partial as hash parameter --}} {{#*inline "baseItemListEntry"}}
  • {{!-- image --}}
    {{!-- name --}} {{!-- description --}}
    {{{item.data.description}}}
    {{!-- control buttons --}} {{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
  • {{/inline}} {{!-- !-- Render a list header for a base item list entry from a given item. !-- The partial assumes a variable dataType to be given in the context. --}} {{#*inline "baseItemListHeader"}}
  • {{!-- image --}}
    {{!-- name --}}
    {{localize 'DS4.ItemName'}}
    {{!-- description --}}
    {{localize 'DS4.Description'}}
    {{!-- control buttons placeholder --}}
  • {{/inline}} {{!-- ======================================================================== --}}

    {{localize 'DS4.ItemTypeTalentPlural'}}

    {{#> ifHasItemOfType itemsArray=itemsByType.talent dataType='talent' }}
      {{> talentListHeader}} {{#each itemsByType.talent as |item id|}} {{> talentListEntry item=item}} {{/each}}
    {{/ifHasItemOfType}}

    {{localize 'DS4.ItemTypeRacialAbilityPlural'}}

    {{#> ifHasItemOfType itemsArray=itemsByType.racialAbility dataType='racialAbility' }}
      {{> baseItemListHeader}} {{#each itemsByType.racialAbility as |item id|}} {{> baseItemListEntry item=item}} {{/each}}
    {{/ifHasItemOfType}}

    {{localize 'DS4.ItemTypeLanguagePlural'}}

    {{#> ifHasItemOfType itemsArray=itemsByType.language dataType='language' }}
      {{> baseItemListHeader}} {{#each itemsByType.language as |item id|}} {{> baseItemListEntry item=item}} {{/each}}
    {{/ifHasItemOfType}}

    {{localize 'DS4.ItemTypeAlphabetPlural'}}

    {{#> ifHasItemOfType itemsArray=itemsByType.alphabet dataType='alphabet' }}
      {{> baseItemListHeader}} {{#each itemsByType.alphabet as |item id|}} {{> baseItemListEntry item=item}} {{/each}}
    {{/ifHasItemOfType}}