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 Licensebllsdsadfasfd
15
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
}}
17
{{!
18
    @template block_recentlyaccesseditems/view-cards
19
 
20
    This template renders the items cards of the Recently accessed items block.
21
 
22
    Example context (json):
23
    {
24
        "items": [
25
            {
26
                "cmid": 64,
27
                "courseid": 2,
28
                "coursename": "Course",
29
                "courseviewurl": "https://moodlesite/course/view.php?id=2",
30
                "icon": "<img class=\"icon\" alt=\"Forum\" title=\"Forum\" src=\"http://moodlesite/theme/image.php/universe/forum/1539858121/icon\" />",
31
                "name": "Assignment due 1",
32
                "id": 17,
33
                "modname": "Forum",
34
                "name": "Forum",
35
                "timeaccess": 1539848498,
36
                "userid": 2,
37
                "viewurl": "http://moodlesite/mod/forum?id=64"
38
            }
39
        ]
40
    }
41
}}
42
 
43
<div class="card-deck dashboard-card-deck rui-column-mh" data-region="items-list" role="list">
44
    {{#items}}
45
        <a class="rui-dashboard-card coursename d-flex p-1 mb-2 w-100" href="{{{viewurl}}}" title="{{{name}}}">
46
            <div class="card-body course-info-container">
47
                <div class="d-inline-flex align-items-start">
48
                    <div class="d-flex activityiconcontainer {{purpose}}">
49
                        {{{icon}}}
50
                    </div>
51
                    <div class="w-100 ml-2">
52
                        <h4 class="rui-block-title--sm">{{{name}}}</h4>
53
                        <small class="text-muted mb-0 line-height-3 d-block">{{{coursename}}}</small>
54
                    </div>
55
                </div>
56
            </div>
57
        </a>
58
    {{/items}}
59
</div>
60
{{#hasmoreitems}}
61
    <div data-region="more-items-button-container" class="mt-2 px-1">
62
        <button type="button" class="btn btn-secondary btn-xs" data-action="more-items">
63
            {{#str}}moreitems, block_recentlyaccesseditems {{/str}}
64
        </button>
65
    </div>
66
{{/hasmoreitems}}