From a070c5f65b14e2946e0ce2d59df75bbfbcdd29be Mon Sep 17 00:00:00 2001 From: literat Date: Mon, 11 Sep 2023 17:19:30 +0200 Subject: [PATCH] Refactor(web-twig): Use class name prefix for utilities and helpers refs #DS-926 --- .../components/Breadcrumbs/Breadcrumbs.twig | 7 +++++-- .../FileUploader/FileUploaderAttachment.twig | 12 +++++++----- .../components/FileUploader/FileUploaderInput.twig | 4 +++- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/packages/web-twig/src/Resources/components/Breadcrumbs/Breadcrumbs.twig b/packages/web-twig/src/Resources/components/Breadcrumbs/Breadcrumbs.twig index 5cbffe31a2..897b37fe35 100644 --- a/packages/web-twig/src/Resources/components/Breadcrumbs/Breadcrumbs.twig +++ b/packages/web-twig/src/Resources/components/Breadcrumbs/Breadcrumbs.twig @@ -6,6 +6,9 @@ {# Class names #} {%- set _rootClassName = _spiritClassPrefix ~ 'Breadcrumbs' -%} +{%- set _displayNoneClassName = _spiritClassPrefix ~ 'd-none' -%} +{%- set _displayTabletNoneClassName = _spiritClassPrefix ~ 'd-tablet-none' -%} +{%- set _displayTabletFlexClassName = _spiritClassPrefix ~ 'd-tablet-flex' -%} {# Miscellaneous #} {%- set _styleProps = useStyleProps(props) -%} @@ -22,12 +25,12 @@
    {% for item in _items %} {% if loop.index is same as(_items|length - 1) and _goBackTitle is not same as('') %} -
  1. +
  2. {{ _goBackTitle }}
  3. {% endif %} -
  4. +
  5. {% if loop.index0 is not same as(0) %} {% endif %} diff --git a/packages/web-twig/src/Resources/components/FileUploader/FileUploaderAttachment.twig b/packages/web-twig/src/Resources/components/FileUploader/FileUploaderAttachment.twig index 875c2309ec..ea66b668e7 100644 --- a/packages/web-twig/src/Resources/components/FileUploader/FileUploaderAttachment.twig +++ b/packages/web-twig/src/Resources/components/FileUploader/FileUploaderAttachment.twig @@ -12,7 +12,9 @@ {%- set _rootClassName = _spiritClassPrefix ~ 'FileUploaderAttachment' -%} {%- set _imageClassName = _spiritClassPrefix ~ 'FileUploaderAttachment__image' -%} {%- set _nameClassName = _spiritClassPrefix ~ 'FileUploaderAttachment__name' -%} -{%- set _removeClassName = _spiritClassPrefix ~ 'FileUploaderAttachment__action' -%} +{%- set _actionClassName = _spiritClassPrefix ~ 'FileUploaderAttachment__action' -%} +{%- set _slotClassName = _spiritClassPrefix ~ 'FileUploaderAttachment__slot' -%} +{%- set _textTruncateClassName = _spiritClassPrefix ~ 'text-truncate' -%} {# Attributes #} {%- set _dataImagePreviewAttr = _generateImagePreview ? 'data-spirit-imagePreview="true"' : null -%} @@ -38,13 +40,13 @@ {% endif %} - + {{- _fileName -}} {% if _onEdit %} - - @@ -52,7 +54,7 @@ {% endif %}