diff options
Diffstat (limited to 'modules-available')
20 files changed, 148 insertions, 50 deletions
diff --git a/modules-available/dozmod/lang/de/permissions.json b/modules-available/dozmod/lang/de/permissions.json new file mode 100644 index 00000000..07158a1d --- /dev/null +++ b/modules-available/dozmod/lang/de/permissions.json @@ -0,0 +1,14 @@ +{ + "images.delete": "Zur Löschung vorgemerkete Abbilder löschen.", + "mail.save": "Änderungen an der SMTP-Konfiguration zum Versenden von Mails speichern.", + "mail.testmail": "Eine Test E-Mail verschicken.", + "runtimeconfig.save": "Änderungen an der Laufzeit-Konfiguration speichern.", + "templates.save": "E-Mail Templates speichern.", + "templates.reset": "E-Mail Templates zurücksetzen.", + "users.setmail": "E-Mail Benachrichtigungen für einzelne Benutzer aktivieren/deaktivieren.", + "users.setlogin": "Anmeldungen für einzelne Benutzer aktivieren/deaktivieren.", + "users.setsu": "Benutzer zu SuperUser ernennen.", + "users.orglogin": "Anmeldungen für Benutzer von bestimmten Einrichtungen aktivieren/deaktivieren.", + "log.showuser": "User Data im Aktions-Log anzeigen.", + "log.showtarget": "Target Data im Aktions-Log anzeigen." +}
\ No newline at end of file diff --git a/modules-available/dozmod/lang/en/permissions.json b/modules-available/dozmod/lang/en/permissions.json new file mode 100644 index 00000000..923a8461 --- /dev/null +++ b/modules-available/dozmod/lang/en/permissions.json @@ -0,0 +1,14 @@ +{ + "images.delete": "Delete images marked for deletion.", + "mail.save": "Save SMTP configuration for sending mails.", + "mail.testmail": "Send a testmail.", + "runtimeconfig.save": "Save limits and defaults of a runtime configuration.", + "templates.save": "Save email templates.", + "templates.reset": "Reset email templates.", + "users.setmail": "Enable/Disable Email Notification.", + "users.setlogin": "Enable/Disable Login.", + "users.setsu": "Set User to superuser.", + "users.orglogin": "Enalbe/Disable Login for Users from certain organisations.", + "log.showuser": "Show User Data in Log.", + "log.showtarget": "Show Target Data in Log." +}
\ No newline at end of file diff --git a/modules-available/dozmod/permissions/permissions.json b/modules-available/dozmod/permissions/permissions.json index 294bd774..e8dfb558 100644 --- a/modules-available/dozmod/permissions/permissions.json +++ b/modules-available/dozmod/permissions/permissions.json @@ -1,14 +1,14 @@ -{ - "images.delete": "Delete images marked for deletion.", - "mail.save": "Save SMTP configuration for sending mails.", - "mail.testmail": "Send a testmail.", - "runtimeconfig.save": "Save limits and defaults of a runtime configuration.", - "templates.save": "Save email templates", - "templates.reset": "Reset email templates", - "users.setmail": "Enable/Disable Email Notification", - "users.setlogin": "Enable/Disable Login", - "users.setsu": "Set User to superuser", - "users.orglogin": "Enalbe/Disable Login for Users from certain organisations.", - "log.showuser": "Show User Data in Log", - "log.showtarget": "Show Target Data in Log" -}
\ No newline at end of file +[ + "images.delete", + "mail.save", + "mail.testmail", + "runtimeconfig.save", + "templates.save", + "templates.reset", + "users.setmail", + "users.setlogin", + "users.setsu", + "users.orglogin", + "log.showuser", + "log.showtarget" +]
\ No newline at end of file diff --git a/modules-available/internetaccess/lang/de/permissions.json b/modules-available/internetaccess/lang/de/permissions.json new file mode 100644 index 00000000..78d9e67c --- /dev/null +++ b/modules-available/internetaccess/lang/de/permissions.json @@ -0,0 +1,3 @@ +{ + "configuration.safe": "Konfiguration speichern." +}
\ No newline at end of file diff --git a/modules-available/internetaccess/lang/en/permissions.json b/modules-available/internetaccess/lang/en/permissions.json new file mode 100644 index 00000000..afe8325d --- /dev/null +++ b/modules-available/internetaccess/lang/en/permissions.json @@ -0,0 +1,3 @@ +{ + "configuration.safe": "Safe configuration." +}
\ No newline at end of file diff --git a/modules-available/internetaccess/permissions/permissions.json b/modules-available/internetaccess/permissions/permissions.json index 6d88ccc5..67998da7 100644 --- a/modules-available/internetaccess/permissions/permissions.json +++ b/modules-available/internetaccess/permissions/permissions.json @@ -1,3 +1,3 @@ -{ - "configuration.safe": "Safe new configuration." -}
\ No newline at end of file +[ + "configuration.safe" +]
\ No newline at end of file diff --git a/modules-available/locations/lang/de/permissions.json b/modules-available/locations/lang/de/permissions.json new file mode 100644 index 00000000..46dea864 --- /dev/null +++ b/modules-available/locations/lang/de/permissions.json @@ -0,0 +1,9 @@ +{ + "location.view": "Räume anschauen.", + "location.edit": "Räume bearbeiten.", + "location.add": "Räume hinzufügen.", + "location.delete": "Räume löschen.", + "subnet.edit": "Subnetze bearbeiten.", + "subnet.add": "Subnetze hinzufügen.", + "subnet.delete": "Subnetze löschen." +}
\ No newline at end of file diff --git a/modules-available/locations/lang/en/permissions.json b/modules-available/locations/lang/en/permissions.json new file mode 100644 index 00000000..db0ac5f6 --- /dev/null +++ b/modules-available/locations/lang/en/permissions.json @@ -0,0 +1,9 @@ +{ + "location.view": "View locations.", + "location.edit": "Edit locations.", + "location.add": "Add locations.", + "location.delete": "Delete locations.", + "subnet.edit": "Edit subnets.", + "subnet.add": "Add subnets.", + "subnet.delete": "Delete subnets." +}
\ No newline at end of file diff --git a/modules-available/locations/permissions/permissions.json b/modules-available/locations/permissions/permissions.json index db0ac5f6..609a673a 100644 --- a/modules-available/locations/permissions/permissions.json +++ b/modules-available/locations/permissions/permissions.json @@ -1,9 +1,9 @@ -{ - "location.view": "View locations.", - "location.edit": "Edit locations.", - "location.add": "Add locations.", - "location.delete": "Delete locations.", - "subnet.edit": "Edit subnets.", - "subnet.add": "Add subnets.", - "subnet.delete": "Delete subnets." -}
\ No newline at end of file +[ + "location.view", + "location.edit", + "location.add", + "location.delete", + "subnet.edit", + "subnet.add", + "subnet.delete" +]
\ No newline at end of file diff --git a/modules-available/news/lang/de/permissions.json b/modules-available/news/lang/de/permissions.json new file mode 100644 index 00000000..b2c6fb1b --- /dev/null +++ b/modules-available/news/lang/de/permissions.json @@ -0,0 +1,6 @@ +{ + "news.save": "Änderungen am News Text speichern.", + "news.delete": "Alte News Texte löschen.", + "help.save": "Änderungen am Hilfe Text speichern.", + "help.delete": "Alte Hilfe Texte löschen." +}
\ No newline at end of file diff --git a/modules-available/news/lang/en/permissions.json b/modules-available/news/lang/en/permissions.json new file mode 100644 index 00000000..90d07aef --- /dev/null +++ b/modules-available/news/lang/en/permissions.json @@ -0,0 +1,6 @@ +{ + "news.save": "Save new news.", + "news.delete": "Delete old news.", + "help.save": "Save new help texts.", + "help.delete": "Delete old help texts" +}
\ No newline at end of file diff --git a/modules-available/news/permissions/permissions.json b/modules-available/news/permissions/permissions.json index 90d07aef..321e73ea 100644 --- a/modules-available/news/permissions/permissions.json +++ b/modules-available/news/permissions/permissions.json @@ -1,6 +1,6 @@ -{ - "news.save": "Save new news.", - "news.delete": "Delete old news.", - "help.save": "Save new help texts.", - "help.delete": "Delete old help texts" -}
\ No newline at end of file +[ + "news.save", + "news.delete", + "help.save", + "help.delete" +]
\ No newline at end of file diff --git a/modules-available/permissionmanager/clientscript.js b/modules-available/permissionmanager/clientscript.js index 700ebc11..65065e6e 100644 --- a/modules-available/permissionmanager/clientscript.js +++ b/modules-available/permissionmanager/clientscript.js @@ -42,6 +42,12 @@ document.addEventListener("DOMContentLoaded", function() { }); } + $("tr").on('click', function (e) { + if (e.target.type !== "checkbox") { + $(this).find("input:checkbox").trigger("click"); + } + }); + $("form input").keydown(function(e) { if (e.keyCode === 13) e.preventDefault(); }); diff --git a/modules-available/permissionmanager/inc/permissionutil.inc.php b/modules-available/permissionmanager/inc/permissionutil.inc.php index 391cd047..64fe8f26 100644 --- a/modules-available/permissionmanager/inc/permissionutil.inc.php +++ b/modules-available/permissionmanager/inc/permissionutil.inc.php @@ -73,10 +73,9 @@ class PermissionUtil if (!is_array($data)) continue; preg_match('#^modules/([^/]+)/#', $file, $out); - $newData = array(); - foreach( $data as $k => $v ) { - $newData[] = $v; - $permissions = self::putInPermissionTree($out[1].".".$k, $v, $permissions); + foreach( $data as $p ) { + $description = Dictionary::translateFileModule($out[1], "permissions", $p); + $permissions = self::putInPermissionTree($out[1].".".$p, $description, $permissions); } } ksort($permissions); diff --git a/modules-available/permissionmanager/style.css b/modules-available/permissionmanager/style.css index bb03d153..8e9db0e4 100644 --- a/modules-available/permissionmanager/style.css +++ b/modules-available/permissionmanager/style.css @@ -41,6 +41,10 @@ margin-bottom: 20px; } +.selectize-input { + overflow: visible; +} + .tree-container .selected { background-color: rgba(0, 182, 41, 0.23); diff --git a/modules-available/permissionmanager/templates/rolestable.html b/modules-available/permissionmanager/templates/rolestable.html index 99401624..992feca1 100644 --- a/modules-available/permissionmanager/templates/rolestable.html +++ b/modules-available/permissionmanager/templates/rolestable.html @@ -3,11 +3,13 @@ <div class="row"> <div class="col-md-4"> - <button class="btn btn-success" type="button" onclick="openRoleEditor()"><span class="glyphicon glyphicon-plus"></span> {{lang_newRole}}</button> </div> <div class="col-md-4"> <input type="text" class="form-control" id="roleNameSearchField" onkeyup="searchFieldFunction()" placeholder="{{lang_searchPlaceholder}}"> </div> + <div class="col-md-4 text-right"> + <button class="btn btn-success" type="button" onclick="openRoleEditor()"><span class="glyphicon glyphicon-plus"></span> {{lang_newRole}}</button> + </div> </div> <div class="row"> diff --git a/modules-available/permissionmanager/templates/userstable.html b/modules-available/permissionmanager/templates/userstable.html index bd48d16d..9f684e99 100644 --- a/modules-available/permissionmanager/templates/userstable.html +++ b/modules-available/permissionmanager/templates/userstable.html @@ -3,10 +3,8 @@ <div class="row"> <div class="col-md-4"> - <button class="btn btn-success" type="button" data-toggle="modal" data-target="#addRoleToUserModal"><span class="glyphicon glyphicon-share-alt"></span> {{lang_addRole}}</button> - <button class="btn btn-danger" type="button" data-toggle="modal" data-target="#removeRoleFromUserModal"><span class="glyphicon glyphicon-trash"></span> {{lang_removeRole}}</button> </div> - <div class="col-md-4 text-left"> + <div class="col-md-4"> <select multiple name="roles[]" id="select-role"> <option value>{{lang_selectizePlaceholder}}</option> {{#roles}} @@ -14,6 +12,10 @@ {{/roles}} </select> </div> + <div class="col-md-4 text-right"> + <button class="btn btn-success" type="button" data-toggle="modal" data-target="#addRoleToUserModal"><span class="glyphicon glyphicon-share-alt"></span> {{lang_addRole}}</button> + <button class="btn btn-danger" type="button" data-toggle="modal" data-target="#removeRoleFromUserModal"><span class="glyphicon glyphicon-trash"></span> {{lang_removeRole}}</button> + </div> </div> <div class="row"> @@ -152,6 +154,7 @@ }); }); + // if remove-Role button is clicked, uncheck all checkboxes in add-role modal so they aren't submitted too function clearAddRoleModal () { $('#addRoleToUserModal') diff --git a/modules-available/statistics_reporting/lang/de/permissions.json b/modules-available/statistics_reporting/lang/de/permissions.json new file mode 100644 index 00000000..f90de252 --- /dev/null +++ b/modules-available/statistics_reporting/lang/de/permissions.json @@ -0,0 +1,10 @@ +{ + "table.view.total": "Gesamt Tabelle anschauen.", + "table.view.location": "Orte Tabelle anschauen.", + "table.view.client": "Client Tabelle anschauen.", + "table.view.user": "Benutzer Tabelle anschauen.", + "table.view.vm": "Veranstaltungen Tabelle anschauen.", + "table.export": "Tabellen als JSON/CSV/XML exportieren. Dazu werden die Rechte um die jeweiligen Tabllen anzuschauen benötigt.", + "reporting.download": "Wöchentlichen Report herunterladen.", + "reporting.change": "Einstellungen zu dem wöchentlichen Report ändern." +}
\ No newline at end of file diff --git a/modules-available/statistics_reporting/lang/en/permissions.json b/modules-available/statistics_reporting/lang/en/permissions.json new file mode 100644 index 00000000..e6e550eb --- /dev/null +++ b/modules-available/statistics_reporting/lang/en/permissions.json @@ -0,0 +1,10 @@ +{ + "table.view.total": "View total table.", + "table.view.location": "View location table.", + "table.view.client": "View client table.", + "table.view.user": "View user table.", + "table.view.vm": "View lecture table.", + "table.export": "Export tables as JSON/CSV/XML. Needs the permission to view the table to export it.", + "reporting.download": "Download weekly report.", + "reporting.change": "Change weekly reporting settings." +}
\ No newline at end of file diff --git a/modules-available/statistics_reporting/permissions/permissions.json b/modules-available/statistics_reporting/permissions/permissions.json index e6e550eb..d967b75d 100644 --- a/modules-available/statistics_reporting/permissions/permissions.json +++ b/modules-available/statistics_reporting/permissions/permissions.json @@ -1,10 +1,10 @@ -{ - "table.view.total": "View total table.", - "table.view.location": "View location table.", - "table.view.client": "View client table.", - "table.view.user": "View user table.", - "table.view.vm": "View lecture table.", - "table.export": "Export tables as JSON/CSV/XML. Needs the permission to view the table to export it.", - "reporting.download": "Download weekly report.", - "reporting.change": "Change weekly reporting settings." -}
\ No newline at end of file +[ + "table.view.total", + "table.view.location", + "table.view.client", + "table.view.user", + "table.view.vm", + "table.export", + "reporting.download", + "reporting.change" +]
\ No newline at end of file |