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 core_course/local/activitychooser/item
19
 
20
    Chooser item template.
21
 
22
    Example context (json):
23
    {
24
        "label": "Option name",
25
        "description": "Option description",
26
        "urls": {
27
            "addoption": "http://addoptionurl.com"
28
        },
29
        "icon": "<img class='icon' src='http://urltooptionicon' alt='icon'>",
30
        "purpose": "content",
31
        "branded": 0
32
    }
33
}}
34
<div role="menuitem" tabindex="-1" aria-label="{{title}}" class="option border-0 card m-1 bg-white" data-region="chooser-option-container" data-internal="{{name}}" data-modname="{{componentname}}_{{link}}">
35
    <div class="optioninfo card-body d-flex flex-column text-center p-1" data-region="chooser-option-info-container">
36
        <a class="d-flex flex-column justify-content-between flex-fill" href="{{link}}" title="{{#str}} addnew, moodle, {{title}} {{/str}}" tabindex="-1" data-action="add-chooser-option">
37
            <div class="optionicon mt-2 mb-1 mx-auto icon-no-margin modicon_{{name}} activityiconcontainer smaller
38
                    {{purpose}} {{#branded}}isbranded{{/branded}}">
39
                {{{icon}}}
40
            </div>
41
            <div class="optionname clamp-2">{{title}}</div>
42
        </a>
43
        <div class="optionactions d-flex justify-content-center" role="group" data-region="chooser-option-actions-container">
44
            {{^legacyitem}}
45
                <button class="btn btn-icon icon-no-margin icon-size-3 m-0 optionaction {{#favourite}}text-primary{{/favourite}}{{^favourite}}text-muted{{/favourite}}"
46
                        data-action="manage-module-favourite"
47
                        data-favourited="{{favourite}}"
48
                        data-id="{{id}}"
49
                        data-name="{{componentname}}"
50
                        data-internal="{{name}}"
51
                        {{^favourite}}
52
                            aria-pressed="false"
53
                        {{/favourite}}
54
                        {{#favourite}}
55
                            aria-pressed="true"
56
                        {{/favourite}}
57
                        aria-label="{{#str}} aria:modulefavourite, core_course, {{title}} {{/str}}"
58
                        tabindex="-1"
59
                >
60
                    {{#favourite}}
61
                        {{#pix}} i/star, core {{/pix}}
62
                    {{/favourite}}
63
                    {{^favourite}}
64
                        {{#pix}} i/star-o, core {{/pix}}
65
                    {{/favourite}}
66
                </button>
67
            {{/legacyitem}}
68
            <button class="btn btn-icon icon-no-margin icon-size-3 m-0 optionaction" data-action="show-option-summary" tabindex="-1">
69
                <span aria-hidden="true">{{#pix}} docs, core {{/pix}}</span>
70
                <span class="sr-only">{{#str}} informationformodule, core_course, {{title}} {{/str}}</span>
71
            </button>
72
        </div>
73
    </div>
74
</div>