summaryrefslogtreecommitdiff
path: root/modules/digibug/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/digibug/helpers')
-rw-r--r--modules/digibug/helpers/digibug_menu.php26
-rw-r--r--modules/digibug/helpers/digibug_theme.php11
2 files changed, 19 insertions, 18 deletions
diff --git a/modules/digibug/helpers/digibug_menu.php b/modules/digibug/helpers/digibug_menu.php
index 6d127d72..4b8db5a2 100644
--- a/modules/digibug/helpers/digibug_menu.php
+++ b/modules/digibug/helpers/digibug_menu.php
@@ -28,12 +28,24 @@ class digibug_menu {
static function photo($menu, $theme) {
$item = $theme->item();
- $csrf = access::csrf_token();
- $menu
- ->append(Menu::factory("link")
- ->id("digibug")
- ->label(t("Print with Digibug"))
- ->url(url::site("digibug/print_photo/$item->id?csrf=$csrf"))
- ->css_id("gDigibugLink"));
+ $menu->append(
+ Menu::factory("link")
+ ->id("digibug")
+ ->label(t("Print with Digibug"))
+ ->url("javascript:digibug_popup('" .
+ url::site("digibug/print_photo/$item->id?csrf=$theme->csrf") . "')")
+ ->css_id("gDigibugLink"));
+ }
+
+ static function thumb($menu, $theme, $item) {
+ if ($item->type == "photo" && access::can("view_full", $item)) {
+ $menu->append(
+ Menu::factory("link")
+ ->id("digibug")
+ ->label(t("Print with Digibug"))
+ ->url("javascript:digibug_popup('" .
+ url::site("digibug/print_photo/$item->id?csrf=$theme->csrf") . "')")
+ ->css_id("gDigibugLink"));
+ }
}
}
diff --git a/modules/digibug/helpers/digibug_theme.php b/modules/digibug/helpers/digibug_theme.php
index a8e7e5b2..3b5be3b3 100644
--- a/modules/digibug/helpers/digibug_theme.php
+++ b/modules/digibug/helpers/digibug_theme.php
@@ -21,15 +21,4 @@ class digibug_theme_Core {
static function head($theme) {
return html::script("modules/digibug/js/digibug.js");
}
-
- static function thumb_bottom($theme, $child) {
- if ($theme->page_type() == "album" && $child->type == "photo" &&
- access::can("view_full", $child)) {
- $v = new View("digibug_album.html");
- $v->id = $child->id;
- $v->title = t("Print photo with Digibug");
- return $v->render();
- }
- return "";
- }
}