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
        },
45
        "overdue": false,
46
        "purpose": "assessment"
47
    }
48
}}
49
<div class="rui-timeline-list-group-item flex-column"
50
    data-region="event-list-item"
51
    >
52
    <div class="rui-timeline-activity-title">
53
        <div class="rui-event-date text-right text-nowrap mb-sm-4 mb-md-0">
54
            <svg width="18" height="18" fill="none" viewBox="0 0 24 24">
55
                <circle cx="12" cy="12" r="7.25" stroke="currentColor" stroke-width="2"></circle>
56
                <path  stroke="currentColor" stroke-width="2" d="M12 8V12L14 14"></path>
57
            </svg>
58
            <span class="ml-1">{{#userdate}} {{timesort}}, {{#str}} strftimetime24, core_langconfig {{/str}} {{/userdate}}</span>
59
        </div>
60
 
61
        <div class="activityiconcontainer {{purpose}} courseicon rui-event-icon d-flex align-self-top">
62
                {{#icon}}
63
                {{#iconurl}}
64
                    <img alt="{{alttext}}" title="{{alttext}}" src="{{{ iconurl }}}" class="icon {{iconclass}}">
65
                {{/iconurl}}
66
                {{^iconurl}}
67
                    {{#pix}} {{key}}, {{component}}, {{alttext}} {{/pix}}
68
                {{/iconurl}}
69
                {{/icon}}
70
        </div>
71
 
72
        <div class="w-100 py-2 mb-2 event-name-container d-flex flex-wrap align-items-center justify-content-between border-bottom">
73
            <div class="d-flex flex-wrap col px-0">
74
                <a href="{{url}}"
75
                class="rui-event-name-link w-100"
76
                title={{#quote}}{{{name}}}{{/quote}}
77
                aria-label='{{#str}} ariaeventlistitem, block_timeline, { "name": {{#quote}}{{{name}}}{{/quote}}, "course": {{#quote}}{{{course.fullnamedisplay}}}{{/quote}}, "date": "{{#userdate}} {{timesort}}, {{#str}} strftimedatetime, core_langconfig {{/str}} {{/userdate}}" } {{/str}}'
78
                ><h5 class="rui-event-name text-truncate w-100 mb-0 {{#course.fullnamedisplay}}mt-2{{/course.fullnamedisplay}}">{{{name}}}</h5></a>
79
                {{#course.fullnamedisplay}}
80
                <span class="small text-truncate text-light w-100 mb-2">{{{course.fullnamedisplay}}}</span>
81
                {{/course.fullnamedisplay}}
82
            </div>
83
            {{#action.actionable}}
84
            <div>
85
                <a class="btn btn-sm btn-secondary" href="{{action.url}}" aria-label="{{action.name}}" title="{{action.name}}" class="list-group-item-action">
86
                    {{{action.name}}}
87
                    <svg class="ml-2" width="14" height="14" fill="none" viewBox="0 0 24 24">
88
                        <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M13.75 6.75L19.25 12L13.75 17.25"></path>
89
                        <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M19 12H4.75"></path>
90
                    </svg>
91
                </a>
92
                {{#action.showitemcount}}
93
                <span class="badge badge-info">{{action.itemcount}}</span>
94
                {{/action.showitemcount}}
95
            </div>
96
            {{/action.actionable}}
97
        </div>
98
    </div>
99
</div>