diff --git a/client/components/cards/minicard.css b/client/components/cards/minicard.css index f3a9e8973..b3e12c5da 100644 --- a/client/components/cards/minicard.css +++ b/client/components/cards/minicard.css @@ -120,6 +120,13 @@ max-width: 100px; margin-right: 4px; } +.minicard .minicard-custom-field-item-fullwidth { + flex-grow: 1; + display: block; + word-wrap: break-word; + max-width: 100%; + margin-right: 4px; +} .minicard .handle { width: 20px; height: 20px; diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade index b6a4b75e3..503dd576f 100644 --- a/client/components/cards/minicard.jade +++ b/client/components/cards/minicard.jade @@ -71,25 +71,45 @@ template(name="minicard") if definition.showOnCard if trueValue .minicard-custom-field + // If there is custom field label, show label at left, + // and value at right if definition.showLabelOnMiniCard .minicard-custom-field-item +viewer = definition.name - .minicard-custom-field-item - if $eq definition.type "currency" - +viewer - = formattedCurrencyCustomFieldValue(definition) - else if $eq definition.type "date" - .date - +minicardCustomFieldDate - else if $eq definition.type "checkbox" - .materialCheckBox(class="{{#if value }}is-checked{{/if}}") - else if $eq definition.type "stringtemplate" - +viewer - = formattedStringtemplateCustomFieldValue(definition) - else - +viewer - = trueValue + .minicard-custom-field-item + if $eq definition.type "currency" + +viewer + = formattedCurrencyCustomFieldValue(definition) + else if $eq definition.type "date" + .date + +minicardCustomFieldDate + else if $eq definition.type "checkbox" + .materialCheckBox(class="{{#if value }}is-checked{{/if}}") + else if $eq definition.type "stringtemplate" + +viewer + = formattedStringtemplateCustomFieldValue(definition) + else + +viewer + = trueValue + else + // If there is no custom field label, + // show value full width + .minicard-custom-field-item-fullwidth + if $eq definition.type "currency" + +viewer + = formattedCurrencyCustomFieldValue(definition) + else if $eq definition.type "date" + .date + +minicardCustomFieldDate + else if $eq definition.type "checkbox" + .materialCheckBox(class="{{#if value }}is-checked{{/if}}") + else if $eq definition.type "stringtemplate" + +viewer + = formattedStringtemplateCustomFieldValue(definition) + else + +viewer + = trueValue if showAssignee if getAssignees