From 5f1330c101f87c5e0a27598f16558197166cf37f Mon Sep 17 00:00:00 2001
From: Kevin Paxman <kpaxman@uwaterloo.ca>
Date: Mon, 6 Jan 2025 11:43:09 -0500
Subject: [PATCH] ISTWCMS-7242: move show/hide inside main and make only show
 for logged in users with layout builder permission

---
 src/patterns/03-layouts/content/content.twig | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/patterns/03-layouts/content/content.twig b/src/patterns/03-layouts/content/content.twig
index 0086385e..326a808f 100644
--- a/src/patterns/03-layouts/content/content.twig
+++ b/src/patterns/03-layouts/content/content.twig
@@ -1,7 +1,4 @@
 {% set main_classes = 'uw-main' %}
-<!-- Button for show and hide of admin -->
-<button class="uw-show-hide"  id="revision-show-hide" title="Show/hide revision elements">±</button>
-<!-- end -->
 {% for class in classes %}
   {% set main_classes = main_classes ~ ' ' ~ class %}
 {% endfor %}
@@ -10,4 +7,11 @@
   {% block content %}
     Main content
   {% endblock %}
+
+  {% if logged_in and user.hasPermission('create and edit custom blocks') %}
+    <!-- Button for show and hide of admin -->
+    <button class="uw-show-hide"  id="revision-show-hide" title="Show/hide revision elements">±</button>
+    <!-- end -->
+  {% endif %}
+
 </main>
-- 
GitLab