daggerheart/templates/sheets/global/partials/inventory-fieldset-items-V2.hbs
joaquinpereyra98 b8930b18a4
Bug/103 enrich htmlfield content before its used in applications (#369)
* FIX: Add enritch to HTMLField
FIX: Remove no-HTMLField from Manifest
FIX: Convert Scar's HTMLField to StringField
FIX: Remove unused HTMLField

* REMOVE unused hanldebars helpers

* FEAT: add inventory-fieldset-items-V2 and inventory-item-V2  partials for Actors

* FIX showLabels to hideTags

* FEAT: add template to items sheet

* FEAT: add effects tabs on ItemSheet

* FEAT: add context menus for all inventory-items

* FEAT: add resources to inventory-item template

* FEAT: add enritch on inventory-item description
FEAT: add extensible behavior on inventory-item-content
FEAT: add fade effect on item-img to roll-itmg

* FEAT: add eritch to NPC description
FIX: missing htmlFieldss on manfiest
FIX: add misisng localizations

* FIX_ minor fixes

* Little resource fix. Noone will notice ._.

* FIX: remove default list styles
FIX: .extended css reduce max-height, shorten animation duration to 0.5s, and set overflow to auto.
FIX: set enriched=notes.enriche on notes.hbs
FIX: set experience.value on sidebar.hbs
FIX: move tooltip from item-img to img-portrait on inventory-item-V2.hbs
REMOVE: unused files

---------

Co-authored-by: Joaquin Pereyra <joaquinpereyra98@users.noreply.github.com>
Co-authored-by: WBHarry <williambjrklund@gmail.com>
2025-07-19 22:21:46 +02:00

70 lines
No EOL
2.4 KiB
Handlebars

{{!--
Inventory/Domain Card Section
{{> 'daggerheart.inventory-items' }}
Parameters:
- title {string} : Localization key used for the legend.
- collection {array} : Array of items to render.
- type {string} : The type of items in the list:
- isGlassy {boolean} : If true, applies the 'glassy' class to the fieldset.
- cardView {boolean} : If true and type is 'domainCard', renders using domain card layout.
- isActor {boolean} : Passed through to inventory-item partials.
- canCreate {boolean} : If true, show createDoc anchor on legend
- inVault {boolean} : If true, the domainCard is created with inVault=true
- disabled {boolean}: If true, the ActiveEffect is created with disabled=true;
- categoryAdversary {string} : Category adversary id.
- showLabels {boolean} : If true, show label-tags else show simple tags.
- hideTooltip {boolean} : If true, disables the tooltip on the item image.
- hideControls {boolean} : If true, hides the controls inside inventory-item partials.
- hideDescription {boolean} : If true, hides the item's description.
- hideResources {boolean} : If true, hides the item's resources.
- showActions {boolean} : If true show feature's actions.
--}}
<fieldset class="{{#if isGlassy}}glassy{{/if}}">
<legend>
{{localize title}}
{{#if canCreate}}
<a data-action="createDoc" data-document-class="{{ifThen (eq type 'effect') 'ActiveEffect' 'Item' }}"
data-type="{{ifThen (eq type 'effect') 'base' type}}"
{{#if inVault}}data-in-vault="{{inVault}}"{{/if}}
{{#if disabled}} data-disabled="{{disabled}}"{{/if}}
data-tooltip="{{localize 'DOCUMENT.Create' type=''}}"
>
<i class="fa-solid fa-plus icon-button"></i>
</a>
{{/if }}
</legend>
{{#if (and cardView (eq type 'domainCard'))}}
<ul class="card-list">
{{#each collection as |item|}}
{{> 'systems/daggerheart/templates/sheets/global/partials/domain-card-item.hbs'
item=item
type='domainCard'
}}
{{/each}}
</ul>
{{else}}
<ul class="items-list">
{{#each collection as |item|}}
{{> 'daggerheart.inventory-item'
item=item
type=../type
hideControls=../hideControls
isActor=../isActor
categoryAdversary=../categoryAdversary
hideTooltip=../hideTooltip
showLabels=../showLabels
isAction=../isAction
hideResources=../hideResources
showActions=../showActions
}}
{{/each}}
</ul>
{{/if}}
</fieldset>