From da33265d73d5cdef2e7c468ccbf02262be405be8 Mon Sep 17 00:00:00 2001 From: Bas Brands Date: Mon, 28 Jun 2021 12:18:16 +0200 Subject: [PATCH] MDL-72032 core_behat: secondary navigation behat fixes - Part of: MDL-69588 --- lib/outputrenderers.php | 7 +++++-- lib/templates/moremenu.mustache | 2 +- lib/templates/settings_link_page.mustache | 25 +++++++++++++++++++++-- lib/tests/behat/behat_navigation.php | 11 ++++++++++ theme/boost/layout/drawers.php | 17 ++++++++++++++- theme/boost/templates/drawers.mustache | 3 +++ 6 files changed, 59 insertions(+), 6 deletions(-) diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index aae32068f2e..42007a1aad0 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -3816,18 +3816,21 @@ EOD; * @return string */ public function more_menu($content, $navbarstyle) { + $tabs = ($navbarstyle == 'nav-tabs'); if (is_object($content)) { if (!isset($content->children) || count($content->children) == 0) { return false; } return $this->render_from_template('core/moremenu', (object) [ 'nodecollection' => $content, - 'navbarstyle' => $navbarstyle + 'navbarstyle' => $navbarstyle, + 'tabs' => $tabs ]); } else { return $this->render_from_template('core/moremenu', (object) [ 'nodearray' => $content, - 'navbarstyle' => $navbarstyle + 'navbarstyle' => $navbarstyle, + 'tabs' => $tabs ]); } } diff --git a/lib/templates/moremenu.mustache b/lib/templates/moremenu.mustache index 3e41d1f1c50..9111651ed95 100644 --- a/lib/templates/moremenu.mustache +++ b/lib/templates/moremenu.mustache @@ -45,7 +45,7 @@ } }}