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 gradereport_history/user_button
19
 
20
    Template which defines a forum post for sending in a single-post HTML email.
21
 
22
    Classes required for JS:
23
    * none
24
 
25
    Data attributes required for JS:
26
    * none
27
 
28
    Example context (json):
29
    {
30
        "name": "showreport",
31
        "label": "Select users",
32
        "value": "1",
33
        "classes": "singlebutton selectusersbutton gradereport_history_plugin",
34
        "method": "get",
35
        "url": "/grade/report/history/index.php",
36
        "formid": "selectusersbutton{generated}",
37
        "params": "true",
38
        "id": "single_button{generated}",
39
        "tooltip": "Select users",
40
        "disabled": ""
41
    }
42
}}
43
<div class="{{classes}}">
44
    <div method="{{method}}" action="{{url}}" id="{{formid}}">
45
        {{#params}}
46
            <input type="hidden" name="{{name}}" value="{{value}}">
47
        {{/params}}
48
        <input type="button" class="btn btn-secondary selectortrigger"
49
            id="{{id}}"
50
            title="{{tooltip}}"
51
            value="{{label}}"
52
            {{#disabled}}disabled{{/disabled}}>
53
    </div>
54
</div>
55
{{#hasactions}}
56
    {{#js}}
57
        require(['core/yui'], function(Y) {
58
            {{#actions}}
59
                Y.on('{{event}}', {{{jsfunction}}}, '#{{id}}', null{{#jsfunctionargs}}, {{{jsfunctionargs}}}{{/jsfunctionargs}});
60
            {{/actions}}
61
        });
62
    {{/js}}
63
{{/hasactions}}