summaryrefslogtreecommitdiff
path: root/core/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-01-03 05:36:16 +0000
committerBharat Mediratta <bharat@menalto.com>2009-01-03 05:36:16 +0000
commite8f1ff580c6290060d1de8f3e9eceae9028fd1fa (patch)
treea4c6478e94f6236459a5c61542282329e15de333 /core/helpers
parent675cc693939199fe95c08f851bec8f4e4ea6807c (diff)
Add a new quick-edit mode for editing photos when viewing albums.
Implement image rotation this way.
Diffstat (limited to 'core/helpers')
-rw-r--r--core/helpers/core_block.php22
1 files changed, 21 insertions, 1 deletions
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 "<link rel=\"stylesheet\" type=\"text/css\" href=\"" .
+ $buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" .
url::file("core/css/debug.css") . "\" />";
}
+ if ($theme->page_type == "album" && access::can("edit", $theme->item())) {
+ $buf .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" .
+ url::file("core/css/quickedit.css") . "\" />";
+ $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 "<div class=\"gQuickEdit\" quickedit_link=\"$edit_link\">";
+ }
+ }
+
+ public static function thumb_bottom($theme, $child) {
+ if (access::can("edit", $child)) {
+ return "</div>";
+ }
}
public static function admin_head($theme) {