From c2fa42cf6cf6a2742b2a40ef7fc46f95f7a734f3 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 21 Feb 2009 02:28:19 +0000 Subject: Implementation of local import module. Still need work on better status messages. --- modules/local_import/helpers/local_import_menu.php | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 modules/local_import/helpers/local_import_menu.php (limited to 'modules/local_import/helpers/local_import_menu.php') diff --git a/modules/local_import/helpers/local_import_menu.php b/modules/local_import/helpers/local_import_menu.php new file mode 100644 index 00000000..cb3029a2 --- /dev/null +++ b/modules/local_import/helpers/local_import_menu.php @@ -0,0 +1,42 @@ +get("content_menu") + ->append(Menu::factory("link") + ->id("local_import") + ->label(t("Local Import")) + ->url(url::site("admin/local_import"))); + } + + static function site($menu, $theme) { + $item = $theme->item(); + + $paths = unserialize(module::get_var("local_import", "authorized_paths")); + + if ($item && access::can("local_import", $item) && $item->is_album() &&!empty($paths)) { + $menu->get("options_menu") + ->append(Menu::factory("dialog") + ->id("local_import") + ->label(t("Import from server")) + ->url(url::site("local_import/index/$item->id"))); + } + } +} -- cgit v1.2.3