diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-20 01:00:52 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-20 01:00:52 +0000 |
commit | ac4bb34cf26ea5147849d47bab2747473503d582 (patch) | |
tree | 301de6dea25e1d1c39b75becfd6ca3c22a1e0ce5 | |
parent | aee3efe972317b49329703e354cc1d90afdf9488 (diff) |
Add admin sidebar blocks, and move the stats block into that pattern.
-rw-r--r-- | core/helpers/core_block.php | 10 | ||||
-rw-r--r-- | core/libraries/Admin_View.php | 1 | ||||
-rw-r--r-- | core/views/admin_block_stats.html.php | 5 | ||||
-rw-r--r-- | core/views/admin_block_welcome.html.php (renamed from core/views/admin_dashboard_welcome.html.php) | 1 | ||||
-rw-r--r-- | themes/admin_default/views/admin.html.php | 18 |
5 files changed, 22 insertions, 13 deletions
diff --git a/core/helpers/core_block.php b/core/helpers/core_block.php index 3c1e0727..ca28c690 100644 --- a/core/helpers/core_block.php +++ b/core/helpers/core_block.php @@ -34,7 +34,15 @@ class core_block_Core { $block = new Block(); $block->id = "gWelcome"; $block->title = _("Welcome to Gallery3"); - $block->content = new View("admin_dashboard_welcome.html"); + $block->content = new View("admin_block_welcome.html"); + return $block; + } + + public static function admin_sidebar_blocks($theme) { + $block = new Block(); + $block->id = "gStats"; + $block->title = _("Gallery Stats"); + $block->content = new View("admin_block_stats.html"); return $block; } }
\ No newline at end of file diff --git a/core/libraries/Admin_View.php b/core/libraries/Admin_View.php index 548a4355..5752d659 100644 --- a/core/libraries/Admin_View.php +++ b/core/libraries/Admin_View.php @@ -66,6 +66,7 @@ class Admin_View_Core extends View { public function __call($function, $args) { switch ($function) { case "dashboard_blocks": + case "sidebar_blocks": $function = "admin_$function"; $blocks = array(); foreach (module::installed() as $module) { diff --git a/core/views/admin_block_stats.html.php b/core/views/admin_block_stats.html.php new file mode 100644 index 00000000..af427323 --- /dev/null +++ b/core/views/admin_block_stats.html.php @@ -0,0 +1,5 @@ +<? defined("SYSPATH") or die("No direct script access."); ?> +<ul> + <li>Version: 3.0</li> + <li>Your gallery has 34 albums containing 603 photos with 26 comments.</li> +</ul> diff --git a/core/views/admin_dashboard_welcome.html.php b/core/views/admin_block_welcome.html.php index 996adc9f..d4ae475a 100644 --- a/core/views/admin_dashboard_welcome.html.php +++ b/core/views/admin_block_welcome.html.php @@ -1,3 +1,4 @@ +<? defined("SYSPATH") or die("No direct script access."); ?> <p> This is your administration dashboard and it provides a quick overview of status messages, recent updates, and frequently used options. Add or remove blocks and rearrange them diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php index 0660d79a..a393546a 100644 --- a/themes/admin_default/views/admin.html.php +++ b/themes/admin_default/views/admin.html.php @@ -5,15 +5,15 @@ <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>G3: Admin Dashboard</title> - <link rel="stylesheet" href="<?= url::file("lib/yui/reset-fonts-grids.css") ?>" + <link rel="stylesheet" href="<?= url::file("lib/yui/reset-fonts-grids.css") ?>" type="text/css" media="screen,projection"> - <link rel="stylesheet" href="<?= url::file("themes/default/css/screen.css") ?>" + <link rel="stylesheet" href="<?= url::file("themes/default/css/screen.css") ?>" type="text/css" media="screen,projection"> - <link rel="stylesheet" href="<?= $theme->url("css/screen.css") ?>" + <link rel="stylesheet" href="<?= $theme->url("css/screen.css") ?>" type="text/css" media="screen,projection"> - <link rel="stylesheet" href="<?= $theme->url("css/superfish.css") ?>" + <link rel="stylesheet" href="<?= $theme->url("css/superfish.css") ?>" type="text/css" media="screen,projection"> - <link rel="stylesheet" href="<?= $theme->url("css/superfish-navbar.css") ?>" + <link rel="stylesheet" href="<?= $theme->url("css/superfish-navbar.css") ?>" type="text/css" media="screen,projection"> <script src="<?= url::file("lib/jquery.js") ?>" type="text/javascript"></script> <script src="<?= url::file("lib/jquery-ui.packed.js") ?>" type="text/javascript"></script> @@ -58,13 +58,7 @@ </form> </div> - <div id="gPlatform" class="gBlock"> - <h2>Gallery Stats</h2> - <ul class="gBlockContent"> - <li>Version: 3.0</li> - <li>Your gallery has 34 albums containing 603 photos with 26 comments.</li> - </ul> - </div> + <?= $theme->sidebar_blocks() ?> <div id="gPlatform" class="gBlock"> <h2>Platform Information</h2> |