2021-06-26 22:02:00 +02:00
|
|
|
{{!--
|
|
|
|
SPDX-FileCopyrightText: 2021 Johannes Loher
|
|
|
|
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
|
|
|
|
|
|
|
SPDX-License-Identifier: MIT
|
|
|
|
--}}
|
|
|
|
|
2021-02-26 01:08:55 +01:00
|
|
|
{{!--
|
|
|
|
!-- Render an item list entry row.
|
|
|
|
!-- If the partial is called with a partial block, the partial block
|
|
|
|
!-- content is inserted before the description.
|
|
|
|
!-- @param itemData: The data of the item.
|
|
|
|
!-- @param isEquipable: A flag to enable the equipped column.
|
|
|
|
!-- @param hasQuantity: A flag to enable the quantity column.
|
|
|
|
!-- @param hideDescription: A flag to disable the description column.
|
|
|
|
!-- @param @partial-block: Custom column headers can be passed using the partial block.
|
|
|
|
--}}
|
2021-07-25 02:40:28 +02:00
|
|
|
<li class="ds4-embedded-document-list__row item" data-item-id="{{itemData._id}}">
|
2021-02-26 01:08:55 +01:00
|
|
|
{{!-- equipped --}}
|
|
|
|
{{#if isEquipable}}
|
2021-07-23 01:11:42 +02:00
|
|
|
<input class="ds4-embedded-document-list__editable ds4-embedded-document-list__editable--checkbox change-item" type="checkbox" {{checked
|
2021-02-26 01:08:55 +01:00
|
|
|
itemData.data.equipped}} data-dtype="Boolean" data-property="data.equipped"
|
|
|
|
title="{{localize 'DS4.ItemEquipped'}}">
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{!-- image --}}
|
2021-04-13 21:40:52 +02:00
|
|
|
{{> systems/ds4/templates/sheets/actor/components/rollable-image.hbs rollable=itemData.data.rollable
|
2021-07-08 08:00:58 +02:00
|
|
|
src=itemData.img alt=(localize "DS4.DocumentImageAltText" name=itemData.name) title=itemData.name
|
2021-04-13 21:40:52 +02:00
|
|
|
rollableTitle=(localize "DS4.RollableImageRollableTitle" name=itemData.name) rollableClass="rollable-item"}}
|
2021-02-26 01:08:55 +01:00
|
|
|
|
|
|
|
{{!-- amount --}}
|
|
|
|
{{#if hasQuantity}}
|
2021-07-23 01:11:42 +02:00
|
|
|
<input class="ds4-embedded-document-list__editable change-item" type="number" min="0" step="1" value="{{itemData.data.quantity}}"
|
2021-02-26 01:08:55 +01:00
|
|
|
data-dtype="Number" data-property="data.quantity" title="{{localize 'DS4.Quantity'}}" />
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{!-- name --}}
|
2021-07-23 01:11:42 +02:00
|
|
|
<input class="ds4-embedded-document-list__editable change-item" type="text" value="{{itemData.name}}" data-dtype="String"
|
2021-02-26 01:08:55 +01:00
|
|
|
data-property="name" title="{{htmlToPlainText itemData.data.description}}" />
|
|
|
|
|
|
|
|
{{!-- item type specifics --}}
|
|
|
|
{{#if @partial-block }}
|
|
|
|
{{> @partial-block}}
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{!-- description --}}
|
|
|
|
{{#unless hideDescription}}
|
2021-07-23 01:11:42 +02:00
|
|
|
<div class="ds4-embedded-document-list__description" title="{{htmlToPlainText itemData.data.description}}">
|
2021-02-26 01:08:55 +01:00
|
|
|
{{{itemData.data.description}}}</div>
|
|
|
|
{{/unless}}
|
|
|
|
|
2021-07-22 02:02:35 +02:00
|
|
|
{{!-- control button group --}}
|
|
|
|
{{> systems/ds4/templates/sheets/actor/components/control-button-group.hbs documentType="item"
|
|
|
|
editTitle="DS4.UserInteractionEditItemTitle" deleteTitle="DS4.UserInteractionDeleteItemTitle"}}
|
2021-02-26 01:08:55 +01:00
|
|
|
</li>
|