MDL-63660 privacy: Include CSS locally for data export
[moodle.git] / privacy / templates / htmlpage.mustache
blob3139ce781a64cc4a6504ad847a507d5f6da8cd17
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/>.
17 {{!
18     @template core_privacy/htmlpage
20     Renders the user export html page.
21     This template is not for use within moodle.
23     Classes required for JS:
24     * none
26     Data attributes required for JS:
27     * none
29     Context variables required for this template:
30     * righttoleft
31     * navigation
32     * systemname
33     * timegenerated
34     * username
36     Example context (json):
37     {
38         "righttoleft": 0,
39         "navigation": "Navigation html",
40         "systemname": "Test System",
41         "siteurl": "#",
42         "timegenerated": 1536906530,
43         "username": "John Jones"
44     }
47 <!DOCTYPE html>
48 <html {{#righttoleft}}dir="rtl"{{/righttoleft}}>
49 <head>
50     <meta charset="UTF-8">
51     <title>Data export</title>
52     <link rel="stylesheet" type="text/css" href="moodle.css" />
53     <link rel="stylesheet" type="text/css" href="general.css" />
54 </head>
55 <body>
56     <nav class="navbar navbar-light bg-light border-bottom">
57         <a class="navbar-brand" href="https://moodle.org" title="Moodle">
58             <img class="moodle-logo" src="pix/moodlelogo.svg" alt="Moodle logo" />
59         </a>
60         <span class="navbar-brand">{{#str}}broughtbymoodle, core_privacy{{/str}}</span>
61     </nav>
62     <div id="page" class="container-fluid mt-2">
64         {{{navigation}}}
65         <div data-main-content class="jumbotron bg-light border">
66             <h2 class="display-8">{{#str}}viewdata, core_privacy{{/str}}</h2>
67         </div>
68         <script src="js/jquery-3.2.1.min.js"></script>
69         <script src="js/data_index.js"></script>
70         <script src="js/general.js"></script>
71         <script src="js/require.min.js"></script>
72         <script>
73             requirejs.config({
74                 "baseUrl": "./",
75                 "paths": {
76                     "app": "./",
77                     "jquery": "./js/jquery-3.2.1.min",
78                     "tree": "./js/tree.min"
79                 }
80             });
81             var tree;
83             require(['tree'], function(t) {
84                 var tree = new t('#my-tree');
85                 tree.registerEnterCallback(function(item) {
86                     var basenode = $(item[0].childNodes[0]);
87                     if (basenode.attr('data-var') != undefined) {
88                         handleClick(basenode);
89                     } else if (basenode.attr('href') != undefined) {
90                         window.location.href = basenode.attr('href');
91                     }
92                 });
93             });
94         </script>
95         <footer class="footer">
96             <div class="container">
97                 <hr />
98                 <div class="text-center text-muted">{{#str}}exportfrom, core_privacy, <a href="{{{siteurl}}}" title="{{systemname}}">{{systemname}}</a>{{/str}}</div>
99                 <div class="text-center text-muted">{{#str}}exporttime, core_privacy, {{#userdate}}{{timegenerated}},{{#str}}strftimedatetime, langconfig{{/str}}{{/userdate}}{{/str}}</div>
100                 <div class="text-center text-muted">{{#str}}exportuser, core_privacy, {{username}}{{/str}}</div>
101             </div>
102         </footer>
103     </div>
104 </body>
105 </html>