1 |
efrain |
1 |
{{!
|
|
|
2 |
This file is part of Moodle - http://moodle.org/
|
|
|
3 |
Moodle is free software: you can redistribute it and/or modify
|
|
|
4 |
it under the terms of the GNU General Public License as published by
|
|
|
5 |
the Free Software Foundation, either version 3 of the License, or
|
|
|
6 |
(at your option) any later version.
|
|
|
7 |
Moodle is distributed in the hope that it will be useful,
|
|
|
8 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
9 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
10 |
GNU General Public License for more details.
|
|
|
11 |
You should have received a copy of the GNU General Public License
|
|
|
12 |
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
13 |
}}
|
|
|
14 |
{{!
|
|
|
15 |
@template core_group/comboboxsearch/resultitem
|
|
|
16 |
|
|
|
17 |
Template for the individual result item.
|
|
|
18 |
|
|
|
19 |
Context variables required for this template:
|
|
|
20 |
* id - Group system ID.
|
|
|
21 |
* name - Groups' name.
|
|
|
22 |
* groupimageurl - The link of the groups picture.
|
|
|
23 |
|
|
|
24 |
Example context (json):
|
|
|
25 |
{
|
|
|
26 |
"id": 2,
|
|
|
27 |
"name": "Foo bar",
|
|
|
28 |
"groupimageurl": "http://foo.bar/grade/report/grader/index.php?id=42&userid=2"
|
|
|
29 |
}
|
|
|
30 |
}}
|
|
|
31 |
{{<core/local/comboboxsearch/resultitem }}
|
|
|
32 |
{{$content}}
|
|
|
33 |
<div class="pr-2 pl-1 w-25">
|
|
|
34 |
<img class="rounded-circle mx-auto img-fluid" src="{{groupimageurl}}" alt=""/>
|
|
|
35 |
</div>
|
|
|
36 |
<div class="pr-3 w-75">
|
|
|
37 |
<span class="d-block w-100 p-0 text-truncate">
|
|
|
38 |
{{name}}
|
|
|
39 |
</span>
|
|
|
40 |
</div>
|
|
|
41 |
{{/content}}
|
|
|
42 |
{{/core/local/comboboxsearch/resultitem}}
|