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/cmname
19
 
20
    Convenience mustache to displays a course module inplace editable from the format renderer.
21
 
22
    Format plugins are free to implement an alternative inplace editable for activities.
23
 
24
    Example context (json):
25
    {
26
        "url": "#",
27
        "pluginname": "File",
28
        "textclasses": "",
29
        "modname": "resource",
30
        "activityicon": {
31
            "icon": "../../../pix/help.svg",
32
            "iconclass": "",
33
            "purpose": "content"
34
        },
35
        "activityname": {
36
            "displayvalue" : "<a href=\"#\">Moodle</a>",
37
            "value" : "Moodle",
38
            "itemid" : "1",
39
            "component" : "core_unknown",
40
            "itemtype" : "unknown",
41
            "edithint" : "Edit this",
42
            "editlabel" : "New name for this",
43
            "type" : "text",
44
            "options" : "",
45
            "linkeverything": 0
46
        }
47
    }
48
}}
49
{{#url}}
50
    {{! Icon }}
51
    {{#activityicon}}
52
        {{$ core_courseformat/local/content/cm/cmicon }}
53
            {{> core_courseformat/local/content/cm/cmicon }}
54
        {{/ core_courseformat/local/content/cm/cmicon }}
55
    {{/activityicon}}
56
 
57
    {{! Name & Badge}}
58
    <div class="activity-name-area activity-instance d-flex flex-column mr-2">
59
        <div class="activitytitle {{textclasses}} modtype_{{modname}} position-relative align-self-start">
60
            <div class="activityname">
61
                {{#activityname}}
62
                    {{$ core/inplace_editable }}
63
                        {{> core/inplace_editable }}
64
                    {{/ core/inplace_editable }}
65
                {{/activityname}}
66
                {{#activitybadge}}
67
                    {{$ core_courseformat/local/content/cm/activitybadge }}
68
                        {{> core_courseformat/local/content/cm/activitybadge }}
69
                    {{/ core_courseformat/local/content/cm/activitybadge }}
70
                {{/activitybadge}}
71
            </div>
72
        </div>
73
    </div>
74
 
75
{{/url}}