ds4/src/templates/actor/partials/items.hbs

63 lines
3.1 KiB
Handlebars
Raw Normal View History

{{!-- 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">
{{!-- WEAPONS --}}
<h3>{{localize "DS4.ItemTypeWeapon"}}</h3> {{!-- SPECIFIC --}}
<ol class="items-list">
<li class="item flexrow item-header">
<div class="flexrow flex15">
<div></div> {{!-- equipped --}}
<div class="item-image"></div>
<div>#</div> {{!-- amount --}}
</div>
2020-12-29 16:29:44 +01:00
<div class="item-name flex2">{{localize "DS4.ItemName"}}</div>
<div>{{localize "DS4.AttackTypeAbbr"}}</div> {{!-- SPECIFIC --}}
<div class="flexrow flex15">
2020-12-29 16:29:44 +01:00
<div>{{localize "DS4.WeaponBonusAbbr"}}</div> {{!-- SPECIFIC --}}
<div>{{localize "DS4.OpponentDefenseAbbr"}}</div> {{!-- SPECIFIC --}}
</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="weapon"><i class="fas fa-plus"></i>
2020-12-29 16:29:44 +01:00
{{localize "DS4.ActionAddItem"}}</a> {{!-- SPECIFIC --}}
</div>
</li>
{{#each itemsByType.weapon 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>
{{!-- item specifics --}}
<div>{{lookup ../../config.attackTypes itemData.attackType}}</div> {{!-- SPECIFIC --}}
<div class="flexrow flex15">
<div>{{itemData.weaponBonus}}</div> {{!-- SPECIFIC --}}
<div>{{itemData.opponentDefense}}</div> {{!-- SPECIFIC --}}
</div>
{{!-- 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>