From 3ba056d7145ad20ed278256c10033bcb4b1a97c1 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 20 Jan 2009 07:11:14 +0000 Subject: Add a quick edit pane for albums, too. --- core/controllers/quick.php | 8 +++----- core/helpers/core_theme.php | 4 ++-- core/views/quick_pane.html.php | 8 +++----- 3 files changed, 8 insertions(+), 12 deletions(-) (limited to 'core') diff --git a/core/controllers/quick.php b/core/controllers/quick.php index 3f3c1f0c..e382a444 100644 --- a/core/controllers/quick.php +++ b/core/controllers/quick.php @@ -24,11 +24,9 @@ class Quick_Controller extends Controller { return ""; } - if ($item->type == "photo") { - $view = new View("quick_pane.html"); - $view->item = $item; - print $view; - } + $view = new View("quick_pane.html"); + $view->item = $item; + print $view; } public function rotate($id, $dir) { diff --git a/core/helpers/core_theme.php b/core/helpers/core_theme.php index 0ccad457..57664b48 100644 --- a/core/helpers/core_theme.php +++ b/core/helpers/core_theme.php @@ -40,14 +40,14 @@ class core_theme_Core { } static function thumb_top($theme, $child) { - if ($child->type == "photo" && access::can("edit", $child)) { + if (access::can("edit", $child)) { $edit_link = url::site("quick/pane/$child->id"); return "
"; } } static function thumb_bottom($theme, $child) { - if ($child->type == "photo" && access::can("edit", $child)) { + if (access::can("edit", $child)) { return "
"; } } diff --git a/core/views/quick_pane.html.php b/core/views/quick_pane.html.php index 2a8c66ef..44f759c8 100644 --- a/core/views/quick_pane.html.php +++ b/core/views/quick_pane.html.php @@ -1,6 +1,4 @@ -type == "photo"): ?> - id") ?>" title=""> @@ -8,7 +6,7 @@ - +type == "photo" && graphics::can("rotate")): ?> id/cw?csrf=" . access::csrf_token()) ?>" title=""> @@ -30,12 +28,14 @@ +type == "photo"): ?> "> + "> @@ -50,5 +50,3 @@ - - -- cgit v1.2.3