{{!
    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 block_culupcoming_events/main

    CUL Upcoming Events view.

    The purpose of this template is to render the CUL Upcoming Events block.

    Classes required for JS:
    * none

    Data attributes required for JS:
    * none

    Example context (json):
    {
    }
}}

<div id="culupcoming-events-{{uniqid}}" class="culupcoming_events" data-template="block_culupcoming_events/culupcoming_events">
    <div class="reload">
        <a class="block_culupcoming_events_reload" href="{{reloadurl}}">
            <i class="icon fa fa-refresh"></i>
            <span class="accesshide">{{#str}} reload, block_culupcoming_events {{/str}}</span>
        </a>
        <span class="block_culupcoming_events_loading">
            <i class="fa fa-circle-o-notch fa-spin"></i>
        </span>
    </div>
    {{> block_culupcoming_events/eventlist}}    
</div>
{{> block_culupcoming_events/pagination}}
{{#js}}
require(['jquery', 'core_calendar/calendar_view'], function($, CalendarView) {
    CalendarView.init($("#culupcoming-events-{{uniqid}}"), 'upcoming');
});
{{/js}}
