description and body templ accept partial-block

This commit is contained in:
Gesina Schwalbe 2021-01-09 18:23:25 +01:00
parent 090aeab75f
commit a303296828
12 changed files with 33 additions and 24 deletions

View file

@ -3,6 +3,6 @@
{{/systems/ds4/templates/item/partials/sheet-header.hbs}} {{/systems/ds4/templates/item/partials/sheet-header.hbs}}
{{!-- Common Item body --}} {{!-- Common Item body --}}
{{> systems/ds4/templates/item/partials/body.hbs}} {{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
</form> </form>

View file

@ -12,7 +12,7 @@
</select> </select>
</div> </div>
<div class="basic-property"> <div class="basic-property">
<label>{{localize "DS4.ArmorMaterialType"}}</label> <label for="data.armorMaterialType">{{localize "DS4.ArmorMaterialType"}}</label>
<select name="data.armorMaterialType" data-type="String"> <select name="data.armorMaterialType" data-type="String">
{{#select data.armorMaterialType}} {{#select data.armorMaterialType}}
{{#each config.armorMaterialTypes as |value key|}} {{#each config.armorMaterialTypes as |value key|}}
@ -30,5 +30,5 @@
{{/systems/ds4/templates/item/partials/sheet-header.hbs}} {{/systems/ds4/templates/item/partials/sheet-header.hbs}}
{{!-- Common Item body --}} {{!-- Common Item body --}}
{{> systems/ds4/templates/item/partials/body.hbs}} {{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
</form> </form>

View file

@ -3,5 +3,5 @@
{{/systems/ds4/templates/item/partials/sheet-header.hbs}} {{/systems/ds4/templates/item/partials/sheet-header.hbs}}
{{!-- Common Item body --}} {{!-- Common Item body --}}
{{> systems/ds4/templates/item/partials/body.hbs}} {{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
</form> </form>

View file

@ -3,6 +3,6 @@
{{/systems/ds4/templates/item/partials/sheet-header.hbs}} {{/systems/ds4/templates/item/partials/sheet-header.hbs}}
{{!-- Common Item body --}} {{!-- Common Item body --}}
{{> systems/ds4/templates/item/partials/body.hbs}} {{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
</form> </form>

View file

@ -13,7 +13,9 @@
<section class="sheet-body"> <section class="sheet-body">
{{!-- Description Tab --}} {{!-- Description Tab --}}
{{> systems/ds4/templates/item/partials/description.hbs}} {{#> systems/ds4/templates/item/partials/description.hbs}}
{{> @partial-block}}
{{/systems/ds4/templates/item/partials/description.hbs}}
{{!-- Effects Tab --}} {{!-- Effects Tab --}}
{{> systems/ds4/templates/item/partials/effects.hbs}} {{> systems/ds4/templates/item/partials/effects.hbs}}

View file

@ -1,3 +1,8 @@
{{!--
Render a description tab.
Additional elements of the side-properties div can be handed over via the @partial-block.
--}}
<div class="tab flexrow" data-group="primary" data-tab="description"> <div class="tab flexrow" data-group="primary" data-tab="description">
<div class="side-properties"> <div class="side-properties">
{{#if isOwned}} {{#if isOwned}}
@ -24,6 +29,7 @@
{{else}} {{else}}
<span>{{localize "DS4.NotOwned"}}</span> <span>{{localize "DS4.NotOwned"}}</span>
{{/if}} {{/if}}
{{> @partial-block}}
</div> </div>
<div class="description" title="{{localize 'DS4.HeadingDescription'}}"> <div class="description" title="{{localize 'DS4.HeadingDescription'}}">
{{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}}

View file

@ -4,7 +4,8 @@
<div class="side-properties"> <div class="side-properties">
<div class="side-property"> <div class="side-property">
<label for="data.price">{{localize "DS4.PriceGold"}}</label> <label for="data.price">{{localize "DS4.PriceGold"}}</label>
<input type="number" min="0" data-dtype="Number" name="data.price" value="{{data.price}}" /> <input type="number" min="0" max="99999" step="0.01" data-dtype="Number"
name="data.price" value="{{data.price}}" />
</div> </div>
<div class="side-property"> <div class="side-property">
<label for="data.availability">{{localize "DS4.ItemAvailability"}}</label> <label for="data.availability">{{localize "DS4.ItemAvailability"}}</label>

View file

@ -3,6 +3,6 @@
{{/systems/ds4/templates/item/partials/sheet-header.hbs}} {{/systems/ds4/templates/item/partials/sheet-header.hbs}}
{{!-- Common Item body --}} {{!-- Common Item body --}}
{{> systems/ds4/templates/item/partials/body.hbs}} {{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
</form> </form>

View file

@ -10,5 +10,5 @@
{{/systems/ds4/templates/item/partials/sheet-header.hbs}} {{/systems/ds4/templates/item/partials/sheet-header.hbs}}
{{!-- Common Item body --}} {{!-- Common Item body --}}
{{> systems/ds4/templates/item/partials/body.hbs}} {{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
</form> </form>

View file

@ -27,6 +27,6 @@
{{/systems/ds4/templates/item/partials/sheet-header.hbs}} {{/systems/ds4/templates/item/partials/sheet-header.hbs}}
{{!-- Common Item body --}} {{!-- Common Item body --}}
{{> systems/ds4/templates/item/partials/body.hbs}} {{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
</form> </form>

View file

@ -3,5 +3,5 @@
{{/systems/ds4/templates/item/partials/sheet-header.hbs}} {{/systems/ds4/templates/item/partials/sheet-header.hbs}}
{{!-- Common Item body --}} {{!-- Common Item body --}}
{{> systems/ds4/templates/item/partials/body.hbs}} {{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
</form> </form>

View file

@ -25,5 +25,5 @@
{{/systems/ds4/templates/item/partials/sheet-header.hbs}} {{/systems/ds4/templates/item/partials/sheet-header.hbs}}
{{!-- Common Item body --}} {{!-- Common Item body --}}
{{> systems/ds4/templates/item/partials/body.hbs}} {{#> systems/ds4/templates/item/partials/body.hbs}}{{/systems/ds4/templates/item/partials/body.hbs}}
</form> </form>