diff --git a/src/lang/en.json b/src/lang/en.json index 9da9f5ec..de17c09b 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -1,5 +1,6 @@ { "DS4.UserInteractionAddItem": "Add item", + "DS4.NotOwned": "No owner", "DS4.Description": "Description", "DS4.DescriptionAbbr": "Desc", "DS4.Details": "Details", @@ -16,7 +17,8 @@ "DS4.Quantity": "Quantity", "DS4.PriceGold": "Price (Gold)", "DS4.StorageLocation": "Stored at", - "DS4.ItemEquipped": "Item equipped?", + "DS4.ItemEquipped": "Equipped", + "DS4.ItemOwner": "Owner", "DS4.ItemAvailability": "Availability", "DS4.ItemAvailabilityHamlet": "Hamlet", "DS4.ItemAvailabilityVilage": "Village", diff --git a/src/module/item/item-sheet.ts b/src/module/item/item-sheet.ts index b060341e..ac8197aa 100644 --- a/src/module/item/item-sheet.ts +++ b/src/module/item/item-sheet.ts @@ -26,7 +26,7 @@ export class DS4ItemSheet extends ItemSheet { /** @override */ getData(): ItemSheetData { - const data = { ...super.getData(), config: CONFIG.DS4 }; + const data = { ...super.getData(), config: CONFIG.DS4, isOwned: this.item.isOwned, actor: this.item.actor }; console.log(data); return data; } diff --git a/src/templates/actor/partials/items.hbs b/src/templates/actor/partials/items.hbs index 0f8da315..cda5f1e4 100644 --- a/src/templates/actor/partials/items.hbs +++ b/src/templates/actor/partials/items.hbs @@ -1,4 +1,6 @@ -{{!-- TODO: Where possible use icons with complete names as hovers instead of long names --}} +{{!-- TODO: For items list: only show header, if list is not empty --}} +{{!-- TODO: Reduce code duplications --}} +{{!-- TODO: Change from flex layout to grid layout --}} {{!-- Tab with overview and quick-actions on owned items --}}
diff --git a/src/templates/item/partials/description.hbs b/src/templates/item/partials/description.hbs index 56c8fdd2..fdfe6754 100644 --- a/src/templates/item/partials/description.hbs +++ b/src/templates/item/partials/description.hbs @@ -1,27 +1,29 @@
+ {{#if isOwned}}
- + + {{actor.name}} +
+ {{#if (ne data.equipped undefined)}}
+ + +
+ {{/if}} +
+
- +
-
- - -
-
- - -
+ {{else}} + {{localize "DS4.NotOwned"}} + {{/if}} +
+
+ {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
- {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
\ No newline at end of file diff --git a/src/templates/item/partials/details.hbs b/src/templates/item/partials/details.hbs index 2d5b3f0c..0e57a780 100644 --- a/src/templates/item/partials/details.hbs +++ b/src/templates/item/partials/details.hbs @@ -1,5 +1,20 @@ {{!-- The item tab for details. --}}
{{!-- As you add new fields, add them in here! --}} -

Nothing to see yet.

+
+
+ + +
+
+ + +
+
\ No newline at end of file