From 006f18dc7ac4c40e1ca48de5bc4d8bb492bbc454 Mon Sep 17 00:00:00 2001 From: Felix Rabinovich Date: Sat, 10 Jan 2009 08:00:43 +0000 Subject: Split themes into two tabs for regular and admin themes --- core/controllers/admin_themes.php | 11 ++++-- core/views/admin_themes.html.php | 72 ++++++++++++++++++++++++++++----------- 2 files changed, 61 insertions(+), 22 deletions(-) (limited to 'core') diff --git a/core/controllers/admin_themes.php b/core/controllers/admin_themes.php index 4e9534fd..e03e9870 100644 --- a/core/controllers/admin_themes.php +++ b/core/controllers/admin_themes.php @@ -22,17 +22,24 @@ class Admin_Themes_Controller extends Admin_Controller { $view = new Admin_View("admin.html"); $view->content = new View("admin_themes.html"); $themeDir = scandir(THEMEPATH); - $themes = array(); + $themes = $admin_themes = array(); foreach ($themeDir as $theme_name) { if (substr($theme_name, 0, 1) == ".") continue; $file = THEMEPATH . $theme_name . "/theme.info"; $theme_info = new ArrayObject(parse_ini_file($file), ArrayObject::ARRAY_AS_PROPS); $details = theme::get_edit_form_admin($theme_info); $theme_info['details'] = $details; - $themes[$theme_name] = $theme_info; + if ($theme_info->regular) { + $themes[$theme_name] = $theme_info; + } + if ($theme_info->admin) { + $admin_themes[$theme_name] = $theme_info; + } } $view->content->themes = $themes; + $view->content->admin_themes = $admin_themes; $view->content->active = module::get_var("core", "active_theme"); + $view->content->active_admin = module::get_var("core", "active_admin_theme"); print $view; } diff --git a/core/views/admin_themes.html.php b/core/views/admin_themes.html.php index c9e62983..9f0cfd56 100644 --- a/core/views/admin_themes.html.php +++ b/core/views/admin_themes.html.php @@ -3,26 +3,58 @@

"> - - $theme): ?> - - - -
-
- - " alt="name ?>" /> -
- description ?>
- - name ?> -
- - " alt="name ?>" /> -
- description ?>
- name ?> -
+
+ +
+ + $theme): ?> + + + +
+
+ + " alt="name ?>" /> +
+ description ?>
+ + name ?> +
+ + " alt="name ?>" /> +
+ description ?>
+ name ?> +
+
+
+ + $theme): ?> + + + +
+
+ + " + alt="name ?>" /> +
+ description ?>
+ + name ?> +
+ + " alt="name ?>" /> +
+ description ?>
+ name ?> +
+
+
+ "/>
-- cgit v1.2.3