From ac4bb34cf26ea5147849d47bab2747473503d582 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 20 Dec 2008 01:00:52 +0000 Subject: Add admin sidebar blocks, and move the stats block into that pattern. --- core/helpers/core_block.php | 10 +++++++++- core/libraries/Admin_View.php | 1 + core/views/admin_block_stats.html.php | 5 +++++ core/views/admin_block_welcome.html.php | 12 ++++++++++++ core/views/admin_dashboard_welcome.html.php | 11 ----------- 5 files changed, 27 insertions(+), 12 deletions(-) create mode 100644 core/views/admin_block_stats.html.php create mode 100644 core/views/admin_block_welcome.html.php delete mode 100644 core/views/admin_dashboard_welcome.html.php (limited to 'core') 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 @@ + + diff --git a/core/views/admin_block_welcome.html.php b/core/views/admin_block_welcome.html.php new file mode 100644 index 00000000..d4ae475a --- /dev/null +++ b/core/views/admin_block_welcome.html.php @@ -0,0 +1,12 @@ + +

+ 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 + to tailor to your needs. The admin menu provides quick access to all of Gallery 3's options + and settings. Here are a few of the most used options to get you started. +

+ diff --git a/core/views/admin_dashboard_welcome.html.php b/core/views/admin_dashboard_welcome.html.php deleted file mode 100644 index 996adc9f..00000000 --- a/core/views/admin_dashboard_welcome.html.php +++ /dev/null @@ -1,11 +0,0 @@ -

- 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 - to tailor to your needs. The admin menu provides quick access to all of Gallery 3's options - and settings. Here are a few of the most used options to get you started. -

- -- cgit v1.2.3