From 07a76fed0103a6553934ef7c8485c30051d2b0a4 Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Thu, 22 Dec 2011 14:16:36 +0000 Subject: [PATCH] Replace site title with string from settings table --- build/schema/mysql.demo.sql | 6 ++++++ build/schema/mysql.sql | 3 ++- source/webui/pages/home.php | 4 ++++ source/webui/templates/home.tpl | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/build/schema/mysql.demo.sql b/build/schema/mysql.demo.sql index fc40a6c..73e82d8 100644 --- a/build/schema/mysql.demo.sql +++ b/build/schema/mysql.demo.sql @@ -15,6 +15,12 @@ SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -------------------------------------------------------- +-- +-- Dumping data for table `settings` +-- + +UPDATE `settings` SET `value`='Example Status Board' WHERE `name`='site.title'; + -- -- Dumping data for table `service` -- diff --git a/build/schema/mysql.sql b/build/schema/mysql.sql index c9e3a80..3a1562b 100644 --- a/build/schema/mysql.sql +++ b/build/schema/mysql.sql @@ -43,7 +43,8 @@ INSERT INTO `settings` (`name`, `value`, `type`) VALUES ('logging.FlatFile.tmp.format', '%timestamp% %hostname%:%pid% %progname%:%file%[%line%] %message%', 'string'), ('logging.FlatFile.tmp.severity', 'debug\ninfo\nwarning\nerror', 'array(string)'), ('logging.FlatFile.tmp.category', 'webui\ndefault', 'array(string)'), -('templates.tmp_path', '/var/tmp/status-board/', 'string'); +('templates.tmp_path', '/var/tmp/status-board/', 'string'), +('site.title', 'Status Board', 'string'); -- -- Table structure for table `log` diff --git a/source/webui/pages/home.php b/source/webui/pages/home.php index 22216e9..bfce82f 100644 --- a/source/webui/pages/home.php +++ b/source/webui/pages/home.php @@ -1,6 +1,10 @@ config(); + $services = StatusBoard_Service::all(); $this->smarty->assign('services', $services); +$this->smarty->assign('site_title', $config->get('site.title', 'Status Board')); + ?> \ No newline at end of file diff --git a/source/webui/templates/home.tpl b/source/webui/templates/home.tpl index 61fafe5..dce12ae 100644 --- a/source/webui/templates/home.tpl +++ b/source/webui/templates/home.tpl @@ -1,7 +1,7 @@
-

Atos UK Networks Shared Services Status

+

{$site_title}