From 74c3df467a0c86d9f0277a040025a6c57284555c Mon Sep 17 00:00:00 2001 From: thex Date: Tue, 25 Jun 2019 17:09:01 +0200 Subject: [PATCH 1/7] add disable option to social particle --- engines/common/nucleus/particles/social.html.twig | 14 ++++++++------ engines/common/nucleus/particles/social.yaml | 6 ++++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/engines/common/nucleus/particles/social.html.twig b/engines/common/nucleus/particles/social.html.twig index e7e1591d4..c153b4cd0 100644 --- a/engines/common/nucleus/particles/social.html.twig +++ b/engines/common/nucleus/particles/social.html.twig @@ -9,12 +9,14 @@ {% if particle.title %}

{{ particle.title|raw }}

{% endif %}
{% for item in particle.items %} - {% set title = (item.title is not empty) ? item.title|e : item.text|e %} - {% set titleAttrib = (title is not empty) ? ' title="' ~ title ~ '" aria-label="' ~ title ~ '"' : '' %} - - {% if particle.display in ['both', 'icons_only'] %}{% endif %} - {% if particle.display in ['both', 'text_only'] %}{{ item.text|e }}{% endif %} - + {% if not item.disabled %} + {% set title = (item.title is not empty) ? item.title|e : item.text|e %} + {% set titleAttrib = (title is not empty) ? ' title="' ~ title ~ '" aria-label="' ~ title ~ '"' : '' %} + + {% if particle.display in ['both', 'icons_only'] %}{% endif %} + {% if particle.display in ['both', 'text_only'] %}{{ item.text|e }}{% endif %} + + {% endif %} {% endfor %}
{% endblock %} \ No newline at end of file diff --git a/engines/common/nucleus/particles/social.yaml b/engines/common/nucleus/particles/social.yaml index fc0d89827..aabf0bc47 100644 --- a/engines/common/nucleus/particles/social.yaml +++ b/engines/common/nucleus/particles/social.yaml @@ -59,6 +59,12 @@ form: ajax: true fields: + .disabled: + type: input.checkbox + label: Disabled + description: Enables or disables this item. + default: false + .name: type: input.text label: Name From 5185792b6bc450c2bbfff28f73473eab72b4d304 Mon Sep 17 00:00:00 2001 From: thex Date: Tue, 25 Jun 2019 17:09:52 +0200 Subject: [PATCH 2/7] add disable option to sample particle (hydrogen) --- .../hydrogen/common/particles/sample.html.twig | 18 ++++++++++-------- themes/hydrogen/common/particles/sample.yaml | 6 ++++++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/themes/hydrogen/common/particles/sample.html.twig b/themes/hydrogen/common/particles/sample.html.twig index 2a0a1af39..f342ed7b0 100644 --- a/themes/hydrogen/common/particles/sample.html.twig +++ b/themes/hydrogen/common/particles/sample.html.twig @@ -14,15 +14,17 @@
{% for sample in particle.samples %} -
-
- -

{{ sample.title|raw }}

- {{ sample.subtitle|raw }} - {{ sample.description|raw }} + {% if not item.disabled %} +
+
+ +

{{ sample.title|raw }}

+ {{ sample.subtitle|raw }} + {{ sample.description|raw }} +
-
+ {% endif %} {% endfor %}
diff --git a/themes/hydrogen/common/particles/sample.yaml b/themes/hydrogen/common/particles/sample.yaml index b9f092e2f..d687b00f4 100644 --- a/themes/hydrogen/common/particles/sample.yaml +++ b/themes/hydrogen/common/particles/sample.yaml @@ -57,6 +57,12 @@ form: overridable: false fields: + .disabled: + type: input.checkbox + label: Disabled + description: Enables or disables this item. + default: false + .icon: type: input.icon label: Icon From 0d47f24cc800a8aabccace4fe642219eaf33a0ce Mon Sep 17 00:00:00 2001 From: thex Date: Tue, 25 Jun 2019 17:10:46 +0200 Subject: [PATCH 3/7] add disable option to content cubes particle --- .../common/particles/contentcubes.html.twig | 74 ++++++++++--------- .../helium/common/particles/contentcubes.yaml | 5 ++ 2 files changed, 43 insertions(+), 36 deletions(-) diff --git a/themes/helium/common/particles/contentcubes.html.twig b/themes/helium/common/particles/contentcubes.html.twig index 76c345bdf..a3dbddbcc 100644 --- a/themes/helium/common/particles/contentcubes.html.twig +++ b/themes/helium/common/particles/contentcubes.html.twig @@ -9,51 +9,53 @@
{% for item in particle.items %} -
-
- {% if item.image %} -
- {{ item.title|e }} -
- {% endif %} -
- -
-
- {% if item.label %} -
{{ item.label|e }}
+ {% if not item.disabled %} +
+
+ {% if item.image %} +
+ {{ item.title|e }} +
{% endif %} +
-
- {% if item.link %} - - {% endif %} - - {{ item.title|e }} - - {% if item.link %} - {{ item.linktext|raw }} - +
+
+ {% if item.label %} +
{{ item.label|e }}
{% endif %} -
- {% if item.tags %} -
+
+ {% if item.link %} + + {% endif %} - {% for tag in item.tags %} - - - {% if tag.icon %} {% endif %} - {{ tag.text|raw }} - - - {% endfor %} + {{ item.title|e }} + {% if item.link %} + {{ item.linktext|raw }} + + {% endif %}
- {% endif %} + + {% if item.tags %} +
+ + {% for tag in item.tags %} + + + {% if tag.icon %} {% endif %} + {{ tag.text|raw }} + + + {% endfor %} + +
+ {% endif %} +
-
+ {% endif %} {% endfor %}
diff --git a/themes/helium/common/particles/contentcubes.yaml b/themes/helium/common/particles/contentcubes.yaml index f21d442e0..85d03395d 100644 --- a/themes/helium/common/particles/contentcubes.yaml +++ b/themes/helium/common/particles/contentcubes.yaml @@ -35,6 +35,11 @@ form: ajax: true fields: + .disabled: + type: input.checkbox + label: Disabled + description: Enables or disables this item. + default: false .name: type: input.text .image: From d2142aaaeb99339f9138ec2b5868ae697f0fbc65 Mon Sep 17 00:00:00 2001 From: thex Date: Tue, 25 Jun 2019 17:11:41 +0200 Subject: [PATCH 4/7] add disable option to horizontal menu particle --- themes/helium/common/particles/horizontalmenu.html.twig | 8 +++++--- themes/helium/common/particles/horizontalmenu.yaml | 5 +++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/themes/helium/common/particles/horizontalmenu.html.twig b/themes/helium/common/particles/horizontalmenu.html.twig index 4c89ba690..884629f0d 100644 --- a/themes/helium/common/particles/horizontalmenu.html.twig +++ b/themes/helium/common/particles/horizontalmenu.html.twig @@ -5,9 +5,11 @@ diff --git a/themes/helium/common/particles/horizontalmenu.yaml b/themes/helium/common/particles/horizontalmenu.yaml index 80d5d3f34..9354a09ef 100644 --- a/themes/helium/common/particles/horizontalmenu.yaml +++ b/themes/helium/common/particles/horizontalmenu.yaml @@ -39,6 +39,11 @@ form: ajax: true fields: + .disabled: + type: input.checkbox + label: Disabled + description: Enables or disables this item. + default: false .name: type: input.text label: Name From 0e59d5a56e311dd501c4566b02047969580fd83b Mon Sep 17 00:00:00 2001 From: thex Date: Tue, 25 Jun 2019 17:12:19 +0200 Subject: [PATCH 5/7] add disable option to content tabs particle --- .../common/particles/contenttabs.html.twig | 30 +++++++++++-------- .../helium/common/particles/contenttabs.yaml | 5 ++++ 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/themes/helium/common/particles/contenttabs.html.twig b/themes/helium/common/particles/contenttabs.html.twig index 1110ee57d..4d1565640 100644 --- a/themes/helium/common/particles/contenttabs.html.twig +++ b/themes/helium/common/particles/contenttabs.html.twig @@ -10,13 +10,15 @@ @@ -26,13 +28,15 @@
    {% for item in particle.items %} -
  • -
    -
    - {{ item.content|raw }} + {% if not item.disabled %} +
  • +
    +
    + {{ item.content|raw }} +
    -
- + + {% endif %} {% endfor %} diff --git a/themes/helium/common/particles/contenttabs.yaml b/themes/helium/common/particles/contenttabs.yaml index 1babdbe61..1a24e267b 100644 --- a/themes/helium/common/particles/contenttabs.yaml +++ b/themes/helium/common/particles/contenttabs.yaml @@ -48,6 +48,11 @@ form: ajax: true fields: + .disabled: + type: input.checkbox + label: Disabled + description: Enables or disables this item. + default: false .title: type: input.text label: Title From 09bf3e576bf7347696c1114e408e512348438bbb Mon Sep 17 00:00:00 2001 From: thex Date: Mon, 1 Jul 2019 13:08:23 +0200 Subject: [PATCH 6/7] particle list-item disable control changed and description updated --- engines/common/nucleus/particles/social.html.twig | 2 +- engines/common/nucleus/particles/social.yaml | 8 ++++---- themes/helium/common/particles/contentcubes.html.twig | 2 +- themes/helium/common/particles/contentcubes.yaml | 8 ++++---- themes/helium/common/particles/contenttabs.html.twig | 4 ++-- themes/helium/common/particles/contenttabs.yaml | 8 ++++---- themes/helium/common/particles/horizontalmenu.html.twig | 2 +- themes/helium/common/particles/horizontalmenu.yaml | 8 ++++---- themes/hydrogen/common/particles/sample.html.twig | 2 +- themes/hydrogen/common/particles/sample.yaml | 8 ++++---- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/engines/common/nucleus/particles/social.html.twig b/engines/common/nucleus/particles/social.html.twig index c153b4cd0..a036de17a 100644 --- a/engines/common/nucleus/particles/social.html.twig +++ b/engines/common/nucleus/particles/social.html.twig @@ -9,7 +9,7 @@ {% if particle.title %}

{{ particle.title|raw }}

{% endif %}
{% for item in particle.items %} - {% if not item.disabled %} + {% if not item.disable %} {% set title = (item.title is not empty) ? item.title|e : item.text|e %} {% set titleAttrib = (title is not empty) ? ' title="' ~ title ~ '" aria-label="' ~ title ~ '"' : '' %} diff --git a/engines/common/nucleus/particles/social.yaml b/engines/common/nucleus/particles/social.yaml index aabf0bc47..a2ccd3c4a 100644 --- a/engines/common/nucleus/particles/social.yaml +++ b/engines/common/nucleus/particles/social.yaml @@ -59,10 +59,10 @@ form: ajax: true fields: - .disabled: - type: input.checkbox - label: Disabled - description: Enables or disables this item. + .disable: + type: enable.enable + label: Disable + description: Disables the item on the front end. default: false .name: diff --git a/themes/helium/common/particles/contentcubes.html.twig b/themes/helium/common/particles/contentcubes.html.twig index a3dbddbcc..756b52776 100644 --- a/themes/helium/common/particles/contentcubes.html.twig +++ b/themes/helium/common/particles/contentcubes.html.twig @@ -9,7 +9,7 @@
{% for item in particle.items %} - {% if not item.disabled %} + {% if not item.disable %}
{% if item.image %} diff --git a/themes/helium/common/particles/contentcubes.yaml b/themes/helium/common/particles/contentcubes.yaml index 85d03395d..c6b00cfa7 100644 --- a/themes/helium/common/particles/contentcubes.yaml +++ b/themes/helium/common/particles/contentcubes.yaml @@ -35,10 +35,10 @@ form: ajax: true fields: - .disabled: - type: input.checkbox - label: Disabled - description: Enables or disables this item. + .disable: + type: enable.enable + label: Disable + description: Disables the item on the front end. default: false .name: type: input.text diff --git a/themes/helium/common/particles/contenttabs.html.twig b/themes/helium/common/particles/contenttabs.html.twig index 4d1565640..85c60e1c4 100644 --- a/themes/helium/common/particles/contenttabs.html.twig +++ b/themes/helium/common/particles/contenttabs.html.twig @@ -10,7 +10,7 @@