{{!
    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_trema/course_summary_modal

    Modal info for /course and list of courses available (site home).

    Context variables required for this template:
    * title: The title of the course.
    * body: The body of the course.
    * courselink: The link to the course.
    * uniqid: A unique identifier for the modal.
    * str: The string helper.
    * quote: The quote helper.

    Example context (json):
    {
        "title": "Course title",
        "body": "<p>Course summary</p>",
        "courselink": "http://example.com/course/view.php?id=4",
        "uniqid": "123456"
    }
}}

<!-- Button trigger modal -->
<div class="card-see-more text-center">
	<button type="button" class="btn btn-secondary m-2 h-auto" data-{{databs}}toggle="modal" data-{{databs}}target="#modal-{{uniqid}}">
	       {{#str}}summarybutton_text, theme_trema{{/str}}
	</button>
</div>

<!-- Modal -->
<div class="modal course-summary-modal fade" id="modal-{{uniqid}}" tabindex="-1" role="dialog" aria-labelledby="modal-title-{{uniqid}}" aria-hidden="true">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h3 class="modal-title" id="modal-title-{{uniqid}}">{{#title}}{{title}}{{/title}}</h3>
                <button type="button" class="close" data-{{databs}}dismiss="modal" aria-label={{#quote}}{{#str}}closebuttontitle{{/str}}{{/quote}}>
                <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                {{{body}}}
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-{{databs}}dismiss="modal">{{#str}}closebuttontitle{{/str}}</button>
                <a href="{{courselink}}" class="btn btn-primary">{{#str}}summarycourselink_text, theme_trema{{/str}}</a>
            </div>
        </div>
    </div>
</div>
