From 1a2bba0fd5de4fe79442142583f9ea4628aed537 Mon Sep 17 00:00:00 2001
From: Johannes Meyer <johannes.meyer@icinga.com>
Date: Wed, 12 May 2021 12:47:59 +0200
Subject: [PATCH] Use fontawesome icons for the default collapsible control

---
 application/layouts/scripts/layout.phtml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/application/layouts/scripts/layout.phtml b/application/layouts/scripts/layout.phtml
index 9cc7ad545..27526ac2c 100644
--- a/application/layouts/scripts/layout.phtml
+++ b/application/layouts/scripts/layout.phtml
@@ -1,6 +1,7 @@
 <?php
 
 use Icinga\Util\Translator;
+use ipl\Web\Widget\Icon;
 
 if (array_key_exists('_dev', $_GET)) {
   $jsfile  = 'js/icinga.dev.js';
@@ -70,8 +71,9 @@ $innerLayoutScript = $this->layout()->innerLayout . '.phtml';
 </script>
 <div id="collapsible-control-ghost" class="collapsible-control">
     <button type="button">
-        <?= $this->icon('angle-double-down', $this->translate('Expand'), ['class' => 'expand-icon']) ?>
-        <?= $this->icon('angle-double-up', $this->translate('Collapse'), ['class' => 'collapse-icon']) ?>
+        <!-- TODO: Accessibility attributes are missing since usage of the Icon class -->
+        <?= new Icon('angle-double-down', ['class' => 'expand-icon', 'title' => $this->translate('Expand')]) ?>
+        <?= new Icon('angle-double-up', ['class' => 'collapse-icon', 'title' => $this->translate('Collapse')]) ?>
     </button>
 </div>
 <div id="modal-ghost">