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_reportbuilder/local/settings/conditions
|
|
|
19 |
|
|
|
20 |
Template for custom report conditions settings area
|
|
|
21 |
|
|
|
22 |
Example context (json):
|
|
|
23 |
{
|
|
|
24 |
"conditions": [{
|
|
|
25 |
"hasavailableconditions": true,
|
|
|
26 |
"availableconditions": [{
|
|
|
27 |
"optiongroup": [{
|
|
|
28 |
"text": "User",
|
|
|
29 |
"values": [{
|
|
|
30 |
"value": 1,
|
|
|
31 |
"visiblename": "User name"
|
|
|
32 |
}]
|
|
|
33 |
}]
|
|
|
34 |
}],
|
|
|
35 |
"hasactiveconditions": true,
|
|
|
36 |
"activeconditionsform": "form"
|
|
|
37 |
}]
|
|
|
38 |
}
|
|
|
39 |
}}
|
|
|
40 |
|
|
|
41 |
<div class="p-2" data-region="settings-conditions">
|
|
|
42 |
{{#conditions}}
|
|
|
43 |
{{#hasavailableconditions}}
|
|
|
44 |
<div class="reportbuilder-conditions-select">
|
|
|
45 |
<label for="addconditionselect" class="sr-only">{{#str}} selectacondition, core_reportbuilder {{/str}}</label>
|
|
|
46 |
<select id="addconditionselect" data-action="report-add-condition" class="w-100 custom-select">
|
|
|
47 |
<option value="0"></option>
|
|
|
48 |
{{#availableconditions}}
|
|
|
49 |
{{#optiongroup}}
|
|
|
50 |
<option disabled class="suggestions-heading">{{text}}</option>
|
|
|
51 |
{{#values}}
|
|
|
52 |
<option value="{{value}}">{{visiblename}}</option>
|
|
|
53 |
{{/values}}
|
|
|
54 |
{{/optiongroup}}
|
|
|
55 |
{{/availableconditions}}
|
|
|
56 |
</select>
|
|
|
57 |
</div>
|
|
|
58 |
{{/hasavailableconditions}}
|
|
|
59 |
|
|
|
60 |
<div class="reportbuilder-conditions-list" data-region="conditions-form">
|
|
|
61 |
{{#hasactiveconditions}}
|
|
|
62 |
{{{activeconditionsform}}}
|
|
|
63 |
{{/hasactiveconditions}}
|
|
|
64 |
|
|
|
65 |
{{^hasactiveconditions}}
|
|
|
66 |
{{< core_reportbuilder/local/settings/empty_message }}
|
|
|
67 |
{{$nothingtoshow}} {{#str}} noconditions, core_reportbuilder {{/str}} {{/nothingtoshow}}
|
|
|
68 |
{{/ core_reportbuilder/local/settings/empty_message }}
|
|
|
69 |
{{/hasactiveconditions}}
|
|
|
70 |
</div>
|
|
|
71 |
{{/conditions}}
|
|
|
72 |
</div>
|