{{!
    This file is part of Moodle - https://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 koperedashboard_pages/page_view

    Example context (json):
    {
        "title": "Setting title"
    }
}}

{{!
    @template koperedashboard_pages/page_view
}}
{{{flash}}}

<div class="kopere_dashboard-pages-toolbar kopere_dashboard-card mb-3">
    <div>
        <h3 class="mb-1">{{{title}}}</h3>
        <div class="text-muted"><a href="{{{publicurl}}}" target="_blank">{{{publicurl}}}</a></div>
    </div>
    <div class="kopere_dashboard-pages-actions">
        <a class="btn btn-outline-secondary" href="{{{backurl}}}">{{#str}}back{{/str}}</a>
        <a class="btn btn-primary" href="{{{editurl}}}">{{#str}}page_edit, koperedashboard_pages{{/str}}</a>
        <a class="btn btn-outline-danger" href="{{{deleteurl}}}">{{#str}}page_delete, koperedashboard_pages{{/str}}</a>
        <a class="btn btn-outline-secondary" href="{{{publicurl}}}" target="_blank">{{#str}}
            page_view_public, koperedashboard_pages{{/str}}</a>
    </div>
</div>

<div class="kopere_dashboard-card mb-3">
    <div class="row kopere_dashboard-pages-details">
        <div class="col-md-4">
            <div class="kopere_dashboard-pages-detail-label">{{#str}}field_menu, koperedashboard_pages{{/str}}</div>
            <div class="kopere_dashboard-pages-detail-value">{{{menu}}}</div>
        </div>
        <div class="col-md-4">
            <div class="kopere_dashboard-pages-detail-label">{{#str}}field_course, koperedashboard_pages{{/str}}</div>
            <div class="kopere_dashboard-pages-detail-value">{{{course}}}</div>
        </div>
        <div class="col-md-4">
            <div class="kopere_dashboard-pages-detail-label">{{#str}}field_theme, koperedashboard_pages{{/str}}</div>
            <div class="kopere_dashboard-pages-detail-value">{{{theme}}}</div>
        </div>
        <div class="col-md-4">
            <div class="kopere_dashboard-pages-detail-label">{{#str}}field_visible, koperedashboard_pages{{/str}}</div>
            <div class="kopere_dashboard-pages-detail-value">{{{visible}}}</div>
        </div>
        <div class="col-md-4">
            <div class="kopere_dashboard-pages-detail-label">{{#str}}
                field_pageorder, koperedashboard_pages{{/str}}</div>
            <div class="kopere_dashboard-pages-detail-value">{{{pageorder}}}</div>
        </div>
        <div class="col-md-4">
            <div class="kopere_dashboard-pages-detail-label">{{#str}}field_link, koperedashboard_pages{{/str}}</div>
            <div class="kopere_dashboard-pages-detail-value">{{{link}}}</div>
        </div>
    </div>
</div>

<div class="kopere_dashboard-card kopere_dashboard-public-page">
    {{{text}}}
</div>
