diff --git a/src/scss/global/_flex.scss b/src/scss/global/_flex.scss index ca8ae406..271c64b3 100644 --- a/src/scss/global/_flex.scss +++ b/src/scss/global/_flex.scss @@ -32,6 +32,10 @@ } } +.flexnowrap { + flex-wrap: nowrap; +} + .flexcol { display: flex; flex-direction: column; diff --git a/src/templates/actor/partials/items.hbs b/src/templates/actor/partials/items.hbs index 28f8be43..792891f4 100644 --- a/src/templates/actor/partials/items.hbs +++ b/src/templates/actor/partials/items.hbs @@ -1,130 +1,154 @@ {{!-- TODO: For items list: only show header, if list is not empty --}} -{{!-- TODO: Reduce code duplications --}} -{{!-- TODO: Change from flex layout to grid layout --}} -{{!-- Tab with overview and quick-actions on owned items --}} + + +{{!-- ======================================================================== --}} +{{!-- INLINE PARTIAL DEFINITIONS --}} +{{!-- ======================================================================== --}} + +{{!-- +!-- Render an "add" button for a given data type. +!-- +!-- @param datType: hand over the dataType to the partial as hash parameter +--}} +{{#*inline "addButton"}} +
+{{/inline}} +{{!-- +!-- Render a group of an "edit" and a "delete" button for the current item. +!-- The current item is defined by the data-item-id HTML property of the parent li element. +--}} +{{#*inline "itemControlButtons"}} + +{{/inline}} + + +{{!-- +!-- Render a header row for a given data type. +!-- It is a flexbox with a child for each column head. +!-- An "equipped" heading is rendered except for the case dataType==='equipment'. +!-- The partial assumes a variable dataType to be given in the context. +!-- If the partial is called with a partial block, the partial block +!-- content is inserted before the description heading. + +!-- @param datType: hand over the dataType to the partial as hash parameter +!-- @param partial-block: hand over custom children of the flexbox in the partial block. +--}} +{{#*inline "listHeader" }} +