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_courseformat/local/content/cm/activitybadge
19
 
20
    Container to display activity badge information such as:
21
      - Unread messages for forums
22
      - File types for resources
23
 
24
    Example context (json):
25
    {
26
        "badgecontent": "PDF",
27
        "badgestyle": "badge-none",
28
        "badgeurl": "http://example.org/help",
29
        "badgeelementid": "myelementid",
30
        "badgeextraattributes": [
31
            {
32
                "name": "data-el1name",
33
                "value": "el1value"
34
            },
35
            {
36
                "name": "data-el2name",
37
                "value": "el2value"
38
            }
39
        ]
40
    }
41
}}
42
{{#badgecontent}}
43
<span
44
    {{#badgeelementid}}id="{{.}}"{{/badgeelementid}}
45
    class="ml-1"
46
    {{#badgeextraattributes}} {{name}}="{{value}}" {{/badgeextraattributes}}
47
>
48
    <span class="activitybadge badge badge-pill {{badgestyle}}">
49
        {{#badgeurl}}
50
            <a href="{{.}}">{{badgecontent}}</a>
51
        {{/badgeurl}}
52
        {{^badgeurl}}
53
            {{badgecontent}}
54
        {{/badgeurl}}
55
    </span>
56
</span>
57
{{/badgecontent}}