65dda0fa0dd0dbd0daceb2c1ffe36ad08bee5670
[moodle.git] / theme / bootstrapbase / templates / report_insights / insight_details.mustache
1 {{!
2     This file is part of Moodle - http://moodle.org/
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.
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.
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 report_insights/insight_details
20     Actions panel at the bottom of the assignment grading UI.
22     Classes required for JS:
23     * none
25     Data attributes required for JS:
26     * none
28     Context variables required for this template:
29     * none
31     Example context (json):
32     {
33         "insightname": "Best insight ever",
34         "sampleimage": "<a href=\"#\">Link</a>",
35         "sampledescription": "Sample description",
36         "style": "success",
37         "outcomeicon": {
38             "attributes": [
39                 {"name": "src", "value": "https://moodle.org/logo/moodle-logo.svg" }
40             ]
41         },
42         "predictiondisplayvalue": "This dev will understand it",
43         "calculations": [
44             {
45                 "style": "success",
46                 "outcomeicon": {
47                     "attributes": [
48                         {"name": "src", "value": "https://moodle.org/logo/moodle-logo.svg" }
49                     ]
50                 },
51                 "name": "Indicator 1",
52                 "displayvalue": "yes"
53             }, {
54                 "style": "info",
55                 "name": "Indicator 2",
56                 "displayvalue": "20%"
57             }, {
58                 "style": "",
59                 "name": "Indicator 2",
60                 "displayvalue": "20%"
61             }, {
62                 "style": "warning",
63                 "name": "Indicator 2",
64                 "displayvalue": "20%"
65             }, {
66                 "style": "danger",
67                 "name": "Indicator 2",
68                 "displayvalue": "20%"
69             }
70         ]
71     }
72 }}
74 <h2 class="m-b-2">{{#str}}insightprediction, report_insights, {{insightname}} {{/str}}</h2>
75 <table class="generaltable insights-list">
76     <caption>{{#str}}insight, report_insights{{/str}}</caption>
77     <thead>
78         <tr>
79             <th scope="col" class="col-sm-6">{{#str}}name{{/str}}</th>
80             <th scope="col" class="col-sm-4">{{#str}}prediction, report_insights{{/str}}</th>
81             <th scope="col" class="col-sm-2">{{#str}}actions{{/str}}</th>
82         </tr>
83     </thead>
84     <tbody>
85         {{> report_insights/insight}}
86     </tbody>
87 </table>
89 <table class="generaltable prediction-calculations">
90     <caption>{{#str}}predictiondetails, report_insights{{/str}}</caption>
91     <thead>
92         <tr>
93             <th scope="col" class="col-sm-8">{{#str}}indicator, report_insights{{/str}}</th>
94             <th scope="col" class="col-sm-4">{{#str}}calculatedvalue, report_insights{{/str}}</th>
95         </tr>
96     </thead>
97     <tbody>
98     {{#calculations}}
99         <tr>
100             <td class="col-sm-8">{{name}}</td>
101             <td class="col-sm-4">{{#outcomeicon}}{{> core/pix_icon}}{{/outcomeicon}} {{displayvalue}}</td>
102         </td>
103     {{/calculations}}
104     </tbody>
105 </table>
106 {{#nocalculations}}
107     {{> core/notification_info}}
108 {{/nocalculations}}