mirror of
https://github.com/RoY7x/worldbuilding.git
synced 2025-04-30 02:31:41 -04:00
- This commit adds a proof-of-concept for retrieving actor template types. These are actors using the `worldbuilding.isTemplate` flag set to true. If there are multiple actors with that flag set to true, clicking the create actor button will pull up a prompt to choose from one of those types, which will then create an actor by duplicating the template actor's data. The flag will be unset on the new actor.
45 lines
2 KiB
HTML
45 lines
2 KiB
HTML
<form class="{{cssClass}}" autocomplete="off">
|
|
<header class="sheet-header">
|
|
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
|
<div class="header-fields">
|
|
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name"/></h1>
|
|
<div class="resource">
|
|
<label>Quantity</label>
|
|
<input type="text" name="data.quantity" value="{{data.quantity}}" data-dtype="Number"/>
|
|
</div>
|
|
<div class="resource">
|
|
<label>Weight</label>
|
|
<input type="text" name="data.weight" value="{{data.weight}}" data-dtype="Number"/>
|
|
</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">
|
|
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
|
</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>
|
|
|
|
{{!-- Render the attribute list partial. --}}
|
|
{{> "systems/worldbuilding/templates/parts/sheet-attributes.html" attributes=data.attributes dtypes=dtypes}}
|
|
</div>
|
|
</section>
|
|
</form>
|