From a7bebd063810ea5421a61a28b2fa231280f9967f Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Mon, 14 Nov 2016 10:40:41 +0800 Subject: [PATCH] MDL-56834 boost: Nav for participants page On the participants page, hide the small cog and put a region main settings menu with all the nodes from the "Users" branch in the settings block. --- theme/boost/classes/output/core_renderer.php | 12 ++++++++++++ theme/boost/scss/moodle/user.scss | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/theme/boost/classes/output/core_renderer.php b/theme/boost/classes/output/core_renderer.php index e38fe9bd97d..c47e2c88f10 100644 --- a/theme/boost/classes/output/core_renderer.php +++ b/theme/boost/classes/output/core_renderer.php @@ -631,6 +631,18 @@ class core_renderer extends \core_renderer { $this->build_action_menu_from_navigation($menu, $node); } } + } else { + $items = $this->page->navbar->get_items(); + $navbarnode = end($items); + + if ($navbarnode->key == 'participants') { + $node = $this->page->settingsnav->find('users', navigation_node::TYPE_CONTAINER); + if ($node) { + // Build an action menu based on the visible nodes from this navigation tree. + $this->build_action_menu_from_navigation($menu, $node); + } + + } } return $this->render($menu); } diff --git a/theme/boost/scss/moodle/user.scss b/theme/boost/scss/moodle/user.scss index 92c3bc2a529..ca18f915d3a 100644 --- a/theme/boost/scss/moodle/user.scss +++ b/theme/boost/scss/moodle/user.scss @@ -294,3 +294,8 @@ } } } + +// Remove the little cog from participants page because we are putting a cog menu there. +.userlist h3 .action-icon { + display: none; +}