Select Git revision
HsH-standalone.cls
settings_link_page.mustache 6.31 KiB
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template theme_boost_campus/settings_link_page
Displays the admin tree as a list of grouped links.
Example context (json):
{
"node": {
"text": "Root of menu",
"key": "test0",
"action": "https://mymoodle.org/action",
"display": true,
"children": [
{
"text": "Child of menu",
"key": "test1",
"action": "https://mymoodle.org/action",
"display": true,
"children": []
}
]
}
}
}}
{{! MODIFICATION:
* Added divs around the tab structure to be able to insert this on different sites.
* Changed the grid definitions for improved displaying.
* Removed check for !is_short_branch to display all children of the course settings within an own tab.
}}
<div id="boost-campus-course-settings" class="card">
<div class="mx-2 pt-2">
<ul class="nav nav-tabs" role="tablist">
<!-- First the top most node and immediate children -->
<li class="nav-item">
<a class="nav-link active" href="#course-settings-{{node.key}}" data-toggle="tab" role="tab">{{node.text}}</a>
</li>
<!-- Now the first level children with sub nodes -->
{{#node.children}}
{{#children.count}}
{{#display}}
<li class="nav-item">
<a class="nav-link" href="#course-settings-{{key}}" data-toggle="tab" role="tab">{{text}}</a>
</li>
{{/display}}
{{/children.count}}
{{/node.children}}
</ul>
<div class="tab-content">
<div class="tab-pane active" id="course-settings-{{node.key}}" role="tabpanel">
<div class="card">
<div class="card-body pb-0">
<div class="row">