Files

63 lines
4.2 KiB
HTML

{{!-- XP Summary banner --}}
<div class="xp-summary" style="display:flex;flex-direction:row;align-items:center;gap:1rem;background:rgba(120,20,20,0.08);border:1px solid rgba(120,20,20,0.3);border-radius:4px;padding:0.3rem 0.75rem;margin-bottom:0.5rem;width:100%;box-sizing:border-box;">
<div class="xp-block" style="display:flex;flex-direction:row;align-items:center;gap:0.4rem;flex:1;justify-content:center;">
<label class="xp-label" style="font-size:0.75rem;text-transform:uppercase;white-space:nowrap;">{{localize 'l5r5e.advancements.total'}}</label>
<input class="xp-value" type="number" name="system.xp_total" value="{{data.system.xp_total}}" min="0" style="width:3.5rem;text-align:center;" {{#unless data.editable_not_soft_locked}}disabled{{/unless}} />
</div>
<div class="xp-block" style="display:flex;flex-direction:row;align-items:center;gap:0.4rem;flex:1;justify-content:center;border-left:1px solid rgba(120,20,20,0.25);padding-left:1rem;">
<label class="xp-label" style="font-size:0.75rem;text-transform:uppercase;white-space:nowrap;">{{localize 'l5r5e.advancements.spent'}}</label>
<input class="xp-value" type="number" value="{{data.system.xp_spent}}" disabled style="width:3.5rem;text-align:center;" />
</div>
<div class="xp-block" style="display:flex;flex-direction:row;align-items:center;gap:0.4rem;flex:1;justify-content:center;border-left:1px solid rgba(120,20,20,0.25);padding-left:1rem;">
<label class="xp-label" style="font-size:0.75rem;text-transform:uppercase;white-space:nowrap;">{{localize 'l5r5e.advancements.saved'}}</label>
<input class="xp-value" type="number" value="{{data.system.xp_saved}}" disabled style="width:3.5rem;text-align:center;" />
</div>
</div>
{{!-- School progession --}}
<fieldset class="advancement advancements-body">
<legend class="tools">
{{#if data.system.identity.school_curriculum_journal.id}}
<a class="school-journal-link"><i class="fas fa-file-alt"></i></a> {{data.system.identity.school_curriculum_journal.name}}
{{else}}
<i class="fas fa-question-circle" title="{{localize 'l5r5e.advancements.school_curriculum_journal'}}"></i> {{localize 'l5r5e.advancements.advancement'}}
{{/if}}
{{#if data.editable_not_soft_locked}}
<a data-item-type="advancement" class="advancement-control item-add" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a>
{{/if}}
</legend>
<table>
<thead class="flex">
<tr class="flexrow row">
<th class="name">{{localize 'l5r5e.sheets.name'}}</th>
<th class="xp">{{localize 'l5r5e.advancements.spent'}}</th>
{{#if data.editable_not_soft_locked}}
<th class="actions"></th>
{{/if}}
</tr>
</thead>
<tbody class="flex">
{{#each data.advancementsListByRank as |rankObject|}}
{{#each rankObject.list as |advancement advancementId|}}
{{> 'systems/l5rx-chiaroscuro/templates/actors/character/advancement-school.html' advancement=advancement rank=rankObject.rank editable=../../data.editable_not_soft_locked}}
{{/each}}
{{#ifCond rankObject.rank '>' 0}}
{{#if ../data.editable_not_soft_locked}}
{{#ifCond ../data.system.identity.school_rank '<' 6}}
{{#ifCond (ifCond ../data.system.identity.school_rank '==' rankObject.rank) '&&' (ifCond rankObject.spent.curriculum '>=' rankObject.goal)}}
<tr class="tfoot flexrow row">
<th>
<button type="button" name="validate-curriculum">
<i class='fas fa-check-square'></i> {{ localize 'l5r5e.advancements.curriculum_validate'}}
</button>
</th>
</tr>
{{/ifCond}}
{{/ifCond}}
{{/if}}
{{/ifCond}}
{{/each}}
</tbody>
</table>
</fieldset>