diff --git a/src/lang/bg_BG.lang.php b/src/lang/bg_BG.lang.php
index a8d7d768..62c05361 100644
--- a/src/lang/bg_BG.lang.php
+++ b/src/lang/bg_BG.lang.php
@@ -58,6 +58,8 @@ $sm_lang = array(
'a_minute_ago' => 'преди минута',
'seconds_ago' => 'преди %d секунди',
'a_second_ago' => 'преди секунда',
+ 'check_all' => 'Check all',
+ 'uncheck_all' => 'Uncheck all',
),
'menu' => array(
'config' => 'Настройки',
@@ -82,8 +84,10 @@ $sm_lang = array(
'mobile' => 'Мобилен телефон',
'email' => 'Имейл',
'pushover' => 'Pushover',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_key' => 'Pushover Key',
'pushover_device' => 'Pushover Device',
+ 'pushover_device_description' => 'Device name to send the message to. Leave empty to send it to all devices.',
'delete_title' => 'Изтриване на потребител',
'delete_message' => 'Сигурни ли сте, че искате да изтриете потребител \'%1\'?',
'deleted' => 'Потребителят е изтрит успешно.',
diff --git a/src/lang/da_DK.lang.php b/src/lang/da_DK.lang.php
index d7a41588..a07c2dfc 100644
--- a/src/lang/da_DK.lang.php
+++ b/src/lang/da_DK.lang.php
@@ -58,6 +58,8 @@ $sm_lang = array(
'a_minute_ago' => 'omkring et minut siden',
'seconds_ago' => '%d sekunder siden',
'a_second_ago' => 'et sekund siden',
+ 'check_all' => 'Check all',
+ 'uncheck_all' => 'Uncheck all',
),
'menu' => array(
'config' => 'Indstillinger',
@@ -82,8 +84,10 @@ $sm_lang = array(
'mobile' => 'Mobil',
'email' => 'Email',
'pushover' => 'Pushover',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_key' => 'Pushover Key',
'pushover_device' => 'Pushover Device',
+ 'pushover_device_description' => 'Device name to send the message to. Leave empty to send it to all devices.',
'delete_title' => 'Slet bruger',
'delete_message' => 'Er du sikker på du vil slette bruger \'%1\'?',
'deleted' => 'Bruger slettet.',
diff --git a/src/lang/de_DE.lang.php b/src/lang/de_DE.lang.php
index b783b5a7..565fdf97 100644
--- a/src/lang/de_DE.lang.php
+++ b/src/lang/de_DE.lang.php
@@ -58,6 +58,8 @@ $sm_lang = array(
'a_minute_ago' => 'about a minute ago',
'seconds_ago' => '%d seconds ago',
'a_second_ago' => 'a second ago',
+ 'check_all' => 'Check all',
+ 'uncheck_all' => 'Uncheck all',
),
'menu' => array(
'config' => 'Einstellungen',
@@ -82,8 +84,10 @@ $sm_lang = array(
'mobile' => 'Mobil',
'email' => 'Email',
'pushover' => 'Pushover',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_key' => 'Pushover Key',
'pushover_device' => 'Pushover Device',
+ 'pushover_device_description' => 'Device name to send the message to. Leave empty to send it to all devices.',
'delete_title' => 'Delete User',
'delete_message' => 'Are you sure you want to delete user \'%1\'?',
'deleted' => 'User deleted.',
diff --git a/src/lang/en_US.lang.php b/src/lang/en_US.lang.php
index 9b2fb7c2..2b615a4b 100644
--- a/src/lang/en_US.lang.php
+++ b/src/lang/en_US.lang.php
@@ -58,6 +58,8 @@ $sm_lang = array(
'a_minute_ago' => 'about a minute ago',
'seconds_ago' => '%d seconds ago',
'a_second_ago' => 'a second ago',
+ 'check_all' => 'Check all',
+ 'uncheck_all' => 'Uncheck all',
),
'menu' => array(
'config' => 'Config',
@@ -82,8 +84,10 @@ $sm_lang = array(
'mobile' => 'Mobile',
'email' => 'Email',
'pushover' => 'Pushover',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_key' => 'Pushover Key',
'pushover_device' => 'Pushover Device',
+ 'pushover_device_description' => 'Device name to send the message to. Leave empty to send it to all devices.',
'delete_title' => 'Delete User',
'delete_message' => 'Are you sure you want to delete user \'%1\'?',
'deleted' => 'User deleted.',
diff --git a/src/lang/es_ES.lang.php b/src/lang/es_ES.lang.php
index 8f559538..8d4dbe75 100644
--- a/src/lang/es_ES.lang.php
+++ b/src/lang/es_ES.lang.php
@@ -58,6 +58,8 @@ $sm_lang = array(
'a_minute_ago' => 'about a minute ago',
'seconds_ago' => '%d seconds ago',
'a_second_ago' => 'a second ago',
+ 'check_all' => 'Check all',
+ 'uncheck_all' => 'Uncheck all',
),
'menu' => array(
'config' => 'Configurar',
@@ -82,8 +84,10 @@ $sm_lang = array(
'mobile' => 'Mobil',
'email' => 'Email',
'pushover' => 'Pushover',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_key' => 'Pushover Key',
'pushover_device' => 'Pushover Device',
+ 'pushover_device_description' => 'Device name to send the message to. Leave empty to send it to all devices.',
'delete_title' => 'Delete User',
'delete_message' => 'Are you sure you want to delete user \'%1\'?',
'deleted' => 'User deleted.',
diff --git a/src/lang/fr_FR.lang.php b/src/lang/fr_FR.lang.php
index 999fbd20..744e2bce 100644
--- a/src/lang/fr_FR.lang.php
+++ b/src/lang/fr_FR.lang.php
@@ -58,6 +58,8 @@ $sm_lang = array(
'a_minute_ago' => 'Il y a une minute',
'seconds_ago' => 'Il y a %d secondes',
'a_second_ago' => 'Il y a une seconde',
+ 'check_all' => 'Check all',
+ 'uncheck_all' => 'Uncheck all',
),
'menu' => array(
'config' => 'Configuration',
@@ -82,8 +84,10 @@ $sm_lang = array(
'mobile' => 'Téléphone',
'email' => 'Email',
'pushover' => 'Pushover',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_key' => 'Pushover Key',
'pushover_device' => 'Pushover Device',
+ 'pushover_device_description' => 'Device name to send the message to. Leave empty to send it to all devices.',
'delete_title' => 'Supprimer un utilisateur',
'delete_message' => 'Êtes-vous sûr de vouloir supprimer l\'utilisateur \'%1\' ?',
'deleted' => 'Utilisateur supprimé.',
diff --git a/src/lang/it_IT.lang.php b/src/lang/it_IT.lang.php
index cbab0bb9..fc8c003a 100644
--- a/src/lang/it_IT.lang.php
+++ b/src/lang/it_IT.lang.php
@@ -58,6 +58,8 @@ $sm_lang = array(
'a_minute_ago' => 'about a minute ago',
'seconds_ago' => '%d seconds ago',
'a_second_ago' => 'a second ago',
+ 'check_all' => 'Check all',
+ 'uncheck_all' => 'Uncheck all',
),
'menu' => array(
'config' => 'Configurazione',
@@ -82,8 +84,10 @@ $sm_lang = array(
'mobile' => 'Cellulare',
'email' => 'Email',
'pushover' => 'Pushover',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_key' => 'Pushover Key',
'pushover_device' => 'Pushover Device',
+ 'pushover_device_description' => 'Device name to send the message to. Leave empty to send it to all devices.',
'delete_title' => 'Delete User',
'delete_message' => 'Are you sure you want to delete user \'%1\'?',
'deleted' => 'User deleted.',
diff --git a/src/lang/ko_KR.lang.php b/src/lang/ko_KR.lang.php
index e4073f6c..659de7dc 100644
--- a/src/lang/ko_KR.lang.php
+++ b/src/lang/ko_KR.lang.php
@@ -58,6 +58,8 @@ $sm_lang = array(
'a_minute_ago' => 'about a minute ago',
'seconds_ago' => '%d seconds ago',
'a_second_ago' => 'a second ago',
+ 'check_all' => 'Check all',
+ 'uncheck_all' => 'Uncheck all',
),
'menu' => array(
'config' => '설정',
@@ -82,8 +84,10 @@ $sm_lang = array(
'mobile' => '휴대폰',
'email' => 'Email',
'pushover' => 'Pushover',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_key' => 'Pushover Key',
'pushover_device' => 'Pushover Device',
+ 'pushover_device_description' => 'Device name to send the message to. Leave empty to send it to all devices.',
'delete_title' => 'Delete User',
'delete_message' => 'Are you sure you want to delete user \'%1\'?',
'deleted' => 'User deleted.',
diff --git a/src/lang/nl_NL.lang.php b/src/lang/nl_NL.lang.php
index 19d12fc8..4de06bd1 100644
--- a/src/lang/nl_NL.lang.php
+++ b/src/lang/nl_NL.lang.php
@@ -58,6 +58,8 @@ $sm_lang = array(
'a_minute_ago' => 'een minuut geleden',
'seconds_ago' => '%d seconden geleden',
'a_second_ago' => 'een seconde geleden',
+ 'check_all' => 'Check all',
+ 'uncheck_all' => 'Uncheck all',
),
'menu' => array(
'config' => 'Config',
@@ -82,8 +84,10 @@ $sm_lang = array(
'mobile' => 'Mobiel',
'email' => 'Email',
'pushover' => 'Pushover',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_key' => 'Pushover Key',
'pushover_device' => 'Pushover Device',
+ 'pushover_device_description' => 'Device name to send the message to. Leave empty to send it to all devices.',
'delete_title' => 'Delete User',
'delete_message' => 'Are you sure you want to delete user \'%1\'?',
'deleted' => 'User deleted.',
diff --git a/src/lang/pt_BR.lang.php b/src/lang/pt_BR.lang.php
index 4094401d..3fa1936b 100644
--- a/src/lang/pt_BR.lang.php
+++ b/src/lang/pt_BR.lang.php
@@ -58,6 +58,8 @@ $sm_lang = array(
'a_minute_ago' => 'cerca de um minuto atrás',
'seconds_ago' => '%d segundos atrás',
'a_second_ago' => 'um segundo atrás',
+ 'check_all' => 'Check all',
+ 'uncheck_all' => 'Uncheck all',
),
'menu' => array(
'config' => 'Configuração',
@@ -82,8 +84,10 @@ $sm_lang = array(
'mobile' => 'Celular',
'email' => 'Email',
'pushover' => 'Pushover',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_key' => 'Pushover Key',
'pushover_device' => 'Pushover Device',
+ 'pushover_device_description' => 'Device name to send the message to. Leave empty to send it to all devices.',
'delete_title' => 'Delete User',
'delete_message' => 'Are you sure you want to delete user \'%1\'?',
'deleted' => 'User deleted.',
diff --git a/src/lang/ru_RU.lang.php b/src/lang/ru_RU.lang.php
index eb3ee58b..2d9a7d04 100644
--- a/src/lang/ru_RU.lang.php
+++ b/src/lang/ru_RU.lang.php
@@ -58,6 +58,8 @@ $sm_lang = array(
'a_minute_ago' => 'минуту назад',
'seconds_ago' => '%d секунд назад',
'a_second_ago' => 'секунду назад',
+ 'check_all' => 'Check all',
+ 'uncheck_all' => 'Uncheck all',
),
'menu' => array(
'config' => 'Параметры',
@@ -82,8 +84,10 @@ $sm_lang = array(
'mobile' => 'Телефон',
'email' => 'Email',
'pushover' => 'Pushover',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_key' => 'Pushover Key',
'pushover_device' => 'Pushover Device',
+ 'pushover_device_description' => 'Device name to send the message to. Leave empty to send it to all devices.',
'delete_title' => 'Удалить пользователя',
'delete_message' => 'Вы точно хотите удалить пользователя \'%1\'?',
'deleted' => 'Пользователь удален.',
diff --git a/src/lang/zh_CN.lang.php b/src/lang/zh_CN.lang.php
index d3ffd62a..457fc6f3 100644
--- a/src/lang/zh_CN.lang.php
+++ b/src/lang/zh_CN.lang.php
@@ -58,6 +58,8 @@ $sm_lang = array(
'a_minute_ago' => '1分钟前',
'seconds_ago' => '%d 秒前',
'a_second_ago' => '刚刚',
+ 'check_all' => 'Check all',
+ 'uncheck_all' => 'Uncheck all',
),
'menu' => array(
'config' => '设置',
@@ -82,8 +84,10 @@ $sm_lang = array(
'mobile' => '手机',
'email' => '邮件',
'pushover' => 'Pushover',
+ 'pushover_description' => 'Pushover is a service that makes it easy to get real-time notifications. See their website for more info.',
'pushover_key' => 'Pushover Key',
'pushover_device' => 'Pushover Device',
+ 'pushover_device_description' => 'Device name to send the message to. Leave empty to send it to all devices.',
'delete_title' => 'Delete User',
'delete_message' => 'Are you sure you want to delete user \'%1\'?',
'deleted' => 'User deleted.',
diff --git a/src/psm/Module/Server/Controller/AbstractServerController.class.php b/src/psm/Module/Server/Controller/AbstractServerController.class.php
index daa5434f..8d75fb37 100644
--- a/src/psm/Module/Server/Controller/AbstractServerController.class.php
+++ b/src/psm/Module/Server/Controller/AbstractServerController.class.php
@@ -103,11 +103,6 @@ abstract class AbstractServerController extends AbstractController {
$server['email'] = psm_get_lang('system', $server['email']);
$server['sms'] = psm_get_lang('system', $server['sms']);
$server['pushover'] = psm_get_lang('system', $server['pushover']);
- $server['url_view'] = psm_build_url(array(
- 'mod' => 'server',
- 'action' => 'view',
- 'id' => $server['server_id'],
- ));
if($server['status'] == 'on' && $server['warning_threshold_counter'] > 0) {
$server['status'] = 'warning';
@@ -117,6 +112,15 @@ abstract class AbstractServerController extends AbstractController {
$server['type'] = psm_get_lang('servers', 'type_' . $server['type']);
$server['timeout'] = ($server['timeout'] > 0) ? $server['timeout'] : PSM_CURL_TIMEOUT;
+ $url_actions = array('delete', 'edit', 'view');
+ foreach($url_actions as $action) {
+ $server['url_' . $action] = psm_build_url(array(
+ 'mod' => 'server',
+ 'action' => $action,
+ 'id' => $server['server_id'],
+ ));
+ }
+
return $server;
}
}
diff --git a/src/psm/Module/Server/Controller/ServerController.class.php b/src/psm/Module/Server/Controller/ServerController.class.php
index df9fe904..102abfd5 100644
--- a/src/psm/Module/Server/Controller/ServerController.class.php
+++ b/src/psm/Module/Server/Controller/ServerController.class.php
@@ -355,9 +355,12 @@ class ServerController extends AbstractServerController {
if($this->user->getUserLevel() == PSM_USER_ADMIN) {
$tpl_id_actions = 'server_view_admin_actions';
$this->tpl->newTemplate($tpl_id_actions, 'server/view.tpl.html');
- $tpl_data['html_actions'] = $this->tpl->getTemplate($tpl_id_actions);
+ // template magic: push the actions html to the front of the server array
+ // so the template handler will add it first. that way the other server vars
+ // will also be replaced in the html_actions template itself
+ $tpl_data = array('html_actions' => $this->tpl->getTemplate($tpl_id_actions)) + $tpl_data;
+
$tpl_data['url_edit'] = psm_build_url(array('mod' => 'server', 'action' => 'edit', 'id' => $this->server_id, 'back_to' => 'view'));
- $tpl_data['url_delete'] = psm_build_url(array('mod' => 'server', 'action' => 'delete', 'id' => $this->server_id));
$tpl_data['server_name'] = $server['label'];
$modal = new \psm\Util\Module\Modal($this->tpl, 'delete', \psm\Util\Module\Modal::MODAL_TYPE_DANGER);
@@ -432,6 +435,8 @@ class ServerController extends AbstractServerController {
'label_yes' => psm_get_lang('system', 'yes'),
'label_no' => psm_get_lang('system', 'no'),
'label_add_new' => psm_get_lang('system', 'add_new'),
+ 'label_check_all' => psm_get_lang('system', 'check_all'),
+ 'label_uncheck_all' => psm_get_lang('system', 'uncheck_all'),
)
);
diff --git a/src/psm/Module/User/Controller/ProfileController.class.php b/src/psm/Module/User/Controller/ProfileController.class.php
index dfc09b19..f6a261a8 100644
--- a/src/psm/Module/User/Controller/ProfileController.class.php
+++ b/src/psm/Module/User/Controller/ProfileController.class.php
@@ -132,8 +132,11 @@ class ProfileController extends AbstractController {
'label_password_repeat' => psm_get_lang('users', 'password_repeat'),
'label_level' => psm_get_lang('users', 'level'),
'label_mobile' => psm_get_lang('users', 'mobile'),
+ 'label_pushover' => psm_get_lang('users', 'pushover'),
+ 'label_pushover_description' => psm_get_lang('users', 'pushover_description'),
'label_pushover_key' => psm_get_lang('users', 'pushover_key'),
'label_pushover_device' => psm_get_lang('users', 'pushover_device'),
+ 'label_pushover_device_description' => psm_get_lang('users', 'pushover_device_description'),
'label_email' => psm_get_lang('users', 'email'),
'label_save' => psm_get_lang('system', 'save'),
)
diff --git a/src/psm/Module/User/Controller/UserController.class.php b/src/psm/Module/User/Controller/UserController.class.php
index 7a7db8a1..571ccdf2 100644
--- a/src/psm/Module/User/Controller/UserController.class.php
+++ b/src/psm/Module/User/Controller/UserController.class.php
@@ -111,6 +111,17 @@ class UserController extends AbstractController {
$user['emp_servers'] .= $servers_labels[$server_id] . '
';
}
$user['emp_servers'] = substr($user['emp_servers'], 0, -5);
+
+ $user['url_delete'] = psm_build_url(array(
+ 'mod' => 'user',
+ 'action' => 'delete',
+ 'id' => $user['user_id'],
+ ));
+ $user['url_edit'] = psm_build_url(array(
+ 'mod' => 'user',
+ 'action' => 'edit',
+ 'id' => $user['user_id'],
+ ));
}
$this->tpl->addTemplateDataRepeat($this->getTemplateId(), 'users', $users);
}
@@ -166,6 +177,11 @@ class UserController extends AbstractController {
'titlemode' => $title,
'placeholder_password' => $placeholder_password,
'edit_user_id' => $user_id,
+ 'url_save' => psm_build_url(array(
+ 'mod' => 'user',
+ 'action' => 'save',
+ 'id' => $user_id,
+ )),
);
foreach($fields_prefill as $field) {
if(isset($edit_user->$field)) {
@@ -301,8 +317,10 @@ class UserController extends AbstractController {
'label_level_description' => psm_get_lang('users', 'level_description'),
'label_mobile' => psm_get_lang('users', 'mobile'),
'label_pushover' => psm_get_lang('users', 'pushover'),
+ 'label_pushover_description' => psm_get_lang('users', 'pushover_description'),
'label_pushover_key' => psm_get_lang('users', 'pushover_key'),
'label_pushover_device' => psm_get_lang('users', 'pushover_device'),
+ 'label_pushover_device_description' => psm_get_lang('users', 'pushover_device_description'),
'label_email' => psm_get_lang('users', 'email'),
'label_servers' => psm_get_lang('menu', 'server'),
'label_action' => psm_get_lang('system', 'action'),
@@ -311,6 +329,8 @@ class UserController extends AbstractController {
'label_edit' => psm_get_lang('system', 'edit'),
'label_delete' => psm_get_lang('system', 'delete'),
'label_add_new' => psm_get_lang('system', 'add_new'),
+ 'label_check_all' => psm_get_lang('system', 'check_all'),
+ 'label_uncheck_all' => psm_get_lang('system', 'uncheck_all'),
'icon_level_10' => 'icon-admin',
'icon_level_20' => 'icon-user',
)
diff --git a/src/templates/server/server.tpl.html b/src/templates/server/server.tpl.html
index dc898841..bb8c8990 100644
--- a/src/templates/server/server.tpl.html
+++ b/src/templates/server/server.tpl.html
@@ -27,7 +27,7 @@