From bf3bb604fa82e0738fdb21d9bd4fd07000ed35bd Mon Sep 17 00:00:00 2001
From: Simon Rettberg
Date: Tue, 16 Aug 2016 18:05:29 +0200
Subject: [dozmod] Implement action log subpage
---
.../dozmod/templates/actionlog-header.html | 1 +
.../dozmod/templates/actionlog-image.html | 30 ++++++++++++++++
.../dozmod/templates/actionlog-lecture.html | 30 ++++++++++++++++
.../dozmod/templates/actionlog-log.html | 41 ++++++++++++++++++++++
.../dozmod/templates/actionlog-user.html | 23 ++++++++++++
modules-available/dozmod/templates/orglist.html | 34 +++++++++---------
modules-available/dozmod/templates/userlist.html | 34 ++++++++++--------
7 files changed, 163 insertions(+), 30 deletions(-)
create mode 100644 modules-available/dozmod/templates/actionlog-header.html
create mode 100644 modules-available/dozmod/templates/actionlog-image.html
create mode 100644 modules-available/dozmod/templates/actionlog-lecture.html
create mode 100644 modules-available/dozmod/templates/actionlog-log.html
create mode 100644 modules-available/dozmod/templates/actionlog-user.html
(limited to 'modules-available/dozmod/templates')
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 @@
+
{{lang_dozmodLogHeading}}
\ 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 @@
+{{lang_currentFilter}}
+
+
+ {{lang_image}} |
+ {{displayname}} |
+
+
+ {{lang_os}} |
+ {{osname}} |
+
+
+ {{lang_owner}} |
+ {{ofirstname}} {{olastname}} |
+
+
+ {{lang_lastEditor}} |
+ {{ufirstname}} {{ulastname}} |
+
+
+ {{lang_createTime}} |
+ {{createtime_s}} |
+
+
+ {{lang_updateTime}} |
+ {{updatetime_s}} |
+
+
+ {{{descriptionHtml}}} |
+
+
\ 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 @@
+{{lang_currentFilter}}
+
\ 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 @@
+
+
+ {{lang_when}} |
+ {{#showActor}}
+ {{lang_user}} |
+ {{/showActor}}
+ {{#showTarget}}
+ {{lang_actionTarget}} |
+ {{/showTarget}}
+ {{lang_event}} |
+
+ {{#events}}
+
+ {{dateline_s}} |
+ {{#showActor}}
+
+ {{#uuserid}}
+ {{ulastname}}, {{ufirstname}}
+ {{/uuserid}}
+ {{^uuserid}}
+ {{lang_system}}
+ {{/uuserid}}
+ |
+ {{/showActor}}
+ {{#showTarget}}
+
+ {{#targeturl}}
+ {{targetname}}
+ {{/targeturl}}
+ {{^targeturl}}
+ {{targetname}}
+ {{^targetname}}
+ {{targetid}}
+ {{/targetname}}
+ {{/targeturl}}
+ |
+ {{/showTarget}}
+ {{description}} |
+
+ {{/events}}
+
\ 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 @@
+{{lang_currentFilter}}
+
+
+ {{lang_user}} |
+ {{firstname}} {{lastname}} |
+
+
+ {{lang_userId}} |
+ {{userid}} |
+
+
+ {{lang_organization}} |
+ {{orgname}} |
+
+
+ {{lang_email}} |
+ {{email}} |
+
+
+ {{lang_lastLogin}} |
+ {{lastlogin_s}} |
+
+
\ 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 = $('')
+ .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 = $('')
- .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 @@
{{#users}}
- {{lastname}}, {{firstname}} |
+ {{lastname}}, {{firstname}} |
{{orgname}} |
{{lastlogin}} |
{{email}} |
@@ -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 = $('')
+ .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 = $('')
- .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', '');
+
});
}
--
cgit v1.2.3-55-g7522