-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refine favourites popover contributed in #289
- Loading branch information
1 parent
afad96e
commit 3053690
Showing
10 changed files
with
243 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{{! | ||
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_union/popover-favourites | ||
Boost Union popover for starred courses template. | ||
Example context (json): | ||
{ | ||
"favourites": [ | ||
{ | ||
"url": "/course/view.php?id=42", | ||
"fullname": "My nice little course", | ||
"visible": true | ||
} | ||
] | ||
} | ||
}} | ||
|
||
{{< core/popover_region }} | ||
{{$classes}}popover-region-favourites{{/classes}} | ||
{{$attributes}}id="nav-popover-favourites-container" {{/attributes}} | ||
|
||
{{$togglelabel}}{{#str}} shownavbarstarredcourses_label, theme_boost_union {{/str}}{{/togglelabel}} | ||
{{$togglecontent}} | ||
{{#pix}} i/star, core, {{#str}} shownavbarstarredcourses_label, theme_boost_union {{/str}} {{/pix}} | ||
{{/togglecontent}} | ||
|
||
{{$containerlabel}}{{#str}} shownavbarstarredcourses_label, theme_boost_union {{/str}}{{/containerlabel}} | ||
|
||
{{$headertext}}{{#str}} shownavbarstarredcourses_label, theme_boost_union {{/str}}{{/headertext}} | ||
{{$headeractions}} | ||
<a href="{{config.wwwroot}}/my/courses.php" | ||
title="{{#str}} shownavbarstarredcourses_config, theme_boost_union {{/str}}" | ||
aria-label="{{#str}} shownavbarstarredcourses_config, theme_boost_union {{/str}}"> | ||
{{#pix}} i/settings, core {{/pix}}</a> | ||
{{/headeractions}} | ||
|
||
{{$content}} | ||
{{#favourites}} | ||
<a class="dropdown-item {{^visible}}dimmed{{/visible}}" href="{{{url}}}" title="{{{fullname}}}">{{{fullname}}}</a> | ||
{{/favourites}} | ||
{{/content}} | ||
{{/ core/popover_region }} | ||
{{#js}} | ||
require(['jquery', 'core/popover_region_controller'], function($, Controller) { | ||
var container = $('#nav-popover-favourites-container'); | ||
var controller = new Controller(container); | ||
controller.registerEventListeners(); | ||
controller.registerListNavigationEventListeners(); | ||
}); | ||
{{/js}} |
Oops, something went wrong.