summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-05-13 19:48:57 +0000
committerBharat Mediratta <bharat@menalto.com>2009-05-13 19:48:57 +0000
commit12380b8b39d650e1b23b2d9f57af3f3829559d36 (patch)
tree08ff4961213e31a934c44050d718bf7b5ad80ccc
parentc52a231bc08558077788601cbd8a97cd514f1a63 (diff)
Add the "advanced settings" controller which lets you see all the
vars. We'll eventually turn this into a registry where you can edit settings directly (at your own risk).
-rw-r--r--core/controllers/admin_advanced_settings.php27
-rw-r--r--core/helpers/core_menu.php14
-rw-r--r--core/views/admin_advanced_settings.html.php21
-rw-r--r--themes/admin_default/css/screen.css4
4 files changed, 61 insertions, 5 deletions
diff --git a/core/controllers/admin_advanced_settings.php b/core/controllers/admin_advanced_settings.php
new file mode 100644
index 00000000..fab8015c
--- /dev/null
+++ b/core/controllers/admin_advanced_settings.php
@@ -0,0 +1,27 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Gallery - a web based photo album viewer and editor
+ * Copyright (C) 2000-2008 Bharat Mediratta
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+class Admin_Advanced_Settings_Controller extends Admin_Controller {
+ public function index() {
+ $view = new Admin_View("admin.html");
+ $view->content = new View("admin_advanced_settings.html");
+ $view->content->vars = ORM::factory("var")->find_all();
+ print $view;
+ }
+}
diff --git a/core/helpers/core_menu.php b/core/helpers/core_menu.php
index ca07e37e..b0a6f525 100644
--- a/core/helpers/core_menu.php
+++ b/core/helpers/core_menu.php
@@ -123,11 +123,15 @@ class core_menu_Core {
->label(t("Languages"))
->url(url::site("admin/languages")))
->append(Menu::factory("link")
- ->id("l10n_mode")
- ->label(Session::instance()->get("l10n_mode", false)
- ? t("Stop translating") : t("Start translating"))
- ->url(url::site("l10n_client/toggle_l10n_mode?csrf=" .
- access::csrf_token()))))
+ ->id("l10n_mode")
+ ->label(Session::instance()->get("l10n_mode", false)
+ ? t("Stop translating") : t("Start translating"))
+ ->url(url::site("l10n_client/toggle_l10n_mode?csrf=" .
+ access::csrf_token())))
+ ->append(Menu::factory("link")
+ ->id("advanced")
+ ->label("Advanced")
+ ->url("admin_advanced_settings")))
->append(Menu::factory("link")
->id("modules")
->label(t("Modules"))
diff --git a/core/views/admin_advanced_settings.html.php b/core/views/admin_advanced_settings.html.php
new file mode 100644
index 00000000..e2832d97
--- /dev/null
+++ b/core/views/admin_advanced_settings.html.php
@@ -0,0 +1,21 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<div id="gAdminAdvancedSettings">
+ <h1> <?= t("Advanced Settings") ?> </h1>
+ <p>
+ <?= t("Here are internal Gallery configuration settings. Most of these settings are accessible elsewhere in the administrative console. You will eventually be able to modify these directly (at your own risk).") ?>
+ </p>
+ <table>
+ <tr>
+ <th> <?= t("Module") ?> </th>
+ <th> <?= t("Name") ?> </th>
+ <th> <?= t("Value") ?></th>
+ </tr>
+ <? foreach ($vars as $var): ?>
+ <tr class="setting">
+ <td> <?= $var->module_name ?> </td>
+ <td> <?= $var->name ?> </td>
+ <td> <?= $var->value ?> </td>
+ </tr>
+ <? endforeach ?>
+ </table>
+</div>
diff --git a/themes/admin_default/css/screen.css b/themes/admin_default/css/screen.css
index 46023486..82cc90eb 100644
--- a/themes/admin_default/css/screen.css
+++ b/themes/admin_default/css/screen.css
@@ -217,6 +217,10 @@ li.gGroup {
margin-right: 1em;
}
+#gAdminAdvancedSettings tr.setting:hover {
+ background: #ffc;
+}
+
/** *******************************************************************
* 5) Browser hacks
*********************************************************************/