From 47c45ee87d0de2bd3cf9fadd13141923226d0093 Mon Sep 17 00:00:00 2001 From: Gesina Schwalbe Date: Mon, 28 Dec 2020 20:38:02 +0100 Subject: [PATCH] moved items tab of char sheet into partial --- src/module/ds4.ts | 5 ++++- src/templates/actor/actor-sheet.html | 28 ++------------------------ src/templates/actor/partials/items.hbs | 26 ++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 27 deletions(-) create mode 100644 src/templates/actor/partials/items.hbs diff --git a/src/module/ds4.ts b/src/module/ds4.ts index 002e9314..ea4f4486 100644 --- a/src/module/ds4.ts +++ b/src/module/ds4.ts @@ -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); } diff --git a/src/templates/actor/actor-sheet.html b/src/templates/actor/actor-sheet.html index 55dbbf83..4aa0540d 100644 --- a/src/templates/actor/actor-sheet.html +++ b/src/templates/actor/actor-sheet.html @@ -60,31 +60,7 @@ {{editor content=data.biography target="data.biography" button=true owner=owner editable=editable}} - {{!-- Owned Items Tab --}} -
-
    -
  1. -
    -
    Name
    - -
  2. - {{#each actor.items as |item id|}} -
  3. -
    - -
    -

    {{item.name}}

    -
    - - -
    -
  4. - {{/each}} -
-
+ {{!-- Items Tab --}} + {{> systems/ds4/templates/actor/partials/items.hbs}} diff --git a/src/templates/actor/partials/items.hbs b/src/templates/actor/partials/items.hbs new file mode 100644 index 00000000..4b75dd2e --- /dev/null +++ b/src/templates/actor/partials/items.hbs @@ -0,0 +1,26 @@ +{{!-- Tab with overview and quick-actions on owned items --}} +
+
    +
  1. +
    +
    Name
    + +
  2. + {{#each actor.items as |item id|}} +
  3. +
    + +
    +

    {{item.name}}

    +
    + + +
    +
  4. + {{/each}} +
+
\ No newline at end of file