{{!-- 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}} {{!-- ======================================================================== --}}

{{localize 'DS4.ItemTypeTalentPlural'}}

{{#> ifHasItemOfType itemsArray=itemsByType.talent dataType='talent'}}
    {{#> systems/ds4/templates/actor/partials/item-list-header.hbs}} {{!-- rank --}}
    {{localize 'DS4.TalentRank'}}
    {{/systems/ds4/templates/actor/partials/item-list-header.hbs}} {{#each itemsByType.talent as |itemData id|}} {{#> systems/ds4/templates/actor/partials/item-list-entry.hbs itemData=itemData}} {{!-- rank --}} {{> systems/ds4/templates/actor/partials/talent-rank-equation.hbs talentRank=itemData.data.rank}} {{/systems/ds4/templates/actor/partials/item-list-entry.hbs}} {{/each}}
{{/ifHasItemOfType}}

{{localize 'DS4.ItemTypeRacialAbilityPlural'}}

{{#> ifHasItemOfType itemsArray=itemsByType.racialAbility dataType='racialAbility'}}
    {{> systems/ds4/templates/actor/partials/item-list-header.hbs}} {{#each itemsByType.racialAbility as |itemData id|}} {{> systems/ds4/templates/actor/partials/item-list-entry.hbs itemData=itemData}} {{/each}}
{{/ifHasItemOfType}}

{{localize 'DS4.ItemTypeLanguagePlural'}}

{{#> ifHasItemOfType itemsArray=itemsByType.language dataType='language'}}
    {{> systems/ds4/templates/actor/partials/item-list-header.hbs}} {{#each itemsByType.language as |itemData id|}} {{> systems/ds4/templates/actor/partials/item-list-entry.hbs itemData=itemData}} {{/each}}
{{/ifHasItemOfType}}

{{localize 'DS4.ItemTypeAlphabetPlural'}}

{{#> ifHasItemOfType itemsArray=itemsByType.alphabet dataType='alphabet'}}
    {{> systems/ds4/templates/actor/partials/item-list-header.hbs}} {{#each itemsByType.alphabet as |itemData id|}} {{> systems/ds4/templates/actor/partials/item-list-entry.hbs itemData=itemData}} {{/each}}
{{/ifHasItemOfType}}