{{!
    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-fluid visible-desktop">
        <div class="span6">
            <div class="d-inline-block 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>
                <div class="muted text-truncate"><small>{{{course.fullnamedisplay}}}</small></div>
            </div>
        </div>
        <div class="span6">
            <div class="row-fluid">
                <div class="span5 text-truncate">
                    {{#userdate}} {{timesort}}, {{#str}} strftimerecent {{/str}} {{/userdate}}
                </div>
                <div class="span7 text-truncate">
                    {{#action.actionable}}
                        <a href="{{{action.url}}}">{{action.name}}</a>
                        {{#action.itemcount}}
                            {{#action.showitemcount}}
                                <span class="badge">{{.}}</span>
                            {{/action.showitemcount}}
                        {{/action.itemcount}}
                    {{/action.actionable}}
                    {{^action.actionable}}
                        <div class="muted">{{action.name}}</div>
                    {{/action.actionable}}
                </div>
            </div>
        </div>
    </div>
    <div class="row-fluid visible-tablet">
        <div class="span8">
            <div class="d-inline-block 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>
                <div class="muted text-truncate"><small>{{{course.fullnamedisplay}}}</small></div>
            </div>
        </div>
        <div class="span4 text-right text-truncate">
            {{#userdate}} {{timesort}}, {{#str}} strftimerecent {{/str}} {{/userdate}}
        </div>
    </div>
    <div class="row-fluid visible-phone">
        <div class="span12">
            <div class="d-inline-block 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>
                <div class="muted text-truncate"><small>{{{course.fullnamedisplay}}}</small></div>
            </div>
            <div class="text-right text-truncate">
                {{#userdate}} {{timesort}}, {{#str}} strftimerecent {{/str}} {{/userdate}}
            </div>
        </div>
    </div>
</li>
