diff options
Diffstat (limited to 'modules-available/dozmod/templates')
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&section=actionlog&action=showuser&uuid={{ouserid}}">{{ofirstname}} {{olastname}}</a></td> + </tr> + <tr> + <th class="text-nowrap">{{lang_lastEditor}}</th> + <td><a href="?do=dozmod&section=actionlog&action=showuser&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&section=actionlog&action=showuser&uuid={{ouserid}}">{{ofirstname}} {{olastname}}</a></td> + </tr> + <tr> + <th class="text-nowrap">{{lang_lastEditor}}</th> + <td><a href="?do=dozmod&section=actionlog&action=showuser&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&section=actionlog&action=showtarget&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&section=actionlog&action=showuser&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&section=actionlog&action=showuser&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', ''); + }); } |