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 core_grades/searchwidget/searchitem
|
|
|
19 |
|
|
|
20 |
Search result line items.
|
|
|
21 |
|
|
|
22 |
Example context (json):
|
|
|
23 |
{
|
|
|
24 |
"id": "1",
|
|
|
25 |
"name": "Quiz 1",
|
|
|
26 |
"fullname": "Cameron Greeve"
|
|
|
27 |
}
|
|
|
28 |
}}
|
|
|
29 |
<li
|
|
|
30 |
role="option"
|
|
|
31 |
class="dropdown-item d-flex px-2 py-1 {{^name}}align-items-center{{/name}}"
|
|
|
32 |
{{#name}}id="item-{{id}}"{{/name}}
|
|
|
33 |
{{^name}}id="user-{{id}}"{{/name}}
|
|
|
34 |
data-value="{{id}}"
|
|
|
35 |
>
|
|
|
36 |
{{#name}}
|
|
|
37 |
<span class="pull-left result-cell text-truncate mr-2">
|
|
|
38 |
{{name}}
|
|
|
39 |
</span>
|
|
|
40 |
{{/name}}
|
|
|
41 |
{{^name}}
|
|
|
42 |
<div class="d-block pr-2 w-25">
|
|
|
43 |
{{#profileimage}}
|
|
|
44 |
<img class="userpicture w-75 mx-auto d-block" src="{{profileimage}}" alt="" />
|
|
|
45 |
{{/profileimage}}
|
|
|
46 |
{{^profileimage}}
|
|
|
47 |
<span class="userinitials"></span>
|
|
|
48 |
{{/profileimage}}
|
|
|
49 |
</div>
|
|
|
50 |
<div class="d-block pr-3 w-75">
|
|
|
51 |
<span class="w-100 p-0 font-weight-bold">
|
|
|
52 |
{{fullname}}
|
|
|
53 |
</span>
|
|
|
54 |
<span class="w-100 pull-left text-truncate small">
|
|
|
55 |
{{email}}
|
|
|
56 |
</span>
|
|
|
57 |
</div>
|
|
|
58 |
{{/name}}
|
|
|
59 |
</li>
|