moodle/blocks/myoverview/templates/course-event-list-item.mustache
Bas Brands 3ec69c2ece MDL-56511 theme_boost: Update to Bootstrap 4 stable
Behat fixes by David Monllao <davidm@moodle.com>
    - Blocks
    - Modals
    - Messaging styling
    - Breadcrumb
    - Pagination
    - Course & categories management
2018-04-18 09:31:53 +08:00

69 lines
2.6 KiB
Text

{{!
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/course-event-list-item
This template renders an event list item for the myoverview block
in the courses view.
Example context (json):
{
"name": "Assignment due 1",
"url": "https://www.google.com",
"timesort": 1490320388,
"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-lg-7 col-xl-8">
<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">
{{#userdate}} {{timesort}}, {{#str}} strftimerecent {{/str}} {{/userdate}}
</p>
</div>
</div>
<div class="hidden-md-down d-none d-md-block col-lg-5 col-xl-4 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>
</li>