MDL-59106 report_insights: show time created and time range used
[moodle.git] / theme / bootstrapbase / templates / report_insights / insights_list.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/insights_list
20     Template for the insights list.
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         "insights": [
35             {
36                 "sampleimage": "<a href=\"#\">Link</a>",
37                 "sampledescription": "Sample description",
38                 "style": "success",
39                 "outcomeicon": {
40                     "attributes": [
41                         {"name": "src", "value": "https://moodle.org/logo/moodle-logo.svg" }
42                     ]
43                 },
44                 "predictiondisplayvalue": "This dev will understand it"
45             }, {
46                 "sampleimage": "<a href=\"#\">Any renderable</a>",
47                 "sampledescription": "Another sample description",
48                 "style": "danger",
49                 "outcomeicon": {
50                     "attributes": [
51                         {"name": "src", "value": "https://moodle.org/logo/moodle-logo.svg" }
52                     ]
53                 },
54                 "predictiondisplayvalue": "This dev will not understand it"
55             }
56         ],
57         "noinsights": false
58     }
59 }}
61 {{#modelselector}}
62     <div class="m-b-2">
63         {{> core/single_select}}
64     </div>
65 {{/modelselector}}
67 <h2 class="m-b-2">{{{insightname}}}</h2>
68 {{^noinsights}}
69 {{{ pagingbar }}}
70 <table class="generaltable insights-list">
71     <caption>{{#str}}insights, report_insights{{/str}}</caption>
72     <thead>
73         <tr>
74             <th scope="col" class="col-sm-6">{{#str}}name{{/str}}</th>
75             <th scope="col" class="col-sm-4">{{#str}}prediction, report_insights{{/str}}</th>
76             <th scope="col" class="col-sm-2">{{#str}}actions{{/str}}</th>
77         </tr>
78     </thead>
79     <tbody>
80         {{#insights}}
81             {{> report_insights/insight}}
82         {{/insights}}
83     </tbody>
84 </table>
85 {{{ pagingbar }}}
86 {{/noinsights}}
87 {{#noinsights}}
88     <div class="m-t-2">
89         {{> core/notification_info}}
90     </div>
91 {{/noinsights}}