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.
|
2023-06-25 23:55:08 +02:00
|
|
|
!-- @param item: The item.
|
2021-02-26 01:08:55 +01:00
|
|
|
!-- @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.
|
|
|
|
--}}
|
2023-07-27 01:05:35 +02:00
|
|
|
<li class="ds4-embedded-document-list__row item" data-item-uuid="{{item.uuid}}" data-item-id="{{item.id}}">
|
2021-02-26 01:08:55 +01:00
|
|
|
{{!-- equipped --}}
|
|
|
|
{{#if isEquipable}}
|
2023-06-25 23:55:08 +02:00
|
|
|
<input class="ds4-embedded-document-list__editable ds4-embedded-document-list__editable--checkbox change-item"
|
|
|
|
type="checkbox" {{checked item.system.equipped}} data-dtype="Boolean" data-property="system.equipped"
|
2021-02-26 01:08:55 +01:00
|
|
|
title="{{localize 'DS4.ItemEquipped'}}">
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{!-- image --}}
|
2023-06-25 23:55:08 +02:00
|
|
|
{{> systems/ds4/templates/sheets/shared/components/rollable-image.hbs rollable=(and item.system.rollable
|
|
|
|
@root/editable)
|
|
|
|
src=item.img alt=(localize "DS4.DocumentImageAltText" name=item.name) title=item.name
|
|
|
|
rollableTitle=(localize "DS4.RollableImageRollableTitle" name=item.name) rollableClass="rollable-item"}}
|
2021-02-26 01:08:55 +01:00
|
|
|
|
|
|
|
{{!-- amount --}}
|
|
|
|
{{#if hasQuantity}}
|
2023-06-25 23:55:08 +02:00
|
|
|
<input class="ds4-embedded-document-list__editable change-item" type="number" min="0" step="1"
|
|
|
|
value="{{item.system.quantity}}" data-dtype="Number" data-property="system.quantity"
|
|
|
|
title="{{localize 'DS4.Quantity'}}" />
|
2021-02-26 01:08:55 +01:00
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{!-- name --}}
|
2023-06-25 23:55:08 +02:00
|
|
|
<input class="ds4-embedded-document-list__editable change-item" type="text" value="{{item.name}}"
|
|
|
|
data-dtype="String" data-property="name" title="{{htmlToPlainText item.system.description}}" />
|
2021-02-26 01:08:55 +01:00
|
|
|
|
|
|
|
{{!-- item type specifics --}}
|
|
|
|
{{#if @partial-block }}
|
|
|
|
{{> @partial-block}}
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{!-- description --}}
|
|
|
|
{{#unless hideDescription}}
|
2023-06-25 23:55:08 +02:00
|
|
|
<div class="ds4-embedded-document-list__description" title="{{htmlToPlainText item.system.description}}">
|
|
|
|
{{{item.system.description}}}</div>
|
2021-02-26 01:08:55 +01:00
|
|
|
{{/unless}}
|
|
|
|
|
2021-07-22 02:02:35 +02:00
|
|
|
{{!-- control button group --}}
|
2022-01-21 03:22:17 +01:00
|
|
|
{{> systems/ds4/templates/sheets/shared/components/control-button-group.hbs documentType="item"
|
2021-07-22 02:02:35 +02:00
|
|
|
editTitle="DS4.UserInteractionEditItemTitle" deleteTitle="DS4.UserInteractionDeleteItemTitle"}}
|
2021-02-26 01:08:55 +01:00
|
|
|
</li>
|