diff --git a/assets/controllers/elements/structural_entity_select_controller.js b/assets/controllers/elements/structural_entity_select_controller.js index 15aa8811..d2aec34a 100644 --- a/assets/controllers/elements/structural_entity_select_controller.js +++ b/assets/controllers/elements/structural_entity_select_controller.js @@ -83,7 +83,7 @@ export default class extends Controller { } name += "" + escape(data.text) + ""; - return '
' + (data.image ? "" : "") + name + '
'; + return '
' + (data.image ? "" : "") + name + '
'; } renderOption(data, escape) { @@ -117,7 +117,7 @@ export default class extends Controller { let image = ""; if (data.image) { - image = ''; + image = ''; } return '
' + level_html + escape(data.text) + image + symbol_badge + parent_badge + filter_badge + '
'; diff --git a/assets/css/app/images.css b/assets/css/app/images.css index 8c6422d6..51760058 100644 --- a/assets/css/app/images.css +++ b/assets/css/app/images.css @@ -30,8 +30,20 @@ } .avatar-xs { - height: 1.2rem; - width: 1.2rem; + height: 1.2em; + width: 1.2em; object-fit: cover; border-radius: 5px; +} + +.entity-image-xs { + height: 1.2em; + width: 2.0em; + object-fit: contain; +} + +.structural-entity-select-image { + height: 1.5em; + max-width: 2.0em; + object-fit: contain; } \ No newline at end of file diff --git a/templates/helper.twig b/templates/helper.twig index 721bd867..ff0d921f 100644 --- a/templates/helper.twig +++ b/templates/helper.twig @@ -181,6 +181,13 @@ {% endif %} {% endmacro %} +{% macro entity_preview_xs(entity) %} + {# @var entity \App\Entity\Contracts\HasMasterAttachmentInterface #} + {% if entity.masterPictureAttachment and entity.masterPictureAttachment.picture and attachment_manager.fileExisting(entity.masterPictureAttachment) %} + + {% endif %} +{% endmacro %} + {% macro parameters_table(parameters) %}