foundryvtt-reve-de-dragon/templates/item-sheet.html

65 lines
3.1 KiB
HTML
Raw Normal View History

2020-05-21 21:48:20 +02:00
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
2021-03-25 09:28:36 +01:00
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
2020-05-21 21:48:20 +02:00
<div class="header-fields">
2021-03-25 09:28:36 +01:00
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
2020-05-21 21:48:20 +02:00
<div class="resource">
<label>Quantity</label>
2022-06-12 09:46:58 +02:00
<input type="text" name="system.quantity" value="{{data.quantity}}" data-dtype="Number"/>
2020-05-21 21:48:20 +02:00
</div>
<div class="resource">
<label>Weight</label>
2022-06-12 09:46:58 +02:00
<input type="text" name="system.weight" value="{{data.weight}}" data-dtype="Number"/>
2020-05-21 21:48:20 +02:00
</div>
</div>
</header>
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="description">Description</a>
<a class="item" data-tab="attributes">Attributes</a>
</nav>
{{!-- Sheet Body --}}
<section class="sheet-body">
{{!-- Description Tab --}}
<div class="tab" data-group="primary" data-tab="description">
2022-06-12 09:46:58 +02:00
{{editor data.description target="system.description" button=true owner=owner editable=editable}}
2020-05-21 21:48:20 +02:00
</div>
{{!-- Attributes Tab --}}
<div class="tab attributes" data-group="primary" data-tab="attributes">
<header class="attributes-header flexrow">
<span class="attribute-key">Attribute Key</span>
<span class="attribute-value">Value</span>
<span class="attribute-label">Label</span>
<span class="attribute-dtype">Data Type</span>
<a class="attribute-control" data-action="create"><i class="fas fa-plus"></i></a>
</header>
<ol class="attributes-list">
{{#each data.attributes as |attr key|}}
<li class="attribute flexrow" data-attribute="{{key}}">
2022-06-12 09:46:58 +02:00
<input class="attribute-key" type="text" name="system.attributes.{{key}}.key" value="{{key}}"/>
2020-05-21 21:48:20 +02:00
{{#if attr.isCheckbox}}
2022-06-12 09:46:58 +02:00
<label class="attribute-value checkbox"><input type="checkbox" name="system.attributes.{{key}}.value" {{checked attr.value}}/></label>
2020-05-21 21:48:20 +02:00
{{else}}
2022-06-12 09:46:58 +02:00
<input class="attribute-value" type="text" name="system.attributes.{{key}}.value" value="{{attr.value}}" data-dtype="{{attr.dtype}}"/>
2020-05-21 21:48:20 +02:00
{{/if}}
2022-06-12 09:46:58 +02:00
<input class="attribute-label" type="text" name="system.attributes.{{key}}.label" value="{{attr.label}}"/>
<select class="attribute-dtype" name="system.attributes.{{key}}.dtype">
2020-05-21 21:48:20 +02:00
{{#select attr.dtype}}
{{#each ../dtypes as |t|}}
<option value="{{t}}">{{t}}</option>
{{/each}}
{{/select}}
</select>
<a class="attribute-control" data-action="delete"><i class="fas fa-trash"></i></a>
</li>
{{/each}}
</ol>
</div>
</section>
</form>