From 04add75f6ff7596319b01c635cb62fafacf504cf Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 22 Aug 2010 00:27:24 -0700 Subject: Get rid of the move dialog and move option. Instead, replace it with a call to Organize with the appropriate album open. I have not yet figured out how to get the SWF code to highlight the active image, but that's coming. Partial fix for #1204. --- modules/organize/helpers/organize_event.php | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'modules/organize/helpers') diff --git a/modules/organize/helpers/organize_event.php b/modules/organize/helpers/organize_event.php index ae05fb5d..1593d30e 100644 --- a/modules/organize/helpers/organize_event.php +++ b/modules/organize/helpers/organize_event.php @@ -32,13 +32,23 @@ class organize_event_Core { } static function context_menu($menu, $theme, $item) { - if ($item->is_album() && access::can("edit", $item)) { - $menu->get("options_menu") - ->append(Menu::factory("dialog") - ->id("organize") - ->label(t("Organize album")) - ->css_class("ui-icon-folder-open g-organize-link") - ->url(url::site("organize/dialog/{$item->id}"))); + if (access::can("edit", $item)) { + if ($item->is_album()) { + $menu->get("options_menu") + ->append(Menu::factory("dialog") + ->id("organize") + ->label(t("Organize album")) + ->css_class("ui-icon-folder-open g-organize-link") + ->url(url::site("organize/dialog/{$item->id}"))); + } else { + $parent = $item->parent(); + $menu->get("options_menu") + ->append(Menu::factory("dialog") + ->id("move") + ->label(t("Move to another album")) + ->css_class("ui-icon-folder-open g-organize-link") + ->url(url::site("organize/dialog/{$parent->id}?selected_id={$item->id}"))); + } } } -- cgit v1.2.3 From 922b810c56bc42a5d3df957cae82c0e70642f8fa Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 28 Aug 2010 21:25:09 -0700 Subject: Oops, forgot to create an install() function and set the version of the organize module to 2 in 8fb56abf034dd1f5c561e7af12bf6e097a3de6f6 --- installer/install.sql | 2 +- modules/organize/helpers/organize_installer.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/organize/helpers') diff --git a/installer/install.sql b/installer/install.sql index c6314aa7..058bc882 100644 --- a/installer/install.sql +++ b/installer/install.sql @@ -247,7 +247,7 @@ CREATE TABLE {modules} ( INSERT INTO {modules} VALUES (1,1,'gallery',34,1); INSERT INTO {modules} VALUES (2,1,'user',3,2); INSERT INTO {modules} VALUES (3,1,'comment',3,3); -INSERT INTO {modules} VALUES (4,1,'organize',1,4); +INSERT INTO {modules} VALUES (4,1,'organize',2,4); INSERT INTO {modules} VALUES (5,1,'info',1,5); INSERT INTO {modules} VALUES (6,1,'rest',3,6); INSERT INTO {modules} VALUES (7,1,'rss',1,7); diff --git a/modules/organize/helpers/organize_installer.php b/modules/organize/helpers/organize_installer.php index bbe6fc65..12d8147f 100644 --- a/modules/organize/helpers/organize_installer.php +++ b/modules/organize/helpers/organize_installer.php @@ -22,6 +22,10 @@ class organize_installer { site_status::clear("organize_needs_rest"); } + static function install() { + module::set_version("organize", $version = 2); + } + static function upgrade($version) { if ($version == 1) { if (!module::is_active("rest")) { -- cgit v1.2.3 From 2c717b18d36f8d4ae6b7b94beeb0fd99a2984c9a Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 29 Aug 2010 20:04:02 -0700 Subject: Don't concatenate two strings together as an argument for t() or t2(); the l10n_scanner cannot parse it properly and drops those from the localization list. Fixes ticket #1284. --- modules/g2_import/helpers/g2_import.php | 3 +-- modules/gallery/helpers/gallery_task.php | 3 +-- modules/gallery/helpers/graphics.php | 6 ++---- modules/gallery/libraries/IdentityProvider.php | 6 ++---- modules/organize/helpers/organize_event.php | 3 +-- modules/organize/helpers/organize_installer.php | 3 +-- modules/organize/views/organize_dialog.html.php | 3 +-- modules/slideshow/helpers/slideshow_event.php | 3 +-- 8 files changed, 10 insertions(+), 20 deletions(-) (limited to 'modules/organize/helpers') diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index f2e9dad9..3753c5f2 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -689,8 +689,7 @@ class g2_import_Core { $title = $g2_item->getTitle(); $title or $title = $g2_item->getPathComponent(); $messages[] = - t("%title from Gallery 2 could not be processed; " . - "(imported as %title)", + t("%title from Gallery 2 could not be processed; (imported as %title)", array("g2_url" => $g2_item_url, "g3_url" => $item->url(), "title" => $title)); diff --git a/modules/gallery/helpers/gallery_task.php b/modules/gallery/helpers/gallery_task.php index 6a1fc28a..0886aad0 100644 --- a/modules/gallery/helpers/gallery_task.php +++ b/modules/gallery/helpers/gallery_task.php @@ -58,8 +58,7 @@ class gallery_task_Core { $tasks[] = Task_Definition::factory() ->callback("gallery_task::fix") ->name(t("Fix your Gallery")) - ->description(t("Fix a variety of problems that might cause your Gallery to act " . - "strangely. Requires maintenance mode.")) + ->description(t("Fix a variety of problems that might cause your Gallery to act strangely. Requires maintenance mode.")) ->severity(log::SUCCESS); return $tasks; diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index cc4d2e76..bb085ea5 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -338,8 +338,7 @@ class graphics_Core { } else { $toolkits->imagemagick->installed = false; $toolkits->imagemagick->error = - t("ImageMagick is installed, but PHP's open_basedir restriction " . - "prevents Gallery from using it."); + t("ImageMagick is installed, but PHP's open_basedir restriction prevents Gallery from using it."); } } else { $toolkits->imagemagick->installed = false; @@ -363,8 +362,7 @@ class graphics_Core { } else { $toolkits->graphicsmagick->installed = false; $toolkits->graphicsmagick->error = - t("GraphicsMagick is installed, but PHP's open_basedir restriction " . - "prevents Gallery from using it."); + t("GraphicsMagick is installed, but PHP's open_basedir restriction prevents Gallery from using it."); } } else { $toolkits->graphicsmagick->installed = false; diff --git a/modules/gallery/libraries/IdentityProvider.php b/modules/gallery/libraries/IdentityProvider.php index 5f341c90..4ef07e1a 100644 --- a/modules/gallery/libraries/IdentityProvider.php +++ b/modules/gallery/libraries/IdentityProvider.php @@ -61,8 +61,7 @@ class IdentityProvider_Core { * Return a commen confirmation message */ static function confirmation_message() { - return t("Are you sure you want to change your Identity Provider? " . - "Continuing will delete all existing users."); + return t("Are you sure you want to change your Identity Provider? Continuing will delete all existing users."); } static function change_provider($new_provider) { @@ -113,8 +112,7 @@ class IdentityProvider_Core { } message::error( - t("Error attempting to enable \"%new_provider\" identity provider, " . - "reverted to \"%old_provider\" identity provider", + t("Error attempting to enable \"%new_provider\" identity provider, reverted to \"%old_provider\" identity provider", array("new_provider" => $new_provider, "old_provider" => $current_provider))); $restore_already_running = false; diff --git a/modules/organize/helpers/organize_event.php b/modules/organize/helpers/organize_event.php index 1593d30e..2f997600 100644 --- a/modules/organize/helpers/organize_event.php +++ b/modules/organize/helpers/organize_event.php @@ -61,8 +61,7 @@ class organize_event_Core { static function module_change($changes) { if (!module::is_active("rest") || in_array("rest", $changes->deactivate)) { site_status::warning( - t("The Organize module requires the Rest module. " . - "Activate the Rest module now", + t("The Organize module requires the Rest module. Activate the Rest module now", array("url" => html::mark_clean(url::site("admin/modules")))), "organize_needs_rest"); } else { diff --git a/modules/organize/helpers/organize_installer.php b/modules/organize/helpers/organize_installer.php index 12d8147f..2faa598b 100644 --- a/modules/organize/helpers/organize_installer.php +++ b/modules/organize/helpers/organize_installer.php @@ -30,8 +30,7 @@ class organize_installer { if ($version == 1) { if (!module::is_active("rest")) { site_status::warning( - t("The Organize module requires the Rest module. " . - "Activate the Rest module now", + t("The Organize module requires the Rest module. Activate the Rest module now", array("url" => html::mark_clean(url::site("admin/modules")))), "organize_needs_rest"); } diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php index 83143f97..cafc4418 100644 --- a/modules/organize/views/organize_dialog.html.php +++ b/modules/organize/views/organize_dialog.html.php @@ -130,8 +130,7 @@

html::purify($album->title))) ?>

- $flash_minimum_version)) ?> + $flash_minimum_version)) ?>

deactivate)) { site_status::warning( - t("The Slideshow module requires the RSS module. " . - "Activate the RSS module now", + t("The Slideshow module requires the RSS module. Activate the RSS module now", array("url" => html::mark_clean(url::site("admin/modules")))), "slideshow_needs_rss"); } else { -- cgit v1.2.3