Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
{{!
2
    This file is part of Moodle - http://moodle.org/
3
 
4
    Moodle is free software: you can redistribute it and/or modify
5
    it under the terms of the GNU General Public License as published by
6
    the Free Software Foundation, either version 3 of the License, or
7
    (at your option) any later version.
8
 
9
    Moodle is distributed in the hope that it will be useful,
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
    GNU General Public License for more details.
13
 
14
    You should have received a copy of the GNU General Public License
15
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
}}
17
{{!
18
    @template block_timeline/event-list-item
19
 
20
    This template renders an event list item for the timeline block.
21
 
22
    Example context (json):
23
    {
24
        "name": "Assignment 1 is due",
25
        "activityname": "Assignment",
26
        "activitystr": "Assignment is due",
27
        "courseview": true,
28
        "url": "https://www.google.com",
29
        "timesort": 1490320388,
30
        "course": {
31
            "fullnamedisplay": "Course 1"
32
        },
33
        "action": {
34
            "name": "Submit assignment",
35
            "url": "https://www.google.com",
36
            "itemcount": 1,
37
            "showitemcount": true,
38
            "actionable": true
39
        },
40
        "icon": {
41
            "key": "icon",
42
            "component": "mod_assign",
43
            "alttext": "Assignment icon",
44
            "iconurl": "#"
45
        },
46
        "overdue": false,
47
        "purpose": "assessment"
48
    }
49
}}
50
<div class="list-group-item timeline-event-list-item flex-column pt-2 pb-0 border-0 {{#courseview}}px-0{{/courseview}}{{^courseview}}px-2{{/courseview}}"
51
        data-region="event-list-item">
52
    <div class="d-flex flex-wrap pb-1">
53
        <div class="d-flex mr-auto pb-1 mw-100 timeline-name">
54
            <small class="text-right text-nowrap align-self-center ml-1">
55
                {{#userdate}} {{timesort}}, {{#str}} strftimetime24, core_langconfig {{/str}} {{/userdate}}
56
            </small>
57
            <div class="activityiconcontainer small courseicon align-self-top align-self-center mx-3  mb-1 mb-sm-0 text-nowrap">
58
                {{#icon}}
59
                {{#iconurl}}
60
                    <img alt="{{alttext}}" title="{{alttext}}" src="{{{ iconurl }}}" class="icon {{iconclass}}">
61
                {{/iconurl}}
62
                {{^iconurl}}
63
                    {{#pix}} {{key}}, {{component}}, {{alttext}} {{/pix}}
64
                {{/iconurl}}
65
                {{/icon}}
66
            </div>
67
            <div class="event-name-container flex-grow-1 line-height-3 nowrap text-truncate">
68
                <div class="d-flex">
69
                    <h6 class="event-name mb-0 pb-1 text-truncate">
70
                        {{#overdue}}<span class="badge rounded-pill bg-danger text-white ml-1 float-right">{{#str}} overdue, block_timeline {{/str}}</span>{{/overdue}}
71
                        <a href="{{url}}"
72
                                title="{{name}}"
73
                                aria-label='{{#cleanstr}} ariaeventlistitem, block_timeline, { "name": {{#quote}}{{{activityname}}}{{/quote}}, "course": {{#quote}}{{{course.fullnamedisplay}}}{{/quote}}, "date": "{{#userdate}} {{timesort}}, {{#str}} strftimedatetime, core_langconfig {{/str}} {{/userdate}}" } {{/cleanstr}}'>
74
                            {{{activityname}}}</a>
75
                    </h6>
76
                </div>
77
                <small class="mb-0">
78
                    {{#courseview}}
79
                        {{activitystr}}
80
                    {{/courseview}}
81
                    {{^courseview}}
82
                        {{activitystr}}{{#course.fullnamedisplay}} &middot; {{{course.fullnamedisplay}}}{{/course.fullnamedisplay}}
83
                    {{/courseview}}
84
                </small>
85
            </div>
86
        </div>
87
        {{#action.actionable}}
88
        <div class="d-flex timeline-action-button">
89
            <h6 class="event-action">
90
                <a class="list-group-item-action btn btn-outline-secondary btn-sm text-nowrap"
91
                    href="{{action.url}}"
92
                    aria-label="{{action.name}}"
93
                    title="{{action.name}}">
94
                {{{action.name}}}
95
                {{#action.showitemcount}}
96
                <span class="badge bg-secondary text-dark">{{action.itemcount}}</span>
97
                {{/action.showitemcount}}
98
                </a>
99
            </h6>
100
        </div>
101
        {{/action.actionable}}
102
    </div>
103
    <div class="pt-2 border-bottom"></div>
104
</div>