moved items tab of char sheet into partial
This commit is contained in:
parent
bdae6b2f2f
commit
47c45ee87d
3 changed files with 32 additions and 27 deletions
|
@ -31,7 +31,10 @@ Hooks.once("init", async function () {
|
|||
});
|
||||
|
||||
async function registerHandlebarsPartials() {
|
||||
const templatePaths = ["systems/ds4/templates/item/partials/description.hbs"];
|
||||
const templatePaths = [
|
||||
"systems/ds4/templates/item/partials/description.hbs",
|
||||
"systems/ds4/templates/actor/partials/items.hbs",
|
||||
];
|
||||
return loadTemplates(templatePaths);
|
||||
}
|
||||
|
||||
|
|
|
@ -60,31 +60,7 @@
|
|||
{{editor content=data.biography target="data.biography" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
|
||||
{{!-- Owned Items Tab --}}
|
||||
<div class="tab items" data-group="primary" data-tab="items">
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
<div class="item-image"></div>
|
||||
<div class="item-name">Name</div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="Create item" data-type="weapon"
|
||||
><i class="fas fa-plus"></i> Add item</a
|
||||
>
|
||||
</div>
|
||||
</li>
|
||||
{{#each actor.items as |item id|}}
|
||||
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||
<div class="item-image">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
||||
</div>
|
||||
<h4 class="item-name">{{item.name}}</h4>
|
||||
<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>
|
||||
{{/each}}
|
||||
</ol>
|
||||
</div>
|
||||
{{!-- Items Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/items.hbs}}
|
||||
</section>
|
||||
</form>
|
||||
|
|
26
src/templates/actor/partials/items.hbs
Normal file
26
src/templates/actor/partials/items.hbs
Normal file
|
@ -0,0 +1,26 @@
|
|||
{{!-- Tab with overview and quick-actions on owned items --}}
|
||||
<div class="tab items" data-group="primary" data-tab="items">
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
<div class="item-image"></div>
|
||||
<div class="item-name">Name</div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="Create item" data-type="weapon"
|
||||
><i class="fas fa-plus"></i> Add item</a
|
||||
>
|
||||
</div>
|
||||
</li>
|
||||
{{#each actor.items as |item id|}}
|
||||
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||
<div class="item-image">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
||||
</div>
|
||||
<h4 class="item-name">{{item.name}}</h4>
|
||||
<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>
|
||||
{{/each}}
|
||||
</ol>
|
||||
</div>
|
Loading…
Reference in a new issue