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/forum_discussion_nested_v2_post_reply
|
|
|
19 |
|
|
|
20 |
Template to render a single post from a discussion.
|
|
|
21 |
|
|
|
22 |
Classes required for JS:
|
|
|
23 |
* none
|
|
|
24 |
|
|
|
25 |
Data attributes required for JS:
|
|
|
26 |
* none
|
|
|
27 |
|
|
|
28 |
Example context (json):
|
|
|
29 |
{
|
|
|
30 |
}
|
|
|
31 |
}}
|
|
|
32 |
{{< mod_forum/forum_discussion_nested_v2_first_post }}
|
|
|
33 |
{{$subject}}
|
|
|
34 |
<h3
|
|
|
35 |
{{#isdeleted}}class="h6 font-weight-bold"{{/isdeleted}}
|
|
|
36 |
{{^isdeleted}}class="sr-only"{{/isdeleted}}
|
|
|
37 |
data-region-content="forum-post-core-subject"
|
|
|
38 |
>{{{subject}}}</h3>
|
|
|
39 |
{{/subject}}
|
|
|
40 |
{{$footer}}
|
|
|
41 |
{{^isdeleted}}
|
|
|
42 |
{{^readonly}}
|
|
|
43 |
{{#capabilities.reply}}
|
|
|
44 |
<div class="d-flex mt-1">
|
|
|
45 |
<button
|
|
|
46 |
class="font-weight-bold btn btn-link px-0"
|
|
|
47 |
data-href="{{{urls.reply}}}"
|
|
|
48 |
data-post-id="{{id}}"
|
|
|
49 |
data-action="create-inpage-reply"
|
|
|
50 |
data-can-reply-privately="{{capabilities.canreplyprivately}}"
|
|
|
51 |
>
|
|
|
52 |
{{#str}} reply, mod_forum {{/str}}
|
|
|
53 |
</button>
|
|
|
54 |
</div>
|
|
|
55 |
{{/capabilities.reply}}
|
|
|
56 |
{{/readonly}}
|
|
|
57 |
{{/isdeleted}}
|
|
|
58 |
{{/footer}}
|
|
|
59 |
{{$replies}}
|
|
|
60 |
<div class="indent my-4" data-region="replies-visibility-toggle-container" style="display: none">
|
|
|
61 |
<button class="btn btn-link pl-0" data-action="show-replies">
|
|
|
62 |
{{#str}}
|
|
|
63 |
showpreviousrepliescount,
|
|
|
64 |
mod_forum,
|
|
|
65 |
<span data-region="reply-count">{{#totalreplycount}}{{.}}{{/totalreplycount}}{{^totalreplycount}}0{{/totalreplycount}}</span>
|
|
|
66 |
{{/str}}
|
|
|
67 |
</button>
|
|
|
68 |
<button class="btn btn-link hidden pl-0" data-action="hide-replies">
|
|
|
69 |
{{#str}}
|
|
|
70 |
hidepreviousrepliescount,
|
|
|
71 |
mod_forum,
|
|
|
72 |
<span data-region="reply-count">{{#totalreplycount}}{{.}}{{/totalreplycount}}{{^totalreplycount}}0{{/totalreplycount}}</span>
|
|
|
73 |
{{/str}}
|
|
|
74 |
</button>
|
|
|
75 |
</div>
|
|
|
76 |
<div class="indent replies-container" data-region="replies-container">
|
|
|
77 |
{{#hasreplies}}
|
|
|
78 |
{{#replies}}
|
|
|
79 |
{{> mod_forum/forum_discussion_nested_v2_post_reply }}
|
|
|
80 |
{{/replies}}
|
|
|
81 |
{{/hasreplies}}
|
|
|
82 |
</div>
|
|
|
83 |
<div class="indent inline-reply-container" data-region="inpage-reply-container"></div>
|
|
|
84 |
{{/replies}}
|
|
|
85 |
{{/ mod_forum/forum_discussion_nested_v2_first_post }}
|