diff --git a/templates/local/content/section/content.mustache b/templates/local/content/section/content.mustache index 9f76c738..de8c17cb 100644 --- a/templates/local/content/section/content.mustache +++ b/templates/local/content/section/content.mustache @@ -85,12 +85,12 @@ }} {{#singleheader}} {{$ core_courseformat/local/content/section/header }} - {{> core_courseformat/local/content/section/header }} + {{> format_grid/local/content/section/header }} {{/ core_courseformat/local/content/section/header }} {{/singleheader}} {{#header}} {{$ core_courseformat/local/content/section/header }} - {{> core_courseformat/local/content/section/header }} + {{> format_grid/local/content/section/header }} {{/ core_courseformat/local/content/section/header }} {{/header}} {{#restrictionlock}} @@ -149,7 +149,7 @@ {{/gridimage}} -
diff --git a/templates/local/content/section/header.mustache b/templates/local/content/section/header.mustache new file mode 100644 index 00000000..ff19bcb7 --- /dev/null +++ b/templates/local/content/section/header.mustache @@ -0,0 +1,79 @@ +{{! + 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 . +}} +{{! + @template format_grid/local/content/section/header + + Displays a course section header. + + Example context (json): + { + "id": 123, + "name": "Section title", + "title": "Section title", + "url": "#", + "headerdisplaymultipage": true, + "sectionbulk": true, + "editing": 0 + } +}} +{{#sectionbulk}} +{{$ core_courseformat/local/content/section/bulkselect }} + {{> core_courseformat/local/content/section/bulkselect }} +{{/ core_courseformat/local/content/section/bulkselect }} +{{/sectionbulk}} +{{#headerdisplaymultipage}} + {{^displayonesection}} +

+ {{{title}}} +

+ {{/displayonesection}} +{{/headerdisplaymultipage}} +{{^headerdisplaymultipage}} + {{#sitehome}} +

+ {{{title}}} +

+ {{/sitehome}} + {{^sitehome}} + {{^displayonesection}} + + {{/displayonesection}} + {{/sitehome}} +{{/headerdisplaymultipage}}