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 mod_forum/discussion_lock_toggle
19
 
20
    Template to display the discussion subscription toggle.
21
 
22
    Classes required for JS:
23
    * none
24
 
25
    Data attributes required for JS:
26
    * none
27
 
28
    Context variables required for this template:
29
    * none
30
 
31
    Example context (json):
32
    {
33
        "id": 0,
34
        "locked": 1
35
    }
36
}}
37
<a
38
    class="dropdown-item menu-action"
39
    role="menuitem"
40
    data-type="lock-toggle"
41
    data-action="toggle"
42
    data-discussionid="{{id}}"
43
    data-forumid="{{forumid}}"
44
    data-state="{{times.locked}}"
45
    href="#"
46
    {{#locked}}
47
        title="{{#str}}clicktounlockdiscussion, forum{{/str}}"
48
    {{/locked}}
49
    {{^locked}}
50
        title="{{#str}}clicktolockdiscussion, forum{{/str}}"
51
    {{/locked}}
52
>
53
    <span class="menu-action-text">
54
        {{#locked}}
55
            {{#str}}unlockdiscussion, forum{{/str}}
56
        {{/locked}}
57
        {{^locked}}
58
            {{#str}}lockdiscussion, forum{{/str}}
59
        {{/locked}}
60
    </span>
61
</a>