From 598b3f095fcbb6bc8722c8207b8cf84df61da616 Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Thu, 13 Oct 2016 11:36:06 +0800 Subject: [PATCH] MDL-55074 theme_boost: Make sections different in flat nav --- lib/navigationlib.php | 8 ++++++ .../boost/templates/flat_navigation.mustache | 25 +++++++++++++------ 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/lib/navigationlib.php b/lib/navigationlib.php index d13fc2ff006..ca74df7be88 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -3610,6 +3610,14 @@ class flat_navigation_node extends navigation_node { $this->indent = $indent; } + /** + * Does this node represent a course section link. + * @return boolean + */ + public function is_section() { + return $this->type == navigation_node::TYPE_SECTION; + } + /** * Getter for "showdivider" * @return boolean diff --git a/theme/boost/templates/flat_navigation.mustache b/theme/boost/templates/flat_navigation.mustache index 93c1b92562e..bfb41b0fdb1 100644 --- a/theme/boost/templates/flat_navigation.mustache +++ b/theme/boost/templates/flat_navigation.mustache @@ -1,19 +1,30 @@ -