diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-05-08 21:09:15 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-05-08 21:09:15 -0700 |
commit | 357d20a6800d75c266ebe4281ebdd08e88a6e13a (patch) | |
tree | 16c04abd61e0b5721b051142b55fd9ca6f226cd1 /modules | |
parent | 14683ec0e8b8b9622539990c8d56310b0e0ced21 (diff) | |
parent | b2f7f80efb4fc8de7c1be966720a5006310fefdb (diff) |
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules')
25 files changed, 69 insertions, 50 deletions
diff --git a/modules/akismet/controllers/admin_akismet.php b/modules/akismet/controllers/admin_akismet.php index 8d292cf4..af98536a 100644 --- a/modules/akismet/controllers/admin_akismet.php +++ b/modules/akismet/controllers/admin_akismet.php @@ -50,6 +50,7 @@ class Admin_Akismet_Controller extends Admin_Controller { akismet::check_config(); $view = new Admin_View("admin.html"); + $view->page_title = t("Akismet spam filtering"); $view->content = new View("admin_akismet.html"); $view->content->valid_key = $valid_key; $view->content->form = $form; diff --git a/modules/comment/controllers/admin_comments.php b/modules/comment/controllers/admin_comments.php index 3abfe1de..68794638 100644 --- a/modules/comment/controllers/admin_comments.php +++ b/modules/comment/controllers/admin_comments.php @@ -44,6 +44,7 @@ class Admin_Comments_Controller extends Admin_Controller { $page = max(Input::instance()->get("page"), 1); $view = new Admin_View("admin.html"); + $view->page_title = t("Manage comments"); $view->content = new View("admin_comments.html"); $view->content->counts = $this->_counts(); $view->content->menu = $this->_menu($view->content->counts); diff --git a/modules/comment/css/comment.css b/modules/comment/css/comment.css index f58391b0..db096f2d 100644 --- a/modules/comment/css/comment.css +++ b/modules/comment/css/comment.css @@ -28,7 +28,7 @@ width: 32px; } -#g-admin-comment-button { +#g-add-comment { position: absolute; right: 0; top: 2px; diff --git a/modules/comment/js/comment.js b/modules/comment/js/comment.js index 3c8097c6..2487c5fc 100644 --- a/modules/comment/js/comment.js +++ b/modules/comment/js/comment.js @@ -1,5 +1,5 @@ $("document").ready(function() { - $("#g-admin-comment-button").click(function(event) { + $("#g-add-comment").click(function(event) { event.preventDefault(); if (!$("#g-comment-form").length) { $.get($(this).attr("href"), @@ -7,10 +7,11 @@ $("document").ready(function() { function(data) { $("#g-comment-detail").append(data); ajaxify_comment_form(); + $.scrollTo("#g-comment-form-anchor", 800); }); } }); - $("#g-no-comments").click(function(event) { + $(".g-no-comments a").click(function(event) { event.preventDefault(); if (!$("#g-comment-form").length) { $.get($(this).attr("href"), @@ -19,7 +20,7 @@ $("document").ready(function() { $("#g-comment-detail").append(data); ajaxify_comment_form(); }); - $("#g-no-comments-yet").remove(); + $(".g-no-comments").remove(); } }); }); @@ -32,7 +33,7 @@ function ajaxify_comment_form() { $("#g-comments #g-comment-detail ul").append(data.view); $("#g-comments #g-comment-detail ul li:last").effect("highlight", {color: "#cfc"}, 8000); $("#g-comment-form").hide(2000).remove(); - $("#g-no-comments-yet").hide(2000); + $("#g-no-comments").hide(2000); } else { if (data.form) { $("#g-comments form").replaceWith(data.form); diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php index 8e2a9e51..e4322e08 100644 --- a/modules/comment/views/comments.html.php +++ b/modules/comment/views/comments.html.php @@ -1,45 +1,46 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> - <a href="<?= url::site("form/add/comments/{$item->id}") ?>" id="g-admin-comment-button" + <a href="<?= url::site("form/add/comments/{$item->id}") ?>#comment-form" id="g-add-comment" class="g-button ui-corner-all ui-icon-left ui-state-default"> <span class="ui-icon ui-icon-comment"></span> <?= t("Add a comment") ?> </a> <div id="g-comment-detail"> -<? if (!$comments->count()): ?> -<p id="g-no-comments-yet"> - <?= t("No comments yet. Be the first to <a %attrs>comment</a>!", - array("attrs" => html::mark_clean("id= \"g-no-comments\" href=\"" . url::site("form/add/comments/{$item->id}") . "\" class=\"showCommentForm\""))) ?> -</p> -<ul> </ul> -<? endif ?> -<? if ($comments->count()): ?> -<ul> - <? foreach ($comments as $comment): ?> - <li id="g-comment-<?= $comment->id ?>"> - <p class="g-author"> - <a href="#"> - <img src="<?= $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true)) ?>" - class="g-avatar" - alt="<?= html::clean_attribute($comment->author_name()) ?>" - width="40" - height="40" /> - </a> - <? if ($comment->author()->guest): ?> - <?= t('on %date %name said', - array("date" => date("Y-M-d H:i:s", $comment->created), - "name" => html::clean($comment->author_name()))); ?> - <? else: ?> - <?= t('on %date <a href="%url">%name</a> said', - array("date" => date("Y-M-d H:i:s", $comment->created), - "url" => user_profile::url($comment->author_id), - "name" => html::clean($comment->author_name()))); ?> - <? endif ?> - </p> - <div> - <?= nl2br(html::purify($comment->text)) ?> - </div> - </li> - <? endforeach ?> -</ul> -<? endif ?> + <? if (!$comments->count()): ?> + <p class="g-no-comments"> + <?= t("No comments yet. Be the first to <a %attrs>comment</a>!", + array("attrs" => html::mark_clean("href=\"" . url::site("form/add/comments/{$item->id}") . "\" class=\"showCommentForm\""))) ?> + </p> + <ul><li class="g-no-comments"> </li></ul> + <? endif ?> + <? if ($comments->count()): ?> + <ul> + <? foreach ($comments as $comment): ?> + <li id="g-comment-<?= $comment->id ?>"> + <p class="g-author"> + <a href="#"> + <img src="<?= $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true)) ?>" + class="g-avatar" + alt="<?= html::clean_attribute($comment->author_name()) ?>" + width="40" + height="40" /> + </a> + <? if ($comment->author()->guest): ?> + <?= t('on %date %name said', + array("date" => date("Y-M-d H:i:s", $comment->created), + "name" => html::clean($comment->author_name()))); ?> + <? else: ?> + <?= t('on %date <a href="%url">%name</a> said', + array("date" => date("Y-M-d H:i:s", $comment->created), + "url" => user_profile::url($comment->author_id), + "name" => html::clean($comment->author_name()))); ?> + <? endif ?> + </p> + <div> + <?= nl2br(html::purify($comment->text)) ?> + </div> + </li> + <? endforeach ?> + </ul> + <? endif ?> + <a name="comment-form" id="g-comment-form-anchor"></a> </div> diff --git a/modules/digibug/controllers/admin_digibug.php b/modules/digibug/controllers/admin_digibug.php index 76ed2319..f3a0f8f0 100644 --- a/modules/digibug/controllers/admin_digibug.php +++ b/modules/digibug/controllers/admin_digibug.php @@ -20,6 +20,7 @@ class Admin_Digibug_Controller extends Admin_Controller { public function index() { $v = new Admin_View("admin.html"); + $v->page_title = t("Digibug"); $v->content = new View("admin_digibug.html"); print $v; } diff --git a/modules/digibug/views/admin_digibug.html.php b/modules/digibug/views/admin_digibug.html.php index 5d07eb68..d673b116 100644 --- a/modules/digibug/views/admin_digibug.html.php +++ b/modules/digibug/views/admin_digibug.html.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <div class="g-block"> <img src="<?= url::file("modules/digibug/images/digibug_logo.png") ?>" alt="Digibug logo" class="g-right"/> - <h1> <?= t("Digibug Photo Printing") ?> </h1> + <h1> <?= t("Digibug photo printing") ?> </h1> <div class="g-block-content"> <p> <?= t("Turn your photos into a wide variety of prints, gifts and games!") ?> diff --git a/modules/g2_import/controllers/admin_g2_import.php b/modules/g2_import/controllers/admin_g2_import.php index bc00378d..b1018560 100644 --- a/modules/g2_import/controllers/admin_g2_import.php +++ b/modules/g2_import/controllers/admin_g2_import.php @@ -30,6 +30,7 @@ class Admin_g2_import_Controller extends Admin_Controller { } $view = new Admin_View("admin.html"); + $view->page_title = t("Gallery 2 import"); $view->content = new View("admin_g2_import.html"); $view->content->form = $this->_get_import_form(); $view->content->version = ''; diff --git a/modules/gallery/controllers/admin_advanced_settings.php b/modules/gallery/controllers/admin_advanced_settings.php index d9a281b5..6f4e9403 100644 --- a/modules/gallery/controllers/admin_advanced_settings.php +++ b/modules/gallery/controllers/admin_advanced_settings.php @@ -20,6 +20,7 @@ class Admin_Advanced_Settings_Controller extends Admin_Controller { public function index() { $view = new Admin_View("admin.html"); + $view->page_title = t("Advanced settings"); $view->content = new View("admin_advanced_settings.html"); $view->content->vars = ORM::factory("var") ->order_by("module_name") diff --git a/modules/gallery/controllers/admin_dashboard.php b/modules/gallery/controllers/admin_dashboard.php index adc0df16..76c42612 100644 --- a/modules/gallery/controllers/admin_dashboard.php +++ b/modules/gallery/controllers/admin_dashboard.php @@ -20,6 +20,7 @@ class Admin_Dashboard_Controller extends Admin_Controller { public function index() { $view = new Admin_View("admin.html"); + $view->page_title = t("Dashboard"); $view->content = new View("admin_dashboard.html"); $view->content->blocks = block_manager::get_html("dashboard_center"); $view->sidebar = "<div id=\"g-admin-dashboard-sidebar\">" . diff --git a/modules/gallery/controllers/admin_graphics.php b/modules/gallery/controllers/admin_graphics.php index abbd8986..de98035d 100644 --- a/modules/gallery/controllers/admin_graphics.php +++ b/modules/gallery/controllers/admin_graphics.php @@ -20,6 +20,7 @@ class Admin_Graphics_Controller extends Admin_Controller { public function index() { $view = new Admin_View("admin.html"); + $view->page_title = t("Graphics settings"); $view->content = new View("admin_graphics.html"); $view->content->tk = graphics::detect_toolkits(); $view->content->active = module::get_var("gallery", "graphics_toolkit", "none"); diff --git a/modules/gallery/controllers/admin_languages.php b/modules/gallery/controllers/admin_languages.php index 1ca777dc..0f134fcd 100644 --- a/modules/gallery/controllers/admin_languages.php +++ b/modules/gallery/controllers/admin_languages.php @@ -20,6 +20,7 @@ class Admin_Languages_Controller extends Admin_Controller { public function index($share_translations_form=null) { $v = new Admin_View("admin.html"); + $v->page_title = t("Languages and translations"); $v->content = new View("admin_languages.html"); $v->content->available_locales = locales::available(); $v->content->installed_locales = locales::installed(); diff --git a/modules/gallery/controllers/admin_modules.php b/modules/gallery/controllers/admin_modules.php index 30e1ace5..bf638a37 100644 --- a/modules/gallery/controllers/admin_modules.php +++ b/modules/gallery/controllers/admin_modules.php @@ -20,6 +20,7 @@ class Admin_Modules_Controller extends Admin_Controller { public function index() { $view = new Admin_View("admin.html"); + $view->page_title = t("Modules"); $view->content = new View("admin_modules.html"); $view->content->available = module::available(); print $view; diff --git a/modules/gallery/controllers/admin_sidebar.php b/modules/gallery/controllers/admin_sidebar.php index 73f84d2f..fb857e4e 100644 --- a/modules/gallery/controllers/admin_sidebar.php +++ b/modules/gallery/controllers/admin_sidebar.php @@ -20,6 +20,7 @@ class Admin_Sidebar_Controller extends Admin_Controller { public function index() { $view = new Admin_View("admin.html"); + $view->page_title = t("Manage sidebar"); $view->content = new View("admin_sidebar.html"); $view->content->csrf = access::csrf_token(); $view->content->available = new View("admin_sidebar_blocks.html"); diff --git a/modules/gallery/controllers/admin_theme_options.php b/modules/gallery/controllers/admin_theme_options.php index cf4fb77a..15a42ee5 100644 --- a/modules/gallery/controllers/admin_theme_options.php +++ b/modules/gallery/controllers/admin_theme_options.php @@ -20,6 +20,7 @@ class Admin_Theme_Options_Controller extends Admin_Controller { public function index() { $view = new Admin_View("admin.html"); + $view->page_title = t("Theme options"); $view->content = new View("admin_theme_options.html"); $view->content->form = theme::get_edit_form_admin(); print $view; diff --git a/modules/gallery/controllers/admin_themes.php b/modules/gallery/controllers/admin_themes.php index 327ea6c8..e59eadaf 100644 --- a/modules/gallery/controllers/admin_themes.php +++ b/modules/gallery/controllers/admin_themes.php @@ -20,6 +20,7 @@ class Admin_Themes_Controller extends Admin_Controller { public function index() { $view = new Admin_View("admin.html"); + $view->page_title = t("Theme choice"); $view->content = new View("admin_themes.html"); $view->content->admin = module::get_var("gallery", "active_admin_theme"); $view->content->site = module::get_var("gallery", "active_site_theme"); diff --git a/modules/gallery/tests/Item_Model_Test.php b/modules/gallery/tests/Item_Model_Test.php index 8ab85a30..28d6fba7 100644 --- a/modules/gallery/tests/Item_Model_Test.php +++ b/modules/gallery/tests/Item_Model_Test.php @@ -295,7 +295,6 @@ class Item_Model_Test extends Gallery_Unit_Test_Case { } catch (ORM_Validation_Exception $e) { $this->assert_same(array("description" => "length", "name" => "required", - "slug" => "required", "title" => "required", "album_cover_item_id" => "invalid_item", "parent_id" => "invalid", diff --git a/modules/gallery/views/movieplayer.html.php b/modules/gallery/views/movieplayer.html.php index f7af8d93..2e79b620 100644 --- a/modules/gallery/views/movieplayer.html.php +++ b/modules/gallery/views/movieplayer.html.php @@ -5,12 +5,13 @@ "<?= $attrs["id"] ?>", { src: "<?= url::abs_file("lib/flowplayer.swf") ?>", - wmode: "transparent" + wmode: "transparent", + provider: "pseudostreaming" }, { plugins: { - h264streaming: { - url: "<?= url::abs_file("lib/flowplayer.h264streaming.swf") ?>" + pseudostreaming: { + url: "<?= url::abs_file("lib/flowplayer.pseudostreaming.swf") ?>" }, controls: { autoHide: 'always', diff --git a/modules/recaptcha/controllers/admin_recaptcha.php b/modules/recaptcha/controllers/admin_recaptcha.php index 3f2959a5..264d3177 100644 --- a/modules/recaptcha/controllers/admin_recaptcha.php +++ b/modules/recaptcha/controllers/admin_recaptcha.php @@ -51,6 +51,7 @@ class Admin_Recaptcha_Controller extends Admin_Controller { recaptcha::check_config(); $view = new Admin_View("admin.html"); + $view->page_title = t("reCAPTCHA"); $view->content = new View("admin_recaptcha.html"); $view->content->public_key = module::get_var("recaptcha", "public_key"); $view->content->private_key = module::get_var("recaptcha", "private_key"); diff --git a/modules/server_add/controllers/admin_server_add.php b/modules/server_add/controllers/admin_server_add.php index 7ffba361..2e743c81 100644 --- a/modules/server_add/controllers/admin_server_add.php +++ b/modules/server_add/controllers/admin_server_add.php @@ -20,6 +20,7 @@ class Admin_Server_Add_Controller extends Admin_Controller { public function index() { $view = new Admin_View("admin.html"); + $view->page_title = t("Add from server"); $view->content = new View("admin_server_add.html"); $view->content->form = $this->_get_admin_form(); $paths = unserialize(module::get_var("server_add", "authorized_paths", "a:0:{}")); diff --git a/modules/tag/controllers/admin_tags.php b/modules/tag/controllers/admin_tags.php index 03a14814..9e875d14 100644 --- a/modules/tag/controllers/admin_tags.php +++ b/modules/tag/controllers/admin_tags.php @@ -22,6 +22,7 @@ class Admin_Tags_Controller extends Admin_Controller { $filter = Input::instance()->get("filter"); $view = new Admin_View("admin.html"); + $view->page_title = t("Manage tags"); $view->content = new View("admin_tags.html"); $view->content->filter = $filter; diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php index 8df4210d..14d27c94 100644 --- a/modules/tag/helpers/tag.php +++ b/modules/tag/helpers/tag.php @@ -98,7 +98,7 @@ class tag_Core { ($item->is_photo() ? t("Add tag to photo") : t("Add tag to movie")); $group = $form->group("add_tag")->label("Add Tag"); - $group->input("name")->label($label)->rules("required"); + $group->input("name")->label($label)->rules("required")->id("name"); $group->hidden("item_id")->value($item->id); $group->submit("")->value(t("Add Tag")); return $form; diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php index b637a7f1..e1db387b 100644 --- a/modules/tag/views/admin_tags.html.php +++ b/modules/tag/views/admin_tags.html.php @@ -16,7 +16,7 @@ <? $column_tag_count = 0 ?> <div class="g-block"> - <h1> <?= t("Tag Admin") ?> </h1> + <h1> <?= t("Manage tags") ?> </h1> <div class="g-block-content"> <table id="g-tag-admin"> diff --git a/modules/user/controllers/admin_users.php b/modules/user/controllers/admin_users.php index 3e36fd67..e14be393 100644 --- a/modules/user/controllers/admin_users.php +++ b/modules/user/controllers/admin_users.php @@ -20,6 +20,7 @@ class Admin_Users_Controller extends Admin_Controller { public function index() { $view = new Admin_View("admin.html"); + $view->page_title = t("Users and groups"); $view->content = new View("admin_users.html"); $view->content->users = ORM::factory("user")->order_by("name", "ASC")->find_all(); $view->content->groups = ORM::factory("group")->order_by("name", "ASC")->find_all(); diff --git a/modules/watermark/controllers/admin_watermarks.php b/modules/watermark/controllers/admin_watermarks.php index aa5be8db..d26919d5 100644 --- a/modules/watermark/controllers/admin_watermarks.php +++ b/modules/watermark/controllers/admin_watermarks.php @@ -22,6 +22,7 @@ class Admin_Watermarks_Controller extends Admin_Controller { $name = module::get_var("watermark", "name"); $view = new Admin_View("admin.html"); + $view->page_title = t("Watermarks"); $view->content = new View("admin_watermarks.html"); if ($name) { $view->content->name = module::get_var("watermark", "name"); |