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_settings_body_content
|
|
|
19 |
|
|
|
20 |
This template will render the content for the body of the settings page in the message drawer.
|
|
|
21 |
|
|
|
22 |
Classes required for JS:
|
|
|
23 |
* none
|
|
|
24 |
|
|
|
25 |
Data attributes required for JS:
|
|
|
26 |
* All data attributes are required
|
|
|
27 |
|
|
|
28 |
Context variables required for this template:
|
|
|
29 |
* userid The logged in user id
|
|
|
30 |
* urls The URLs for the popover
|
|
|
31 |
|
|
|
32 |
Example context (json):
|
|
|
33 |
{}
|
|
|
34 |
|
|
|
35 |
}}
|
|
|
36 |
|
|
|
37 |
<div class="p-2 discussion-settings-container" data-container="discussion-tools">
|
|
|
38 |
<h3 class="mb-2 mt-2 h6 font-weight-bold">{{#str}} general, core {{/str}}</h3>
|
|
|
39 |
{{#capabilities.subscribe}}
|
|
|
40 |
{{< mod_forum/setting_switch}}
|
|
|
41 |
{{$switchid}}subscription-toggle-{{uniqid}}{{/switchid}}
|
|
|
42 |
{{$type}}subscription-toggle{{/type}}
|
|
|
43 |
{{$otherattributes}}
|
|
|
44 |
data-discussionid="{{id}}"
|
|
|
45 |
data-forumid="{{forumid}}"
|
|
|
46 |
{{#userstate.subscribed}}data-targetstate="0" checked{{/userstate.subscribed}}
|
|
|
47 |
{{^userstate.subscribed}}data-targetstate="1"{{/userstate.subscribed}}
|
|
|
48 |
{{/otherattributes}}
|
|
|
49 |
{{$labeltext}}
|
|
|
50 |
{{#str}} subscribediscussion, mod_forum {{/str}}
|
|
|
51 |
{{/labeltext}}
|
|
|
52 |
{{/mod_forum/setting_switch}}
|
|
|
53 |
{{/capabilities.subscribe}}
|
|
|
54 |
|
|
|
55 |
{{#capabilities.favourite}}
|
|
|
56 |
{{< mod_forum/setting_switch}}
|
|
|
57 |
{{$switchid}}favorite-toggle-{{uniqid}}{{/switchid}}
|
|
|
58 |
{{$type}}favorite-toggle{{/type}}
|
|
|
59 |
{{$otherattributes}}
|
|
|
60 |
data-discussionid="{{id}}"
|
|
|
61 |
data-forumid="{{forumid}}"
|
|
|
62 |
{{#userstate.favourited}}data-targetstate="0" checked{{/userstate.favourited}}
|
|
|
63 |
{{^userstate.favourited}}data-targetstate="1"{{/userstate.favourited}}
|
|
|
64 |
{{/otherattributes}}
|
|
|
65 |
{{$labeltext}}
|
|
|
66 |
{{#str}} addtofavourites, mod_forum {{/str}}
|
|
|
67 |
{{/labeltext}}
|
|
|
68 |
{{/mod_forum/setting_switch}}
|
|
|
69 |
{{/capabilities.favourite}}
|
|
|
70 |
|
|
|
71 |
{{#capabilities.pin}}
|
|
|
72 |
{{< mod_forum/setting_switch}}
|
|
|
73 |
{{$switchid}}pin-toggle-{{uniqid}}{{/switchid}}
|
|
|
74 |
{{$type}}pin-toggle{{/type}}
|
|
|
75 |
{{$otherattributes}}
|
|
|
76 |
data-discussionid="{{id}}"
|
|
|
77 |
data-forumid="{{forumid}}"
|
|
|
78 |
{{#pinned}}data-targetstate="0" checked{{/pinned}}
|
|
|
79 |
{{^pinned}}data-targetstate="1"{{/pinned}}
|
|
|
80 |
{{/otherattributes}}
|
|
|
81 |
{{$labeltext}}
|
|
|
82 |
{{#str}} pindiscussion, mod_forum {{/str}}
|
|
|
83 |
{{/labeltext}}
|
|
|
84 |
{{/mod_forum/setting_switch}}
|
|
|
85 |
{{/capabilities.pin}}
|
|
|
86 |
|
|
|
87 |
{{#capabilities.manage}}
|
|
|
88 |
{{^istimelocked}}
|
|
|
89 |
{{< mod_forum/setting_switch}}
|
|
|
90 |
{{$switchid}}lock-toggle-{{uniqid}}{{/switchid}}
|
|
|
91 |
{{$type}}lock-toggle{{/type}}
|
|
|
92 |
{{$otherattributes}}
|
|
|
93 |
data-discussionid="{{id}}"
|
|
|
94 |
data-forumid="{{forumid}}"
|
|
|
95 |
data-state="{{times.locked}}"
|
|
|
96 |
{{#locked}}checked{{/locked}}
|
|
|
97 |
{{/otherattributes}}
|
|
|
98 |
{{$labeltext}}
|
|
|
99 |
{{#str}} lockdiscussion, mod_forum {{/str}}
|
|
|
100 |
{{/labeltext}}
|
|
|
101 |
{{/mod_forum/setting_switch}}
|
|
|
102 |
{{/istimelocked}}
|
|
|
103 |
{{/capabilities.manage}}
|
|
|
104 |
|
|
|
105 |
{{#movediscussion}}
|
|
|
106 |
<h3 class="h6 mt-4 font-weight-bold">{{#str}} move, core {{/str}}</h3>
|
|
|
107 |
{{{.}}}
|
|
|
108 |
{{/movediscussion}}
|
|
|
109 |
|
|
|
110 |
{{#exportdiscussion}}
|
|
|
111 |
<h3 class="h6 mt-4 font-weight-bold">{{#str}} portfolio, portfolio {{/str}}</h3>
|
|
|
112 |
{{{.}}}
|
|
|
113 |
{{/exportdiscussion}}
|
|
|
114 |
</div>
|