diff options
author | Simon Rettberg | 2019-03-05 10:05:16 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-03-05 10:05:16 +0100 |
commit | 783b49e12f5a96d217e950d9cc40f465b723cc7b (patch) | |
tree | 8596f0d6c19b5f80d6e8b86935e0a078c311325b | |
parent | [syslog/locationinfo] Fix install script db refs (diff) | |
download | slx-admin-783b49e12f5a96d217e950d9cc40f465b723cc7b.tar.gz slx-admin-783b49e12f5a96d217e950d9cc40f465b723cc7b.tar.xz slx-admin-783b49e12f5a96d217e950d9cc40f465b723cc7b.zip |
[main] Make product name configurable
-rw-r--r-- | config.php.example | 3 | ||||
-rw-r--r-- | inc/render.inc.php | 6 | ||||
-rw-r--r-- | modules-available/main/templates/main-menu.html | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/config.php.example b/config.php.example index 074bba5a..7bf3ad8b 100644 --- a/config.php.example +++ b/config.php.example @@ -32,6 +32,9 @@ define('CONFIG_DOZMOD_EXPIRE', 60); define('CONFIG_REPORTING_URL', 'https://bwlp-masterserver.ruf.uni-freiburg.de/rpc/'); +define('CONFIG_PRODUCT_NAME', 'OpenSLX'); +define('CONFIG_PRODUCT_NAME_LONG', 'OpenSLX Admin'); + // Sort order for menu // Optional - if missing, will be sorted by module id (internal name) // Here it is also possible to assign a module to a different category, diff --git a/inc/render.inc.php b/inc/render.inc.php index 4da0567e..58266af1 100644 --- a/inc/render.inc.php +++ b/inc/render.inc.php @@ -1,7 +1,5 @@ <?php -define('RENDER_DEFAULT_TITLE', 'OpenSLX Admin'); - require_once('inc/util.inc.php'); require_once('Mustache/Autoloader.php'); @@ -75,7 +73,7 @@ class Render '<!DOCTYPE html> <html> <head> - <title>', $title, self::$title, RENDER_DEFAULT_TITLE, '</title> + <title>', $title, self::$title, (defined('CONFIG_PRODUCT_NAME_LONG') ? CONFIG_PRODUCT_NAME_LONG : 'OpenSLX Admin'), '</title> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> @@ -250,6 +248,8 @@ class Render } // Add desired password field type $params['password_type'] = Property::getPasswordFieldType(); + // Branding + $params['product_name'] = defined('CONFIG_PRODUCT_NAME') ? CONFIG_PRODUCT_NAME : 'OpenSLX'; // Return rendered html return self::$mustache->render($html, $params); } diff --git a/modules-available/main/templates/main-menu.html b/modules-available/main/templates/main-menu.html index 55b19833..bababc17 100644 --- a/modules-available/main/templates/main-menu.html +++ b/modules-available/main/templates/main-menu.html @@ -19,7 +19,7 @@ <span class="icon-bar"></span> <span class="icon-bar"></span> </button> - <a class="navbar-brand" href="?do=Main">OpenSLX</a> + <a class="navbar-brand" href="?do=Main">{{product_name}}</a> <div id="navbar-sub" class="gray small"></div> </div> <!-- Collect the nav links, forms, and other content for toggling --> |