summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-01-20 07:11:14 +0000
committerBharat Mediratta <bharat@menalto.com>2009-01-20 07:11:14 +0000
commit3ba056d7145ad20ed278256c10033bcb4b1a97c1 (patch)
tree1c01aa518b5714f858fb947da3f970ea7825241c
parent8384cac5e3f300c5ca13b0bf5a9c689c0b4202e9 (diff)
Add a quick edit pane for albums, too.
-rw-r--r--core/controllers/quick.php8
-rw-r--r--core/helpers/core_theme.php4
-rw-r--r--core/views/quick_pane.html.php8
3 files changed, 8 insertions, 12 deletions
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 "<div class=\"gQuick\" href=\"$edit_link\">";
}
}
static function thumb_bottom($theme, $child) {
- if ($child->type == "photo" && access::can("edit", $child)) {
+ if (access::can("edit", $child)) {
return "</div>";
}
}
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 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<? if ($item->type == "photo"): ?>
-
<a class="edit gDialogLink" href="<?= url::site("quick/form_edit/$item->id") ?>"
title="<?= t("Edit this item's metadata") ?>">
<span>
@@ -8,7 +6,7 @@
</span>
</a>
-<? if (graphics::can("rotate")): ?>
+<? if ($item->type == "photo" && graphics::can("rotate")): ?>
<a class="clockwise" href="<?= url::site("quick/rotate/$item->id/cw?csrf=" . access::csrf_token()) ?>"
title="<?= t("Rotate 90 degrees clockwise") ?>">
<span>
@@ -30,12 +28,14 @@
</span>
</a>
+<? if ($item->type == "photo"): ?>
<a class="cover" href="#"
title="<?= t("Select as album cover") ?>">
<span>
<?= t("Select as album cover") ?>
</span>
</a>
+<? endif ?>
<a class="delete" href="#"
title="<?= t("Delete this item") ?>">
@@ -50,5 +50,3 @@
<?= t("Additional options") ?>
</span>
</a>
-
-<? endif ?>