diff --git a/frontend_routes.pm b/frontend_routes.pm
index 3134e8a..0c05dd9 100644
--- a/frontend_routes.pm
+++ b/frontend_routes.pm
@@ -193,6 +193,7 @@ sub handlePath {
my $privileges = $row[0];
my $manageChannelAccess = "";
+ my $addUser = "";
if($privileges>=1) { # moderator
$manageChannelAccess.="
Manage channel access
";
$manageChannelAccess.="";
- }
- my $manageServers = "";
- if($privileges==2) {
- $manageServers.="Manage servers
";
- $manageServers.="";
- }
-
- my $manageChannels = "";
- if($privileges==2) {
- $manageChannels.="Manage channels
";
- $manageChannels.="";
- }
-
- my $addUser = "";
- if($privileges==2) {
$addUser.="Add user
";
$addUser.="";
}
- frontend::sendTemplate("templates/panel.html", $aClient, {"username"=>$session->{"username"}, "manageChannelAccess"=>$manageChannelAccess, "manageServers"=>$manageServers, "manageChannels"=>$manageChannels, "addUser"=>$addUser});
+ my $addServer = "";
+ if($privileges==2) {
+ $addServer.="Add server
";
+ $addServer.="";
+ }
+
+ my $addChannel = "";
+ if($privileges==2) {
+ $addChannel.="Add channel
";
+ $addChannel.="";
+ }
+
+ frontend::sendTemplate("templates/panel.html", $aClient, {"username"=>$session->{"username"}, "manageChannelAccess"=>$manageChannelAccess, "addUser"=>$addUser, "addServer"=>$addServer, "addChannel"=>$addChannel});
return 1;
}
when("/change_password_action") {
@@ -310,7 +309,7 @@ sub handlePath {
return 1;
}
- when("/manage_server_action") {
+ when("/add_server_action") {
if(!defined($aRequest->{"cookies"}{"session"}) || !frontend_session::isValidSession($aRequest->{"cookies"}{"session"})) {
frontend::redirect($aClient, "/");
return 1;
@@ -369,7 +368,7 @@ sub handlePath {
logger::createLogger($parameters{"name"}, $parameters{"address"}, $port, ());
return 1;
}
- when("/manage_channel_action") {
+ when("/add_channel_action") {
if(!defined($aRequest->{"cookies"}{"session"}) || !frontend_session::isValidSession($aRequest->{"cookies"}{"session"})) {
frontend::redirect($aClient, "/");
return 1;
diff --git a/templates/panel.html b/templates/panel.html
index b567ba3..cec7d74 100644
--- a/templates/panel.html
+++ b/templates/panel.html
@@ -13,8 +13,8 @@
{{manageChannelAccess}}
- {{manageServers}}
- {{manageChannels}}
{{addUser}}
+ {{addServer}}
+ {{addChannel}}