mirror of
https://github.com/moodle/moodle.git
synced 2025-08-11 11:56:40 +02:00
MDL-62491 core_privacy: Add html files to the user data export.
This adds html to the data export that allows for easier navigation and reading of data.
This commit is contained in:
parent
129783b98c
commit
e90a0a7415
12 changed files with 1321 additions and 11 deletions
110
privacy/templates/htmlpage.mustache
Normal file
110
privacy/templates/htmlpage.mustache
Normal file
|
@ -0,0 +1,110 @@
|
|||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template core_privacy/htmlpage
|
||||
|
||||
Renders the user export html page.
|
||||
This template is not for use within moodle.
|
||||
|
||||
Classes required for JS:
|
||||
* none
|
||||
|
||||
Data attributes required for JS:
|
||||
* none
|
||||
|
||||
Context variables required for this template:
|
||||
* righttoleft
|
||||
* navigation
|
||||
* systemname
|
||||
* timegenerated
|
||||
* username
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"righttoleft": 0,
|
||||
"navigation": "Navigation html",
|
||||
"systemname": "Test System",
|
||||
"siteurl": "#",
|
||||
"timegenerated": 1536906530,
|
||||
"username": "John Jones"
|
||||
}
|
||||
}}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html {{#righttoleft}}dir="rtl"{{/righttoleft}}>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Data export</title>
|
||||
{{^righttoleft}}
|
||||
<link rel="stylesheet" href="bootstrap.min.css">
|
||||
{{/righttoleft}}
|
||||
{{#righttoleft}}
|
||||
<link rel="stylesheet" href="rtlbootstrap.min.css">
|
||||
{{/righttoleft}}
|
||||
<link rel="stylesheet" type="text/css" href="general.css" />
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-light bg-light border-bottom">
|
||||
<a class="navbar-brand" href="https://www.moodle.org" title="Moodle">
|
||||
<img class="moodle-logo" src="pix/moodlelogo.svg" alt="Moodle logo" />
|
||||
</a>
|
||||
<span class="navbar-brand">{{#str}}broughtbymoodle, core_privacy{{/str}}</span>
|
||||
</nav>
|
||||
<div id="page" class="container-fluid mt-2">
|
||||
|
||||
{{{navigation}}}
|
||||
<div data-main-content class="jumbotron bg-light border">
|
||||
<h2 class="display-8">{{#str}}viewdata, core_privacy{{/str}}</h2>
|
||||
</div>
|
||||
<script src="js/jquery-3.2.1.min.js"></script>
|
||||
<script src="js/data_index.js"></script>
|
||||
<script src="js/general.js"></script>
|
||||
<script src="js/require.min.js"></script>
|
||||
<script>
|
||||
requirejs.config({
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"app": "./",
|
||||
"jquery": "./js/jquery-3.2.1.min",
|
||||
"tree": "./js/tree.min"
|
||||
}
|
||||
});
|
||||
var tree;
|
||||
|
||||
require(['tree'], function(t) {
|
||||
var tree = new t('#my-tree');
|
||||
tree.registerEnterCallback(function(item) {
|
||||
var basenode = $(item[0].childNodes[0]);
|
||||
if (basenode.attr('data-var') != undefined) {
|
||||
handleClick(basenode);
|
||||
} else if (basenode.attr('href') != undefined) {
|
||||
window.location.href = basenode.attr('href');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<hr />
|
||||
<div class="text-center text-muted">{{#str}}exportfrom, core_privacy, <a href="{{{siteurl}}}" title="{{systemname}}">{{systemname}}</a>{{/str}}</div>
|
||||
<div class="text-center text-muted">{{#str}}exporttime, core_privacy, {{#userdate}}{{timegenerated}},{{#str}}strftimedatetime, langconfig{{/str}}{{/userdate}}{{/str}}</div>
|
||||
<div class="text-center text-muted">{{#str}}exportuser, core_privacy, {{username}}{{/str}}</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
48
privacy/templates/navigation.mustache
Normal file
48
privacy/templates/navigation.mustache
Normal file
|
@ -0,0 +1,48 @@
|
|||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template core_privacy/navigation
|
||||
|
||||
Renders the Navigation section for the user export html page.
|
||||
This template is not for use within moodle.
|
||||
|
||||
Classes required for JS:
|
||||
* none
|
||||
|
||||
Data attributes required for JS:
|
||||
* none
|
||||
|
||||
Context variables required for this template:
|
||||
* navigation
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"navigation": "Navigation html"
|
||||
}
|
||||
}}
|
||||
<div id="navigation" class="bg-light border">
|
||||
<div class="m-2">
|
||||
<div class="header">
|
||||
<div class="title">
|
||||
<h2>{{#str}}navigation, core_privacy{{/str}}</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
{{{navigation}}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue