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_search_results
|
|
|
19 |
|
|
|
20 |
Template to render results for the forum post search.
|
|
|
21 |
|
|
|
22 |
Classes required for JS:
|
|
|
23 |
* none
|
|
|
24 |
|
|
|
25 |
Data attributes required for JS:
|
|
|
26 |
* none
|
|
|
27 |
|
|
|
28 |
Example context (json):
|
|
|
29 |
{
|
|
|
30 |
"posts": [
|
|
|
31 |
{
|
|
|
32 |
"id": 1,
|
|
|
33 |
"subject": "Re: Test discussion",
|
|
|
34 |
"message": "Reply to post by Sam Student",
|
|
|
35 |
"author": {
|
|
|
36 |
"id": 2,
|
|
|
37 |
"fullname": "Sam Student"
|
|
|
38 |
},
|
|
|
39 |
"discussionid": 3,
|
|
|
40 |
"capabilities": {
|
|
|
41 |
"view": true,
|
|
|
42 |
"edit": true,
|
|
|
43 |
"delete": true,
|
|
|
44 |
"split": true,
|
|
|
45 |
"reply": true
|
|
|
46 |
},
|
|
|
47 |
"html": {
|
|
|
48 |
"authorsubheading": "by <a href=\"#\">Sam Student<\/a> - <time>Friday, 7 February 2020, 11:55 AM<\/time>"
|
|
|
49 |
},
|
|
|
50 |
"forumname": "Forum",
|
|
|
51 |
"discussionname": "<span class=\"highlight\">Test<\/span> discussion",
|
|
|
52 |
"showdiscussionname": true
|
|
|
53 |
}
|
|
|
54 |
]
|
|
|
55 |
}
|
|
|
56 |
}}
|
|
|
57 |
{{< mod_forum/forum_posts_with_context_links}}
|
|
|
58 |
{{$subjectheading}}
|
|
|
59 |
<h4 {{!
|
|
|
60 |
}}class="h6 font-weight-bold mb-0" {{!
|
|
|
61 |
}}data-region-content="forum-post-core-subject" {{!
|
|
|
62 |
}}data-reply-subject="{{replysubject}}" {{!
|
|
|
63 |
}}>
|
|
|
64 |
<ol class="breadcrumb breadcrumb--in-content my-1 forum-post-core-subject">
|
|
|
65 |
{{$subject}}
|
|
|
66 |
{{> mod_forum/forum_post_subject_with_context_links }}
|
|
|
67 |
{{/subject}}
|
|
|
68 |
</ol>
|
|
|
69 |
</h4>
|
|
|
70 |
{{/subjectheading}}
|
|
|
71 |
{{/ mod_forum/forum_posts_with_context_links}}
|