From 70cfe638053eb5fb081434e09f8f9fde05b1ac42 Mon Sep 17 00:00:00 2001
From: Kathrin Osswald <kathrin.osswald@uni-ulm.de>
Date: Mon, 3 Jun 2019 11:12:23 +0200
Subject: [PATCH] Added newly introduced collection labels in the navdrawer
 nodes.

---
 CHANGES.md   | 1 +
 locallib.php | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/CHANGES.md b/CHANGES.md
index 09f37c1..4d2f490 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -6,6 +6,7 @@ Changes
 
 ### Unreleased
 
+* 2019-06-03 - Added newly introduced collection labels in the navdrawer nodes.
 * 2019-06-03 - Adjusted columns2.php due to upstream changes in theme Boost.
 * 2019-06-03 - Adjusted login.mustache template due to upstream changes in theme Boost.
 * 2019-06-03 - Adjusted footer.mustache template due to upstream changes in theme Boost.
diff --git a/locallib.php b/locallib.php
index 9c4c8d9..ffa2b32 100644
--- a/locallib.php
+++ b/locallib.php
@@ -304,9 +304,11 @@ function theme_boost_campus_set_node_on_top(flat_navigation $flatnav, $nodename,
         // Set the showdivider of the new top node to false that no empty nav-element will be created.
         $pageflatnav->set_showdivider(false);
         // Add the showdivider to the coursehome node as this is the next one and this will add a margin top to it.
-        $beforenode->set_showdivider(true);
+        $beforenode->set_showdivider(true, $beforenode->text);
         // Remove the site home navigation node that it does not appear twice in the menu.
         $flatnav->remove($nodename);
+        // Set the collection label for this node.
+        $flatnav->set_collectionlabel($pageflatnav->text);
         // Add the saved site home node before the $beforenode.
         $flatnav->add($pageflatnav, $beforenode->key);
     }
-- 
GitLab