{{!
    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 format_tiles/section_zero

    Section zero template.

    The purpose of this template is to render section zero
    i.e. the top section of the course
    which may be displayed on the course landing page or above any other section
    It includes other items displayed at the top of the course such as filter buttons

    Classes required for JS:
    * none

    Data attributes required for JS:
    * none

    Context variables required for this template:
        * show - do we show section zero?
        * isediting: - is the user editing?
        * secid - section id for section zero (from sections table)
        * summary - summary text to display at top of section
        * content - info for single_section template
        * is_multi_section": - - is this a multi section page we are on?
        * has_filter_buttons - does the course have filter buttons?
        * fiternumberedbuttons - filter buttons to display (numbered)
        * fiteroutcomebuttons - filter buttons to display (based on outcomes)
        * overall_progress_indicator - indicator info for progress template
        * section_zero_add_cm_control_html - html to add this control

    Example context (json):
    {
        "show": 1,
        "isediting": 0,
        "secid": 212,
        "summary": "This is the section zero summary text",
        "content": {},
        "is_multi_section": 1,
        "has_filter_buttons": 0,
        "fiternumberedbuttons": {},
        "fiteroutcomebuttons": {},
        "overall_progress_indicator": {},
        "section_zero_add_cm_control_html": ""
    }
}}

{{#section_zero_show}}
    <li id="section-0" data-section="0" class="section main clearfix" role="region">
        <span class="hidden sectionname">{{title}}</span>
        {{#isediting}}
            <a title="{{#str}}editsummary, core{{/str}}" href="{{{config.wwwroot}}}/course/editsection.php?id={{secid}}&sr={{tileid}}">
                {{#pix}}i/settings, core{{/pix}}
            </a>
        {{/isediting}}
        <div class="left side"></div>
        <div class="right side"></div>
        <div class="content">
            <div class="summary">{{{summary}}}</div>
            <ul class="section img-text {{#usesubtilesseczero}}subtiles{{/usesubtilesseczero}}{{^usesubtilesseczero}}nosubtiles{{/usesubtilesseczero}}
                {{#useSubtiles}}{{#usesubtilesseczero}}subtiles{{/usesubtilesseczero}}{{/useSubtiles}}">
                {{#content}}
                    {{#course_modules}}
                        {{>format_tiles/course_module}}
                    {{/course_modules}}
                {{/content}}
            </ul>
            {{#isediting}}
                {{^showcompatibilitywarning}}
                    {{! Issue 39 if we are using Moodle 3.9 we have a compatibility problem, so hide the add activity item as it causes issues when used}}
                    {{{section_zero_add_cm_control_html}}}
                {{/showcompatibilitywarning}}
            {{/isediting}}
        </div>
    </li>
{{/section_zero_show}}