summaryrefslogtreecommitdiff
path: root/modules/digibug/helpers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-05-15 23:36:52 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-05-15 23:36:52 -0700
commit29a8ba959ec1ec1ebd14d12c2a102fd7d3fcd012 (patch)
treed1f75ca29e54e1df32d1d5589ec27b676ca092b4 /modules/digibug/helpers
parent28aee011307e37cd80e9bef0f08cb9b0270d89b5 (diff)
parent1240878df0f4a2b0ad0cdb32814717038ff2773f (diff)
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/digibug/helpers')
-rw-r--r--modules/digibug/helpers/digibug_event.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/modules/digibug/helpers/digibug_event.php b/modules/digibug/helpers/digibug_event.php
index cf7cdf21..4c842615 100644
--- a/modules/digibug/helpers/digibug_event.php
+++ b/modules/digibug/helpers/digibug_event.php
@@ -26,14 +26,17 @@ class digibug_event_Core {
->url(url::site("admin/digibug")));
}
- static function photo_menu($menu, $theme) {
+ static function site_menu($menu, $theme) {
$item = $theme->item();
- $menu->append(Menu::factory("link")
- ->id("digibug")
- ->label(t("Print with Digibug"))
- ->url(url::site("digibug/print_photo/$item->id?csrf=$theme->csrf"))
- ->css_id("g-print-digibug-link")
- ->css_class("g-print-digibug-link ui-icon-print"));
+ if ($item->type == "photo") {
+ $menu->get("options_menu")
+ ->append(Menu::factory("link")
+ ->id("digibug")
+ ->label(t("Print with Digibug"))
+ ->url(url::site("digibug/print_photo/$item->id?csrf=$theme->csrf"))
+ ->css_id("g-print-digibug-link")
+ ->css_class("g-print-digibug-link ui-icon-print"));
+ }
}
static function context_menu($menu, $theme, $item) {