2021-01-06 01:24:37 +01:00
|
|
|
{{!-- ======================================================================== --}}
|
|
|
|
{{!-- INLINE PARTIAL DEFINITIONS --}}
|
|
|
|
{{!-- ======================================================================== --}}
|
2021-01-06 11:52:11 +01:00
|
|
|
{{!-- TODO: remove duplicate add and delete button definition --}}
|
2021-01-06 01:24:37 +01:00
|
|
|
|
2021-01-06 16:29:02 +01:00
|
|
|
|
|
|
|
{{!--
|
|
|
|
!-- Render an input element for a rank value property of an item.
|
2021-01-06 01:24:37 +01:00
|
|
|
!--
|
2021-01-06 16:29:02 +01:00
|
|
|
!-- @param item: the item
|
|
|
|
!-- @param property: the key of the property in item.data.data (if 'base', the max value is set automatically)
|
|
|
|
!-- @param disabled: if given, is placed plainly into the input as HTML property;
|
|
|
|
!-- meant to be set to "disabled" to disable the input element
|
2021-01-06 01:24:37 +01:00
|
|
|
--}}
|
|
|
|
{{#*inline "talentRankValue"}}
|
|
|
|
<input class="item-num-val item-change" data-dtype="Number" type="number" min="0" step="1"
|
2021-01-06 11:52:11 +01:00
|
|
|
{{#if (eq property 'base') }}max="{{item.data.data.rank.max}}"{{/if}}
|
2021-01-06 11:39:39 +01:00
|
|
|
{{disabled}}
|
2021-01-06 11:52:11 +01:00
|
|
|
data-property="data.rank.{{property}}" value="{{lookup item.data.data.rank property}}"
|
2021-01-06 01:24:37 +01:00
|
|
|
title="{{localize localizeString}}" />
|
|
|
|
{{/inline}}
|
|
|
|
|
2021-01-06 16:29:02 +01:00
|
|
|
|
2021-01-06 01:24:37 +01:00
|
|
|
{{!--
|
|
|
|
!-- 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
|
|
|
|
!-- @param partial-block: hand over custom children of the flexbox in the partial block.
|
|
|
|
--}}
|
|
|
|
{{#*inline "talentListEntry"}}
|
|
|
|
<li class="item flexrow" data-item-id="{{item._id}}">
|
|
|
|
{{!-- image --}}
|
|
|
|
<div class="flex05 item-image">
|
|
|
|
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
|
|
|
</div>
|
|
|
|
{{!-- name --}}
|
|
|
|
<input class="flex2 item-name item-change" type="text" value="{{item.name}}" data-dtype="String"
|
|
|
|
data-property="name" title="{{localize 'DS4.ItemName'}}">
|
|
|
|
<div class="flex3 flexrow talent-ranks-equation">
|
|
|
|
{{!-- acquired rank --}}
|
|
|
|
{{> talentRankValue item=item property='base' localizeString='DS4.TalentRankBase'}}
|
|
|
|
<span> ( of </span>
|
|
|
|
{{!-- maximum acquirable rank --}}
|
|
|
|
{{> talentRankValue item=item property='max' localizeString='DS4.TalentRankMax'}}
|
|
|
|
<span>) + </span>
|
|
|
|
{{!-- additional ranks --}}
|
|
|
|
{{> talentRankValue item=item property='mod' localizeString='DS4.TalentRankMod'}}
|
|
|
|
<span> = </span>
|
|
|
|
{{!-- derived total rank --}}
|
2021-01-06 11:39:39 +01:00
|
|
|
{{> talentRankValue item=item property='total' localizeString='DS4.TalentRankTotal' disabled='disabled'}}
|
2021-01-06 01:24:37 +01:00
|
|
|
</div>
|
|
|
|
{{!-- description --}}
|
|
|
|
<div class="flex4 item-description">{{{item.data.data.description}}}</div>
|
|
|
|
{{!-- control buttons --}}
|
2021-01-06 16:29:02 +01:00
|
|
|
{{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
|
2021-01-06 01:24:37 +01:00
|
|
|
</li>
|
|
|
|
{{/inline}}
|
|
|
|
|
|
|
|
|
|
|
|
{{!-- ======================================================================== --}}
|
|
|
|
|
|
|
|
|
|
|
|
<div class="tab items" data-group="primary" data-tab="talents">
|
|
|
|
<ol class="items-list">
|
|
|
|
<li class="item flexrow item-header">
|
|
|
|
{{!-- image --}}
|
|
|
|
<div class="flex05 item-image"></div>
|
|
|
|
{{!-- name --}}
|
|
|
|
<div class="flex2 item-name">{{localize 'DS4.ItemName'}}</div>
|
|
|
|
{{!-- rank info --}}
|
|
|
|
<div class="flex3">{{localize 'DS4.TalentRank'}}</div>
|
|
|
|
{{!-- description --}}
|
2021-01-06 12:02:40 +01:00
|
|
|
<div class="flex4">{{localize 'DS4.HeadingDescription'}}</div>
|
2021-01-06 01:24:37 +01:00
|
|
|
{{!-- add button --}}
|
2021-01-06 16:29:02 +01:00
|
|
|
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='talent' }}
|
2021-01-06 01:24:37 +01:00
|
|
|
</li>
|
|
|
|
{{#each itemsByType.talent as |item id|}}
|
|
|
|
{{> talentListEntry item=item}}
|
|
|
|
{{/each}}
|
|
|
|
</ol>
|
|
|
|
</div>
|