From e8f1ff580c6290060d1de8f3e9eceae9028fd1fa Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 3 Jan 2009 05:36:16 +0000 Subject: Add a new quick-edit mode for editing photos when viewing albums. Implement image rotation this way. --- core/helpers/core_block.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'core/helpers/core_block.php') diff --git a/core/helpers/core_block.php b/core/helpers/core_block.php index c82ca53d..d161d9b4 100644 --- a/core/helpers/core_block.php +++ b/core/helpers/core_block.php @@ -20,10 +20,30 @@ class core_block_Core { public static function head($theme) { + $buf = ""; if (Session::instance()->get("debug")) { - return ""; } + if ($theme->page_type == "album" && access::can("edit", $theme->item())) { + $buf .= ""; + $buf .= html::script("core/js/quickedit.js"); + } + return $buf; + } + + public static function thumb_top($theme, $child) { + if (access::can("edit", $child)) { + $edit_link = url::site("quick/edit/$child->id"); + return "
"; + } + } + + public static function thumb_bottom($theme, $child) { + if (access::can("edit", $child)) { + return "
"; + } } public static function admin_head($theme) { -- cgit v1.2.3