{{!
    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_myoverview/event-list-item

    This template renders an event list item for the myoverview block.

    Example context (json):
    {
        "name": "Assignment due 1",
        "url": "https://www.google.com",
        "timesort": 1490320388,
        "course": {
            "fullnamedisplay": "Course 1"
        },
        "action": {
            "name": "Submit assignment",
            "url": "https://www.google.com",
            "itemcount": 1,
            "showitemcount": true,
            "actionable": true
        },
        "icon": {
            "key": "icon",
            "component": "mod_assign",
            "alttext": "Assignment icon"
        }
    }
}}
<li class="list-group-item event-list-item" data-region="event-list-item">
    <div class="row">
        <div class="col-sm-8 col-lg-6 col-xl-7">
            <div class="d-inline-block icon-large event-icon">
                {{#icon}}{{#pix}} {{key}}, {{component}}, {{alttext}} {{/pix}}{{/icon}}
            </div>
            <div class="d-inline-block event-name-container">
                <a class="event-name text-truncate" href="{{{url}}}">{{name}}</a>
                <p class="small text-muted text-truncate m-b-0">{{course.fullnamedisplay}}</p>
            </div>
        </div>
        <div class="col-sm-4 col-lg-6 col-xl-5">
            <div class="row">
                <div class="col-lg-5 text-xs-right text-lg-left text-truncate">
                    {{#userdate}} {{timesort}}, {{#str}} strftimerecent {{/str}} {{/userdate}}
                </div>
                <div class="hidden-md-down col-lg-7 text-truncate">
                    {{#action.actionable}}
                        <a href="{{{action.url}}}">{{action.name}}</a>
                        {{#action.itemcount}}
                            {{#action.showitemcount}}
                                <span class="tag tag-pill tag-default">{{.}}</span>
                            {{/action.showitemcount}}
                        {{/action.itemcount}}
                    {{/action.actionable}}
                    {{^action.actionable}}
                        <div class="text-muted">{{action.name}}</div>
                    {{/action.actionable}}
                </div>
            </div>
        </div>
    </div>
</li>
