diff options
Diffstat (limited to 'core/helpers')
-rw-r--r-- | core/helpers/core_menu.php | 9 | ||||
-rw-r--r-- | core/helpers/core_theme.php | 10 |
2 files changed, 16 insertions, 3 deletions
diff --git a/core/helpers/core_menu.php b/core/helpers/core_menu.php index 1564e4d4..247fd215 100644 --- a/core/helpers/core_menu.php +++ b/core/helpers/core_menu.php @@ -87,12 +87,15 @@ class core_menu_Core { } static function photo($menu, $theme) { - $menu - ->append(Menu::factory("link") + if (access::can("view_full", $theme->item())) { + $menu + ->append(Menu::factory("link") ->id("fullsize") ->label(t("View full size")) ->url("#") - ->css_id("gFullsizeLink")) + ->css_id("gFullsizeLink")); + } + $menu ->append(Menu::factory("link") ->id("album") ->label(t("Return to album")) diff --git a/core/helpers/core_theme.php b/core/helpers/core_theme.php index 57664b48..2ac7d327 100644 --- a/core/helpers/core_theme.php +++ b/core/helpers/core_theme.php @@ -29,6 +29,16 @@ class core_theme_Core { url::file("core/css/quick.css") . "\" />"; $buf .= html::script("core/js/quick.js"); } + if ($theme->page_type == "photo" && access::can("view_full", $theme->item())) { + $buf .= "<script type=\"text/javascript\" >" . + " var fullsize_detail = { " . + " close: \"" . url::file("core/images/ico-close.png") . "\", " . + " url: \"" . $theme->item()->file_url() . "\", " . + " width: " . $theme->item()->width . ", " . + " height: " . $theme->item()->height . "};" . + "</script>"; + $buf .= html::script("core/js/fullsize.js"); + } return $buf; } |