From b9b68e09527f2680252bcba054019c45db07829a Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 23 Jun 2009 16:05:32 -0700 Subject: Add a new "show credits" check box in the theme options so that you can disable any module credits if you want. Update the theme to obey it. --- modules/gallery/helpers/gallery_installer.php | 8 +++++++- modules/gallery/helpers/theme.php | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'modules/gallery/helpers') diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php index 4f6342b4..df555d52 100644 --- a/modules/gallery/helpers/gallery_installer.php +++ b/modules/gallery/helpers/gallery_installer.php @@ -246,9 +246,10 @@ class gallery_installer { module::set_var("gallery", "date_format", "Y-M-d"); module::set_var("gallery", "date_time_format", "Y-M-d H:i:s"); module::set_var("gallery", "time_format", "H:i:s"); + module::set_var("gallery", "show_credits", 1); // @todo this string needs to be picked up by l10n_scanner module::set_var("gallery", "credits", "Powered by Gallery %version"); - module::set_version("gallery", 2); + module::set_version("gallery", 3); } static function upgrade($version) { @@ -259,6 +260,11 @@ class gallery_installer { module::set_var("gallery", "version", "3.0 pre beta 2 (git)"); module::set_version("gallery", $version = 2); } + + if ($version == 2) { + module::set_var("gallery", "show_credits", 1); + module::set_version("gallery", $version = 3); + } } static function uninstall() { diff --git a/modules/gallery/helpers/theme.php b/modules/gallery/helpers/theme.php index 0a43f25c..b46a2c14 100644 --- a/modules/gallery/helpers/theme.php +++ b/modules/gallery/helpers/theme.php @@ -55,6 +55,8 @@ class theme_Core { ->value(module::get_var("gallery", "header_text")); $group->textarea("footer_text")->label(t("Footer text"))->id("gFooterText") ->value(module::get_var("gallery", "footer_text")); + $group->checkbox("show_credits")->label(t("Show site credits"))->id("gFooterText") + ->checked(module::get_var("gallery", "show_credits")); $group->submit("")->value(t("Save")); return $form; } -- cgit v1.2.3 From 9a0448e5d6f83d93f906e6fe1aec4bbb8d78912f Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 23 Jun 2009 17:25:59 -0700 Subject: Add gDialogLink to the delete button, since its got a jQuery confirmation dialog now. This was a regression in fa4bb5b7ac89bbbd0325e5c336c2e9b31f59d12b. Fixes ticket #459. --- modules/gallery/helpers/gallery_quick.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gallery/helpers') diff --git a/modules/gallery/helpers/gallery_quick.php b/modules/gallery/helpers/gallery_quick.php index bb791c33..302a3144 100644 --- a/modules/gallery/helpers/gallery_quick.php +++ b/modules/gallery/helpers/gallery_quick.php @@ -118,7 +118,7 @@ class gallery_quick_Core { $elements["right"][] = (object)array( "title" => $delete_title, - "class" => "gButtonLink", + "class" => "gDialogLink gButtonLink", "icon" => "ui-icon-trash", "id" => "gQuickDelete", "href" => url::site("quick/form_delete/$item->id?csrf=$csrf&page_type=$page_type")); -- cgit v1.2.3 From d01c3d2373cc98a0d6abb1eb5a1f71491e1001e2 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 23 Jun 2009 21:27:17 -0700 Subject: Remove stray ? that was breaking ccw rotation. --- modules/gallery/helpers/gallery_quick.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gallery/helpers') diff --git a/modules/gallery/helpers/gallery_quick.php b/modules/gallery/helpers/gallery_quick.php index 302a3144..9da0e082 100644 --- a/modules/gallery/helpers/gallery_quick.php +++ b/modules/gallery/helpers/gallery_quick.php @@ -89,7 +89,7 @@ class gallery_quick_Core { "title" => t("Rotate 90 degrees counter clockwise"), "class" => "gButtonLink", "icon" => "ui-icon-rotate-ccw", - "href" => url::site("quick/form_edit/$item->id/ccw?csrf=$csrf&?page_type=$page_type")); + "href" => url::site("quick/form_edit/$item->id/ccw?csrf=$csrf&page_type=$page_type")); $elements["left"][] = (object)array( "title" => t("Rotate 90 degrees clockwise"), -- cgit v1.2.3 From f9dbd4eb2feede5381d481f473bf7f0a77b49e4a Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 23 Jun 2009 21:31:58 -0700 Subject: Fix broken rotate urls. --- modules/gallery/helpers/gallery_quick.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/gallery/helpers') diff --git a/modules/gallery/helpers/gallery_quick.php b/modules/gallery/helpers/gallery_quick.php index 9da0e082..d0ffc584 100644 --- a/modules/gallery/helpers/gallery_quick.php +++ b/modules/gallery/helpers/gallery_quick.php @@ -83,19 +83,20 @@ class gallery_quick_Core { "class" => "gDialogLink gButtonLink", "icon" => "ui-icon-pencil", "href" => url::site("quick/form_edit/$item->id?page_type=$page_type")); + if ($item->is_photo() && graphics::can("rotate")) { $elements["left"][] = (object)array( "title" => t("Rotate 90 degrees counter clockwise"), "class" => "gButtonLink", "icon" => "ui-icon-rotate-ccw", - "href" => url::site("quick/form_edit/$item->id/ccw?csrf=$csrf&page_type=$page_type")); + "href" => url::site("quick/rotate/$item->id/ccw?csrf=$csrf&page_type=$page_type")); $elements["left"][] = (object)array( "title" => t("Rotate 90 degrees clockwise"), "class" => "gButtonLink", "icon" => "ui-icon-rotate-cw", - "href" => url::site("quick/form_edit/$item->id/cw?csrf=$csrf&page_type=$page_type")); + "href" => url::site("quick/rotate/$item->id/cw?csrf=$csrf&page_type=$page_type")); } // Don't move photos from the photo page; we don't yet have a good way of redirecting after move -- cgit v1.2.3