mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
ae360a1da0
Co-authored-by: Stephen Sharpe <stephen.sharpe@synergy-learning.com>
118 lines
4.3 KiB
Plaintext
118 lines
4.3 KiB
Plaintext
{{!
|
|
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 core_course/category_actionbar
|
|
|
|
Displays the tertiary nav for the category page
|
|
|
|
Context variables required for this template:
|
|
* urlselect Object - The content to be rendered within the url_select
|
|
* renderedcontent String - Any additional content/actions to be displayed inline with the select box
|
|
|
|
Example context (json):
|
|
{
|
|
"categoryselect" : {
|
|
"formid": "url_select_f61834256d7754158",
|
|
"classes": "urlselect",
|
|
"label": "",
|
|
"disabled": false,
|
|
"title":null,
|
|
"id":"url_select61834256d7754159",
|
|
"sesskey":"LWILINyZMH",
|
|
"action":"http:\/\/localhost\/stable_master\/course\/jumpto.php",
|
|
"showbutton":null,
|
|
"options": [
|
|
{
|
|
"name":"Category 1",
|
|
"value":"\/course\/index.php\/?categoryid=279"
|
|
},
|
|
{
|
|
"name":"Category 2",
|
|
"value":"\/course\/index.php\/?categoryid=280"
|
|
},
|
|
{
|
|
"name":"Category 3",
|
|
"value":"\/course\/index.php\/?categoryid=281"
|
|
}
|
|
],
|
|
"labelattributes":[],
|
|
"helpicon":false,
|
|
"attributes":[]
|
|
},
|
|
"search": {
|
|
"action": "https://moodle.local/admin/search.php",
|
|
"extraclasses": "my-2",
|
|
"inputname": "search",
|
|
"inform": false,
|
|
"searchstring": "Search settings",
|
|
"value": "policy",
|
|
"btnclass": "primary",
|
|
"query": "themedesigner",
|
|
"hiddenfields": [
|
|
{
|
|
"name": "context",
|
|
"value": "11"
|
|
}
|
|
]
|
|
},
|
|
"additionaloptions": {
|
|
"options": [
|
|
{
|
|
"url": "\/course\/index.php\/?categoryid=281",
|
|
"string": "Action 1",
|
|
"attributes": [
|
|
{
|
|
"name": "data-id",
|
|
"value": "1"
|
|
},
|
|
{
|
|
"name": "data-action",
|
|
"value": "test"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}}
|
|
<div class="container-fluid tertiary-navigation" id="action_bar">
|
|
<div class="row">
|
|
{{#categoryselect}}
|
|
<div class="navitem">
|
|
{{> core/url_select }}
|
|
</div>
|
|
{{/categoryselect}}
|
|
{{#search}}
|
|
<div class="navitem">
|
|
{{> core/search_input }}
|
|
</div>
|
|
{{/search}}
|
|
{{#additionaloptions}}
|
|
<div class="ml-auto d-flex">
|
|
<div class="navitem dropdown">
|
|
<button aria-label="{{#str}}moreactions{{/str}}" class="btn btn-secondary dropdown-toggle" id="dropdown-actions" data-toggle="dropdown" aria-haspopup="true" aria-controls="moreactionsmenu">
|
|
{{#str}}moremenu{{/str}}
|
|
</button>
|
|
|
|
<div id="moreactionsmenu" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdown-actions" role="menu">
|
|
{{#options}}
|
|
<a role="menuitem" class="dropdown-item" {{#attributes}}{{name}}="{{value}}" {{/attributes}} href="{{url}}" tabindex="-1">{{string}}</a>
|
|
{{/options}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{/additionaloptions}}
|
|
</div>
|
|
</div>
|