summaryrefslogtreecommitdiffstats
path: root/modules-available/dozmod/templates
diff options
context:
space:
mode:
authorSimon Rettberg2016-08-16 18:05:29 +0200
committerSimon Rettberg2016-08-16 18:05:29 +0200
commitbf3bb604fa82e0738fdb21d9bd4fd07000ed35bd (patch)
treed89f1aff06f9374ea44587542c3fd319cc727187 /modules-available/dozmod/templates
parent[render] Restore debug template generation (diff)
downloadslx-admin-bf3bb604fa82e0738fdb21d9bd4fd07000ed35bd.tar.gz
slx-admin-bf3bb604fa82e0738fdb21d9bd4fd07000ed35bd.tar.xz
slx-admin-bf3bb604fa82e0738fdb21d9bd4fd07000ed35bd.zip
[dozmod] Implement action log subpage
Diffstat (limited to 'modules-available/dozmod/templates')
-rw-r--r--modules-available/dozmod/templates/actionlog-header.html1
-rw-r--r--modules-available/dozmod/templates/actionlog-image.html30
-rw-r--r--modules-available/dozmod/templates/actionlog-lecture.html30
-rw-r--r--modules-available/dozmod/templates/actionlog-log.html41
-rw-r--r--modules-available/dozmod/templates/actionlog-user.html23
-rw-r--r--modules-available/dozmod/templates/orglist.html34
-rw-r--r--modules-available/dozmod/templates/userlist.html34
7 files changed, 163 insertions, 30 deletions
diff --git a/modules-available/dozmod/templates/actionlog-header.html b/modules-available/dozmod/templates/actionlog-header.html
new file mode 100644
index 00000000..bb32efda
--- /dev/null
+++ b/modules-available/dozmod/templates/actionlog-header.html
@@ -0,0 +1 @@
+<h2>{{lang_dozmodLogHeading}}</h2> \ No newline at end of file
diff --git a/modules-available/dozmod/templates/actionlog-image.html b/modules-available/dozmod/templates/actionlog-image.html
new file mode 100644
index 00000000..cd8c8d1d
--- /dev/null
+++ b/modules-available/dozmod/templates/actionlog-image.html
@@ -0,0 +1,30 @@
+<h3>{{lang_currentFilter}}</h3>
+<table class="table table-bordered table-striped" style="width: auto">
+ <tr>
+ <th class="text-nowrap">{{lang_image}}</th>
+ <td>{{displayname}}</td>
+ </tr>
+ <tr>
+ <th class="text-nowrap">{{lang_os}}</th>
+ <td>{{osname}}</td>
+ </tr>
+ <tr>
+ <th class="text-nowrap">{{lang_owner}}</th>
+ <td><a href="?do=dozmod&amp;section=actionlog&amp;action=showuser&amp;uuid={{ouserid}}">{{ofirstname}} {{olastname}}</a></td>
+ </tr>
+ <tr>
+ <th class="text-nowrap">{{lang_lastEditor}}</th>
+ <td><a href="?do=dozmod&amp;section=actionlog&amp;action=showuser&amp;uuid={{uuserid}}">{{ufirstname}} {{ulastname}}</a></td>
+ </tr>
+ <tr>
+ <th class="text-nowrap">{{lang_createTime}}</th>
+ <td>{{createtime_s}}</td>
+ </tr>
+ <tr>
+ <th class="text-nowrap">{{lang_updateTime}}</th>
+ <td>{{updatetime_s}}</td>
+ </tr>
+ <tr>
+ <td colspan="2">{{{descriptionHtml}}}</td>
+ </tr>
+</table> \ No newline at end of file
diff --git a/modules-available/dozmod/templates/actionlog-lecture.html b/modules-available/dozmod/templates/actionlog-lecture.html
new file mode 100644
index 00000000..4fb2b4d0
--- /dev/null
+++ b/modules-available/dozmod/templates/actionlog-lecture.html
@@ -0,0 +1,30 @@
+<h3>{{lang_currentFilter}}</h3>
+<table class="table table-bordered table-striped" style="width: auto">
+ <tr>
+ <th class="text-nowrap">{{lang_lecture}}</th>
+ <td>{{displayname}}</td>
+ </tr>
+ <tr>
+ <th class="text-nowrap">{{lang_owner}}</th>
+ <td><a href="?do=dozmod&amp;section=actionlog&amp;action=showuser&amp;uuid={{ouserid}}">{{ofirstname}} {{olastname}}</a></td>
+ </tr>
+ <tr>
+ <th class="text-nowrap">{{lang_lastEditor}}</th>
+ <td><a href="?do=dozmod&amp;section=actionlog&amp;action=showuser&amp;uuid={{uuserid}}">{{ufirstname}} {{ulastname}}</a></td>
+ </tr>
+ <tr>
+ <th class="text-nowrap">{{lang_createTime}}</th>
+ <td>{{createtime_s}}</td>
+ </tr>
+ <tr>
+ <th class="text-nowrap">{{lang_updateTime}}</th>
+ <td>{{updatetime_s}}</td>
+ </tr>
+ <tr>
+ <th class="text-nowrap">{{lang_image}}</th>
+ <td><a href="?do=dozmod&amp;section=actionlog&amp;action=showtarget&amp;uuid={{imagebaseid}}">{{imgname}}</a></td>
+ </tr>
+ <tr>
+ <td colspan="2">{{{descriptionHtml}}}</td>
+ </tr>
+</table> \ No newline at end of file
diff --git a/modules-available/dozmod/templates/actionlog-log.html b/modules-available/dozmod/templates/actionlog-log.html
new file mode 100644
index 00000000..3b523899
--- /dev/null
+++ b/modules-available/dozmod/templates/actionlog-log.html
@@ -0,0 +1,41 @@
+<table class="table table-striped table-bordered">
+ <tr>
+ <th class="text-nowrap">{{lang_when}}</th>
+ {{#showActor}}
+ <th class="text-nowrap">{{lang_user}}</th>
+ {{/showActor}}
+ {{#showTarget}}
+ <th class="text-nowrap">{{lang_actionTarget}}</th>
+ {{/showTarget}}
+ <th class="text-nowrap">{{lang_event}}</th>
+ </tr>
+ {{#events}}
+ <tr>
+ <td>{{dateline_s}}</td>
+ {{#showActor}}
+ <td>
+ {{#uuserid}}
+ <a href="?do=dozmod&amp;section=actionlog&amp;action=showuser&amp;uuid={{uuserid}}">{{ulastname}}, {{ufirstname}}</a>
+ {{/uuserid}}
+ {{^uuserid}}
+ {{lang_system}}
+ {{/uuserid}}
+ </td>
+ {{/showActor}}
+ {{#showTarget}}
+ <td>
+ {{#targeturl}}
+ <a href="{{targeturl}}">{{targetname}}</a>
+ {{/targeturl}}
+ {{^targeturl}}
+ {{targetname}}
+ {{^targetname}}
+ <span class="small">{{targetid}}</span>
+ {{/targetname}}
+ {{/targeturl}}
+ </td>
+ {{/showTarget}}
+ <td>{{description}}</td>
+ </tr>
+ {{/events}}
+</table> \ No newline at end of file
diff --git a/modules-available/dozmod/templates/actionlog-user.html b/modules-available/dozmod/templates/actionlog-user.html
new file mode 100644
index 00000000..eefe1386
--- /dev/null
+++ b/modules-available/dozmod/templates/actionlog-user.html
@@ -0,0 +1,23 @@
+<h3>{{lang_currentFilter}}</h3>
+<table class="table table-bordered table-striped" style="width: auto">
+ <tr>
+ <th class="text-nowrap">{{lang_user}}</th>
+ <td>{{firstname}} {{lastname}}</td>
+ </tr>
+ <tr>
+ <th class="text-nowrap">{{lang_userId}}</th>
+ <td>{{userid}}</td>
+ </tr>
+ <tr>
+ <th class="text-nowrap">{{lang_organization}}</th>
+ <td>{{orgname}}</td>
+ </tr>
+ <tr>
+ <th class="text-nowrap">{{lang_email}}</th>
+ <td><a href="mailto:{{email}}">{{email}}</a></td>
+ </tr>
+ <tr>
+ <th class="text-nowrap">{{lang_lastLogin}}</th>
+ <td>{{lastlogin_s}}</td>
+ </tr>
+</table> \ No newline at end of file
diff --git a/modules-available/dozmod/templates/orglist.html b/modules-available/dozmod/templates/orglist.html
index 34fa039c..bb002b3b 100644
--- a/modules-available/dozmod/templates/orglist.html
+++ b/modules-available/dozmod/templates/orglist.html
@@ -35,33 +35,35 @@ function seto(action, el, orgid) {
var v = el.checked ? '1' : '0';
var old = el.checked == true;
box.css('display', 'none');
- $.post('?do=DozMod', { token: TOKEN, action: action, organizationid: orgid, value: v }).done(function (data) {
- if (data != 1 && data != 0) {
+ $.post('?do=DozMod', { token: TOKEN, section: 'users', action: action, organizationid: orgid, value: v }).done(function (data) {
+
+ if (data !== '1' && data !== '0') {
el.checked = !old;
box.parent().css('background-color', 'red !important');
} else {
el.checked = (data == 1);
+ box.parent().css('background-color', '');
+ /* show success notification */
+ $notification = $('<span></span>')
+ .addClass('glyphicon glyphicon-saved')
+ .css('color', '#2ecc71')
+ .css('width', '0px')
+ .css('position', 'relative')
+ .css('right', '20px')
+ .hide();
+ box.before($notification);
+ $notification.fadeIn('fast', function () {
+ $notification.fadeOut('slow', function () { $notification.remove() });
+ });
}
box.css('display', '');
- /* show success notification */
- $notification = $('<span></span>')
- .addClass('glyphicon glyphicon-saved')
- .css('color', '#2ecc71')
- .css('width', '0px')
- .css('position', 'relative')
- .css('right', '20px')
- .hide();
- box.before($notification);
- $notification.fadeIn('slow', function () {$notification.fadeOut('fast');});
-
-
-
-
}).fail(function() {
+
el.checked = !old;
box.parent().css('background-color', 'red !important');
box.css('display', '');
+
});
}
diff --git a/modules-available/dozmod/templates/userlist.html b/modules-available/dozmod/templates/userlist.html
index 79d4848b..7dd84fd4 100644
--- a/modules-available/dozmod/templates/userlist.html
+++ b/modules-available/dozmod/templates/userlist.html
@@ -22,7 +22,7 @@
<tbody>
{{#users}}
<tr>
- <td class="text-left slx-nowrap">{{lastname}}, {{firstname}}</td>
+ <td class="text-left slx-nowrap"><a href="?do=dozmod&amp;section=actionlog&amp;action=showuser&amp;uuid={{userid}}">{{lastname}}, {{firstname}}</a></td>
<td class="text-left slx-nowrap">{{orgname}}</td>
<td class="text-left slx-nowrap">{{lastlogin}}</td>
<td class="text-left slx-nowrap"><a href="mailto:{{email}}">{{email}}</a></td>
@@ -44,29 +44,35 @@ function setu(action, el, uid) {
var v = el.checked ? '1' : '0';
var old = el.checked == true;
box.css('display', 'none');
- $.post('?do=DozMod', { token: TOKEN, action: action, userid: uid, value: v }).done(function (data) {
- if (data != 1 && data != 0) {
+ $.post('?do=DozMod', { token: TOKEN, section: 'users', action: action, userid: uid, value: v }).done(function (data) {
+
+ if (data !== '1' && data !== '0') {
el.checked = !old;
box.parent().css('background-color', 'red !important');
} else {
el.checked = (data == 1);
+ box.parent().css('background-color', '');
+ /* show success notification */
+ $notification = $('<span></span>')
+ .addClass('glyphicon glyphicon-saved')
+ .css('color', '#2ecc71')
+ .css('width', '0px')
+ .css('position', 'relative')
+ .css('right', '20px')
+ .hide();
+ box.before($notification);
+ $notification.fadeIn('fast', function () {
+ $notification.fadeOut('slow', function () { $notification.remove() });
+ });
}
- /* show success notification */
- $notification = $('<span></span>')
- .addClass('glyphicon glyphicon-saved')
- .css('color', '#2ecc71')
- .css('width', '0px')
- .css('position', 'relative')
- .css('right', '20px')
- .hide();
- box.before($notification);
- $notification.fadeIn('slow', function () {$notification.fadeOut('fast');});
-
box.css('display', '');
+
}).fail(function() {
+
el.checked = !old;
box.parent().css('background-color', 'red !important');
box.css('display', '');
+
});
}