added trinket list to char sheet

This commit is contained in:
Gesina Schwalbe 2020-12-29 21:27:50 +01:00
parent b71f229e16
commit 3184de0e7a

View file

@ -1,5 +1,4 @@
{{!-- TODO: hover shows complete name of abbreviations --}}
{{!-- TODO: try to use alias for the item type via HBS with and lookup --}}
{{!-- TODO: Where possible use icons with complete names as hovers instead of long names --}}
{{!-- Tab with overview and quick-actions on owned items --}}
<div class="tab items" data-group="primary" data-tab="items">
@ -163,4 +162,50 @@
{{/with}}
{{/each}}
</ol>
{{!-- TRINKET --}}
<h4 class="items-list-title">{{localize "DS4.ItemTypeTrinket"}}</h4> {{!-- SPECIFIC --}}
<ol class="items-list">
<li class="item flexrow item-header">
<div class="flexrow flex15">
<div></div> {{!-- equipped --}} {{!-- SPECIFIC --}}
<div class="item-image"></div>
<div>#</div> {{!-- amount --}}
</div>
<div class="item-name flex2">{{localize "DS4.ItemName"}}</div>
<div class="flex4">{{localize "DS4.Description"}}</div>
{{!-- add button --}}
<div class="item-controls"> {{!-- SPECIFIC --}}
<a class="item-control item-create" title="Create item" data-type="trinket"><i class="fas fa-plus"></i>
{{localize "DS4.ActionAddItem"}}</a> {{!-- SPECIFIC --}}
</div>
</li>
{{#each itemsByType.trinket as |item id|}} {{!-- SPECIFIC --}}
{{#with item.data.data as |itemData|}}
<li class="item flexrow" data-item-id="{{item._id}}">
<div class="flexrow flex15">
{{!-- equipped? --}}
{{#if itemData.equipped}}<i class="fas fa-check-square"></i>
{{else}}<i class="far fa-square"></i>
{{/if}} {{!--SPECIFIC --}}
{{!-- image --}}
<div class="item-image">
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
</div>
{{!-- amount --}}
<div>{{itemData.quantity}}</div>
</div>
{{!-- name --}}
<h4 class="item-name flex2">{{item.name}}</h4>
{{!-- description --}}
<div class="flex4 item-description">{{{itemData.description}}}</div>
{{!-- edit & delete buttons --}}
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/with}}
{{/each}}
</ol>
</div>