diff options
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/gallery_installer.php | 8 | ||||
-rw-r--r-- | modules/gallery/helpers/gallery_quick.php | 7 | ||||
-rw-r--r-- | modules/gallery/helpers/theme.php | 2 |
3 files changed, 13 insertions, 4 deletions
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 <a href=\"%url\">Gallery %version</a>"); - 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/gallery_quick.php b/modules/gallery/helpers/gallery_quick.php index bb791c33..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 @@ -118,7 +119,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")); 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; } |