mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
72 lines
3 KiB
Text
72 lines
3 KiB
Text
{{!
|
|
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_courseformat/local/content/section/header
|
|
|
|
Displays a course section header.
|
|
|
|
Example context (json):
|
|
{
|
|
"id": 123,
|
|
"name": "Section title",
|
|
"title": "<a href=\"http://moodle/course/view.php?id=5#section-0\">Section title</a>",
|
|
"url": "#",
|
|
"headerdisplaymultipage": true,
|
|
"editing": 0
|
|
}
|
|
}}
|
|
|
|
{{#headerdisplaymultipage}}
|
|
<h3 id="sectionid-{{id}}-title" class="sectionname">
|
|
{{{title}}}
|
|
</h3>
|
|
{{/headerdisplaymultipage}}
|
|
{{^headerdisplaymultipage}}
|
|
{{$ core_courseformat/local/content/section/bulkselect }}
|
|
{{> core_courseformat/local/content/section/bulkselect }}
|
|
{{/ core_courseformat/local/content/section/bulkselect }}
|
|
{{#sitehome}}
|
|
<h2 id="sectionid-{{id}}-title" class="sectionname">
|
|
{{{title}}}
|
|
</h2>
|
|
{{/sitehome}}
|
|
{{^sitehome}}
|
|
<div class="d-flex align-items-start position-relative">
|
|
<a role="button" data-toggle="collapse"
|
|
href="#coursecontentcollapse{{num}}"
|
|
id="collapssesection{{num}}"
|
|
aria-expanded="{{^contentcollapsed}}true{{/contentcollapsed}}{{#contentcollapsed}}false{{/contentcollapsed}}"
|
|
aria-controls="coursecontentcollapse{{num}}"
|
|
class="btn btn-icon mr-1 icons-collapse-expand justify-content-center
|
|
{{^editing}} stretched-link {{/editing}}
|
|
{{#contentcollapsed}} collapsed {{/contentcollapsed}}"
|
|
aria-label="{{name}}">
|
|
<span class="expanded-icon icon-no-margin p-2" title="{{#str}} collapse, core {{/str}}">
|
|
{{#pix}} t/expandedchevron, core {{/pix}}
|
|
</span>
|
|
<span class="collapsed-icon icon-no-margin p-2" title="{{#str}} expand, core {{/str}}">
|
|
<span class="dir-rtl-hide">{{#pix}} t/collapsedchevron, core {{/pix}}</span>
|
|
<span class="dir-ltr-hide">{{#pix}} t/collapsedchevron_rtl, core {{/pix}}</span>
|
|
</span>
|
|
</a>
|
|
<h3 class="sectionname course-content-item d-flex align-self-stretch align-items-center mb-0"
|
|
id="sectionid-{{id}}-title" data-for="section_title" data-id="{{id}}" data-number="{{num}}">
|
|
{{{title}}}
|
|
</h3>
|
|
</div>
|
|
{{/sitehome}}
|
|
{{/headerdisplaymultipage}}
|