feat: add a special actor sheet that is displayed to users with the LIMITED permission for the actor
This actor sheet only shows image, name, and biography/description of the actor.
This commit is contained in:
parent
63e888e39d
commit
fc9f4b49b5
9 changed files with 52 additions and 4 deletions
|
@ -11,7 +11,7 @@ SPDX-License-Identifier: MIT
|
|||
!-- @param @partial-block: Properties to render in the second header row.
|
||||
--}}
|
||||
<header class="ds4-actor-header">
|
||||
<img class="ds4-actor-header__img" src="{{data.img}}" data-edit="img" alt="{{localize 'DS4.ActorImageAltText'}}"
|
||||
<img class="ds4-actor-header__img{{#if editable}} ds4-actor-header__img--editable{{/if}}" src="{{data.img}}" data-edit="img" alt="{{localize 'DS4.ActorImageAltText'}}"
|
||||
title="{{data.name}}" height="100" width="100" />
|
||||
<div class="ds4-actor-header__data">
|
||||
<div class="ds4-actor-header__data-row">
|
||||
|
@ -20,10 +20,14 @@ SPDX-License-Identifier: MIT
|
|||
<input class="ds4-actor-header__name-input" name="name" type="text" id="name-{{data._id}}"
|
||||
value="{{data.name}}" placeholder="{{localize 'DS4.ActorName'}}" />
|
||||
</h1>
|
||||
{{#unless limited}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/actor-progression.hbs}}
|
||||
{{/unless}}
|
||||
</div>
|
||||
{{#unless limited}}
|
||||
<div class="ds4-actor-header__data-row">
|
||||
{{> @partial-block}}
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
</header>
|
||||
|
|
10
templates/sheets/actor/components/description.hbs
Normal file
10
templates/sheets/actor/components/description.hbs
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-description">
|
||||
{{editor content=data.data.baseInfo.description target="data.baseInfo.description" button=true owner=owner
|
||||
editable=editable}}
|
||||
</div>
|
21
templates/sheets/actor/limited-sheet.hbs
Normal file
21
templates/sheets/actor/limited-sheet.hbs
Normal file
|
@ -0,0 +1,21 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2022 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<form class="{{cssClass}} ds4-sheet-form" autocomplete="off">
|
||||
{{!-- Header --}}
|
||||
{{#> systems/ds4/templates/sheets/actor/components/actor-header.hbs}}
|
||||
{{/systems/ds4/templates/sheets/actor/components/actor-header.hbs}}
|
||||
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="ds4-sheet-body">
|
||||
{{#if (eq data.type 'character')}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/biography.hbs}}
|
||||
{{else}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/description.hbs}}
|
||||
{{/if}}
|
||||
</section>
|
||||
</form>
|
|
@ -5,6 +5,5 @@ SPDX-License-Identifier: MIT
|
|||
--}}
|
||||
|
||||
<div class="ds4-sheet-tab tab description" data-group="primary" data-tab="description">
|
||||
{{editor content=data.data.baseInfo.description target="data.baseInfo.description" button=true owner=owner
|
||||
editable=editable}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/description.hbs}}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue