summaryrefslogtreecommitdiff
path: root/core/helpers/core_theme.php
diff options
context:
space:
mode:
authorChad Kieffer <chad@2tbsp.com>2009-03-31 05:14:40 +0000
committerChad Kieffer <chad@2tbsp.com>2009-03-31 05:14:40 +0000
commita57d0d93a8c741e64ac18bbb36aad4164569f266 (patch)
treeada30e528c19bbe80d3097d3437846a479f7d4a5 /core/helpers/core_theme.php
parent9f04fef3e046d7b4778ddf449589c9b1a3a67857 (diff)
Add quick edit pane to resize images, ticket #189
Diffstat (limited to 'core/helpers/core_theme.php')
-rw-r--r--core/helpers/core_theme.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/core/helpers/core_theme.php b/core/helpers/core_theme.php
index fbb8aef3..03018d48 100644
--- a/core/helpers/core_theme.php
+++ b/core/helpers/core_theme.php
@@ -25,7 +25,8 @@ class core_theme_Core {
$buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" .
url::file("core/css/debug.css") . "\" />";
}
- if ($theme->page_type == "album" && access::can("edit", $theme->item())) {
+ if (($theme->page_type == "album" || $theme->page_type == "photo")
+ && access::can("edit", $theme->item())) {
$buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" .
url::file("core/css/quick.css") . "\" />";
$buf .= html::script("core/js/quick.js");
@@ -51,6 +52,19 @@ class core_theme_Core {
return $buf;
}
+ static function resize_top($theme, $item) {
+ if (access::can("edit", $item)) {
+ $edit_link = url::site("quick/pane/$item->id");
+ return "<div class=\"gQuick\" href=\"$edit_link\">";
+ }
+ }
+
+ static function resize_bottom($theme, $item) {
+ if (access::can("edit", $item)) {
+ return "</div>";
+ }
+ }
+
static function thumb_top($theme, $child) {
if (access::can("edit", $child)) {
$edit_link = url::site("quick/pane/$child->id");