diff options
-rw-r--r-- | lib/gallery.dialog.js | 87 | ||||
-rw-r--r-- | modules/comment/helpers/comment_installer.php | 13 | ||||
-rw-r--r-- | modules/gallery/controllers/admin_graphics.php | 39 | ||||
-rw-r--r-- | modules/gallery/helpers/graphics.php | 92 | ||||
-rw-r--r-- | modules/gallery/views/admin_graphics.html.php | 14 | ||||
-rw-r--r-- | modules/gallery/views/admin_graphics_gd.html.php | 15 | ||||
-rw-r--r-- | modules/gallery/views/admin_graphics_graphicsmagick.html.php | 10 | ||||
-rw-r--r-- | modules/gallery/views/admin_graphics_imagemagick.html.php | 12 | ||||
-rw-r--r-- | modules/gallery/views/admin_graphics_none.html.php | 2 | ||||
-rw-r--r-- | modules/gallery/views/after_install.html.php | 2 | ||||
-rw-r--r-- | modules/search/helpers/search_event.php | 5 | ||||
-rw-r--r-- | modules/tag/models/tag.php | 48 | ||||
-rw-r--r-- | themes/default/views/movie.html.php | 29 |
13 files changed, 251 insertions, 117 deletions
diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js index 51ebb21a..4bbb8ab7 100644 --- a/lib/gallery.dialog.js +++ b/lib/gallery.dialog.js @@ -2,56 +2,53 @@ $.widget("ui.gallery_dialog", { _init: function() { var self = this; - this.element.click(function(event){ - event.preventDefault(); - var element = event.currentTarget; - var sHref = $(element).attr("href"); - var sTitle = $(element).attr("title"); - var eDialog = '<div id="gDialog"></div>'; - - $("body").append(eDialog); + if (!self.options.immediate) { + this.element.click(function(event) { + event.preventDefault(); + self._show($(event.currentTarget).attr("href")); + return false; + }); + } else { + self._show(this.element.attr("href")); + } + }, - if (!self.options.close) { - self.options.close = self.close_dialog; - } - $("#gDialog").dialog(self.options); + _show: function(sHref) { + var self = this; + var eDialog = '<div id="gDialog"></div>'; - $("#gDialog").gallery_show_loading(); + $("body").append(eDialog); - $.get(sHref, function(data) { - $("#gDialog").html(data).gallery_show_loading(); + if (!self.options.close) { + self.options.close = self.close_dialog; + } + $("#gDialog").dialog(self.options); - if ($("#gDialog form").length) { - self._trigger("form_loaded", null, $("#gDialog form")); - } - self._layout(); + $("#gDialog").gallery_show_loading(); - $("#gDialog").dialog("open"); - // Remove titlebar for progress dialogs or set title - if ($("#gDialog #gProgress").length) { - $(".ui-dialog-titlebar").remove(); - } else if ($("#gDialog h1").length) { - $("#gDialog").dialog('option', 'title', $("#gDialog h1:eq(0)").html()); - } else if ($("#gDialog fieldset legend").length) { - $("#gDialog").dialog('option', 'title', $("#gDialog fieldset legend:eq(0)").html()); - } + $.get(sHref, function(data) { + $("#gDialog").html(data).gallery_show_loading(); - if ($("#gDialog form").length) { - self._ajaxify_dialog(); - } - }); - $("#gDialog").dialog("option", "self", self); - return false; - }); - }, + if ($("#gDialog form").length) { + self._trigger("form_loaded", null, $("#gDialog form")); + } + self._layout(); - destroy: function() { - if ($("#gDialog form").length) { - this._trigger("form_closing", null, $("#gDialog form")); - } - this._trigger("dialog_closing", null, $("#gDialog")); + $("#gDialog").dialog("open"); + // Remove titlebar for progress dialogs or set title + if ($("#gDialog #gProgress").length) { + $(".ui-dialog-titlebar").remove(); + } else if ($("#gDialog h1").length) { + $("#gDialog").dialog('option', 'title', $("#gDialog h1:eq(0)").html()); + } else if ($("#gDialog fieldset legend").length) { + $("#gDialog").dialog('option', 'title', $("#gDialog fieldset legend:eq(0)").html()); + } - $("#gDialog").dialog("destroy").remove(); + if ($("#gDialog form").length) { + self._ajaxify_dialog(); + } + }); + $("#gDialog").dialog("option", "self", self); }, _layout: function() { @@ -93,7 +90,11 @@ close_dialog: function (event, ui) { var self = $("#gDialog").dialog("option", "self"); - self.destroy(); + if ($("#gDialog form").length) { + self._trigger("form_closing", null, $("#gDialog form")); + } + self._trigger("dialog_closing", null, $("#gDialog")); + $("#gDialog").dialog("destroy").remove(); }, _ajaxify_dialog: function() { diff --git a/modules/comment/helpers/comment_installer.php b/modules/comment/helpers/comment_installer.php index f54913c3..edf2427c 100644 --- a/modules/comment/helpers/comment_installer.php +++ b/modules/comment/helpers/comment_installer.php @@ -52,8 +52,8 @@ class comment_installer { } static function upgrade($version) { + $db = Database::instance(); if ($version == 1) { - $db = Database::instance(); $db->query("ALTER TABLE {comments} CHANGE `state` `state` varchar(15) default 'unpublished'"); module::set_version("comment", 2); } @@ -61,9 +61,16 @@ class comment_installer { static function uninstall() { $db = Database::instance(); - $sql = "SELECT `item_id` FROM {comments}"; - module::event("item_related_update_batch", $sql); + // Notify listeners that we're deleting some data. This is probably going to be very + // inefficient for large uninstalls, and we could make it better by doing things like passing + // a SQL fragment through so that the listeners could use subselects. But by using a single, + // simple event API we lighten the load on module developers. + foreach (ORM::factory("item") + ->join("comments", "items.id", "comments.item_id") + ->find_all() as $item) { + module::event("item_related_update", $item); + } $db->query("DROP TABLE IF EXISTS {comments};"); } } diff --git a/modules/gallery/controllers/admin_graphics.php b/modules/gallery/controllers/admin_graphics.php index 72f8d8e1..565ee1b0 100644 --- a/modules/gallery/controllers/admin_graphics.php +++ b/modules/gallery/controllers/admin_graphics.php @@ -21,41 +21,24 @@ class Admin_Graphics_Controller extends Admin_Controller { public function index() { $view = new Admin_View("admin.html"); $view->content = new View("admin_graphics.html"); - $view->content->available = ""; - - $tk = new ArrayObject(graphics::detect_toolkits(), ArrayObject::ARRAY_AS_PROPS); - $active = module::get_var("gallery", "graphics_toolkit", "none"); - foreach (array("gd", "imagemagick", "graphicsmagick", "none") as $id) { - if ($id == $active) { - $view->content->active = new View("admin_graphics_$id.html"); - $view->content->active->tk = $tk; - $view->content->active->is_active = true; - } else if ($id != "none") { - $v = new View("admin_graphics_$id.html"); - $v->tk = $tk; - $v->is_active = false; - $view->content->available .= $v; - } - } - + $view->content->tk = graphics::detect_toolkits(); + $view->content->active = module::get_var("gallery", "graphics_toolkit", "none"); print $view; } - public function choose($toolkit) { + public function choose($toolkit_id) { access::verify_csrf(); - if ($toolkit != module::get_var("gallery", "graphics_toolkit")) { - module::set_var("gallery", "graphics_toolkit", $toolkit); - - $toolkit_info = graphics::detect_toolkits(); - if ($toolkit == "graphicsmagick" || $toolkit == "imagemagick") { - module::set_var("gallery", "graphics_toolkit_path", $toolkit_info[$toolkit]); - } + if ($toolkit_id != module::get_var("gallery", "graphics_toolkit")) { + $tk = graphics::detect_toolkits(); + module::set_var("gallery", "graphics_toolkit", $toolkit_id); + module::set_var("gallery", "graphics_toolkit_path", dirname($tk->$toolkit_id->dir)); site_status::clear("missing_graphics_toolkit"); - message::success(t("Updated Graphics Toolkit")); - log::success("graphics", t("Changed graphics toolkit to: %toolkit", - array("toolkit" => $toolkit))); + + $msg = t("Changed graphics toolkit to: %toolkit", array("toolkit" => $tk->$toolkit_id->name)); + message::success($msg); + log::success("graphics", $msg); } url::redirect("admin/graphics"); diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index d506a982..7dc46eeb 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -339,15 +339,90 @@ class graphics_Core { * GraphicsMagick we return the path to the directory containing the appropriate binaries. */ static function detect_toolkits() { + $toolkits = new stdClass(); + + // GD is special, it doesn't use exec() $gd = function_exists("gd_info") ? gd_info() : array(); - $exec = function_exists("exec"); + $toolkits->gd->name = "GD"; if (!isset($gd["GD Version"])) { - $gd["GD Version"] = false; + $toolkits->gd->installed = false; + $toolkits->gd->error = t("GD is not installed"); + } else { + $toolkits->gd->installed = true; + $toolkits->gd->version = $gd["GD Version"]; + $toolkits->gd->rotate = function_exists("imagerotate"); + $toolkits->gd->binary = ""; + $toolkits->gd->dir = ""; + + if (!$toolkits->gd->rotate) { + $toolkits->gd->error = + t("You have GD version %version, but it lacks image rotation.", + array("version" => $gd["GD Version"])); + } + } + + if (!function_exists("exec")) { + $toolkits->imagemagick->installed = false; + $toolkits->imagemagick->error = t("ImageMagick requires the <b>exec</b> function"); + + $toolkits->graphicsmagick->installed = false; + $toolkits->graphicsmagick->error = t("GraphicsMagick requires the <b>exec</b> function"); + } else { + putenv("PATH=" . getenv("PATH") . ":/usr/local/bin:/opt/local/bin:/opt/bin"); + + // @todo: consider refactoring the two segments below into a loop since they are so + // similar. + + // ImageMagick + $path = exec("which convert"); + $toolkits->imagemagick->name = "ImageMagick"; + if ($path) { + if (@is_file($path)) { + preg_match('/Version: \S+ (\S+)/', `convert -v`, $matches); + $version = $matches[1]; + + $toolkits->imagemagick->installed = true; + $toolkits->imagemagick->version = $version; + $toolkits->imagemagick->binary = $path; + $toolkits->imagemagick->dir = dirname($path); + $toolkits->imagemagick->rotate = true; + } else { + $toolkits->imagemagick->installed = false; + $toolkits->imagemagick->error = + t("ImageMagick is installed, but PHP's open_basedir restriction " . + "prevents Gallery from using it."); + } + } else { + $toolkits->imagemagick->installed = false; + $toolkits->imagemagick->error = t("We could not locate ImageMagick on your system."); + } + + // GraphicsMagick + $path = exec("which gm"); + $toolkits->graphicsmagick->name = "GraphicsMagick"; + if ($path) { + if (@is_file($path)) { + preg_match('/\S+ (\S+)/', `gm version`, $matches); + $version = $matches[1]; + + $toolkits->graphicsmagick->installed = true; + $toolkits->graphicsmagick->version = $version; + $toolkits->graphicsmagick->binary = $path; + $toolkits->graphicsmagick->dir = dirname($path); + $toolkits->graphicsmagick->rotate = true; + } else { + $toolkits->graphicsmagick->installed = false; + $toolkits->graphicsmagick->error = + t("GraphicsMagick is installed, but PHP's open_basedir restriction " . + "prevents Gallery from using it."); + } + } else { + $toolkits->graphicsmagick->installed = false; + $toolkits->graphicsmagick->error = t("We could not locate GraphicsMagick on your system."); + } } - putenv("PATH=" . getenv("PATH") . ":/usr/local/bin:/opt/local/bin:/opt/bin"); - return array("gd" => $gd, - "imagemagick" => $exec ? dirname(exec("which convert")) : false, - "graphicsmagick" => $exec ? dirname(exec("which gm")) : false); + + return $toolkits; } /** @@ -357,12 +432,13 @@ class graphics_Core { // Detect a graphics toolkit $toolkits = graphics::detect_toolkits(); foreach (array("imagemagick", "graphicsmagick", "gd") as $tk) { - if ($toolkits[$tk]) { + if ($toolkits->$tk->installed) { module::set_var("gallery", "graphics_toolkit", $tk); - module::set_var("gallery", "graphics_toolkit_path", $tk == "gd" ? "" : $toolkits[$tk]); + module::set_var("gallery", "graphics_toolkit_path", $toolkits->$tk->dir); break; } } + if (!module::get_var("gallery", "graphics_toolkit")) { site_status::warning( t("Graphics toolkit missing! Please <a href=\"%url\">choose a toolkit</a>", diff --git a/modules/gallery/views/admin_graphics.html.php b/modules/gallery/views/admin_graphics.html.php index 08374471..c4a2f5c6 100644 --- a/modules/gallery/views/admin_graphics.html.php +++ b/modules/gallery/views/admin_graphics.html.php @@ -9,8 +9,8 @@ }; $("#gAdminGraphics div.gAvailable .gBlock").click(select_toolkit); }); - </script> + <div id="gAdminGraphics"> <h1> <?= t("Graphics Settings") ?> </h1> <p> @@ -18,11 +18,19 @@ </p> <h2> <?= t("Active Toolkit") ?> </h2> - <?= $active ?> + <? if ($active == "none"): ?> + <?= new View("admin_graphics_none.html") ?> + <? else: ?> + <?= new View("admin_graphics_$active.html", array("tk" => $tk->$active, "is_active" => true)) ?> + <? endif ?> <div class="gAvailable"> <h2> <?= t("Available Toolkits") ?> </h2> - <?= $available ?> + <? foreach (array_keys((array)$tk) as $id): ?> + <? if ($id != $active): ?> + <?= new View("admin_graphics_$id.html", array("tk" => $tk->$id, "is_active" => false)) ?> + <? endif ?> + <? endforeach ?> </div> </div> diff --git a/modules/gallery/views/admin_graphics_gd.html.php b/modules/gallery/views/admin_graphics_gd.html.php index b77da8e3..aa9ee67c 100644 --- a/modules/gallery/views/admin_graphics_gd.html.php +++ b/modules/gallery/views/admin_graphics_gd.html.php @@ -1,23 +1,26 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="gd" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->gd["GD Version"] ? " gInstalledToolkit" : " gUnavailable" ?>"> +<div id="gd" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->installed ? " gInstalledToolkit" : " gUnavailable" ?>"> <img class="logo" width="170" height="110" src="<?= url::file("modules/gallery/images/gd.png"); ?>" alt="<? t("Visit the GD lib project site") ?>" /> <h3> <?= t("GD") ?> </h3> <p> <?= t("The GD graphics library is an extension to PHP commonly installed most webservers. Please refer to the <a href=\"%url\">GD website</a> for more information.", array("url" => "http://www.boutell.com/gd")) ?> </p> - <? if ($tk->gd["GD Version"] && function_exists('imagerotate')): ?> + <? if ($tk->installed && $tk->rotate): ?> <p class="gSuccess"> - <?= t("You have GD version %version.", array("version" => $tk->gd["GD Version"])) ?> + <?= t("You have GD version %version.", array("version" => $tk->version)) ?> </p> <p> <a class="gButtonLink ui-state-default ui-corner-all"><?= t("Activate GD") ?></a> </p> - <? elseif ($tk->gd["GD Version"]): ?> + <? elseif ($tk->installed): ?> + + <? if ($tk->error): ?> <p class="gWarning"> - <?= t("You have GD version %version, but it lacks image rotation.", - array("version" => $tk->gd["GD Version"])) ?> + <?= $tk->error ?> </p> + <? endif ?> + <p> <a class="gButtonLink ui-state-default ui-corner-all"><?= t("Activate GD") ?></a> </p> diff --git a/modules/gallery/views/admin_graphics_graphicsmagick.html.php b/modules/gallery/views/admin_graphics_graphicsmagick.html.php index e2cd0777..bf3ad339 100644 --- a/modules/gallery/views/admin_graphics_graphicsmagick.html.php +++ b/modules/gallery/views/admin_graphics_graphicsmagick.html.php @@ -1,21 +1,21 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="graphicsmagick" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->graphicsmagick ? " gInstalledToolkit" : " gUnavailable" ?>"> +<div id="graphicsmagick" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->installed ? " gInstalledToolkit" : " gUnavailable" ?>"> <h3> <?= t("GraphicsMagick") ?> </h3> <img class="logo" width="107" height="76" src="<?= url::file("modules/gallery/images/graphicsmagick.png"); ?>" alt="<? t("Visit the GraphicsMagick project site") ?>" /> <p> <?= t("GraphicsMagick is a standalone graphics program available on most Linux systems. Please refer to the <a href=\"%url\">GraphicsMagick website</a> for more information.", array("url" => "http://www.graphicsmagick.org")) ?> </p> - <? if ($tk->graphicsmagick): ?> + <? if ($tk->installed): ?> <p class="gSuccess"> - <?= t("GraphicsMagick is available in %path", array("path" => $tk->graphicsmagick)) ?> + <?= t("GraphicsMagick version %version is available in %dir", array("version" => $tk->version, "dir" => $tk->dir)) ?> </p> <p> <a class="gButtonLink ui-state-default ui-corner-all"><?= t("Activate Graphics Magic") ?></a> </p> <? else: ?> - <p class="gInfo"> - <?= t("GraphicsMagick is not available on your system.") ?> + <p class="gWarning"> + <?= $tk->error ?> </p> <? endif ?> </div> diff --git a/modules/gallery/views/admin_graphics_imagemagick.html.php b/modules/gallery/views/admin_graphics_imagemagick.html.php index 081ddc15..b8f7ffb8 100644 --- a/modules/gallery/views/admin_graphics_imagemagick.html.php +++ b/modules/gallery/views/admin_graphics_imagemagick.html.php @@ -1,21 +1,21 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="imagemagick" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->imagemagick ? " gInstalledToolkit" : " gUnavailable" ?>"> +<div id="imagemagick" class="gBlock<?= $is_active ? " gSelected" : "" ?><?= $tk->installed ? " gInstalledToolkit" : " gUnavailable" ?>"> <h3> <?= t("ImageMagick") ?> </h3> <img class="logo" width="114" height="118" src="<?= url::file("modules/gallery/images/imagemagick.jpg"); ?>" alt="<? t("Visit the ImageMagick project site") ?>" /> <p> <?= t("ImageMagick is a standalone graphics program available on most Linux systems. Please refer to the <a href=\"%url\">ImageMagick website</a> for more information.", array("url" => "http://www.imagemagick.org")) ?> </p> - <? if ($tk->imagemagick): ?> + <? if ($tk->installed): ?> <p class="gSuccess"> - <?= t("ImageMagick is available in %path", array("path" => $tk->imagemagick)) ?> + <?= t("ImageMagick version %version is available in %dir", array("version" => $tk->version, "dir" => $tk->dir)) ?> </p> <p> <a class="gButtonLink ui-state-default ui-corner-all"><?= t("Activate ImageMagick") ?></a> </p> - <? else: ?> - <p class="gInfo"> - <?= t("ImageMagick is not available on your system.") ?> + <? elseif ($tk->error): ?> + <p class="gWarning"> + <?= $tk->error ?> </p> <? endif ?> </div> diff --git a/modules/gallery/views/admin_graphics_none.html.php b/modules/gallery/views/admin_graphics_none.html.php index 5306a70d..be2a580d 100644 --- a/modules/gallery/views/admin_graphics_none.html.php +++ b/modules/gallery/views/admin_graphics_none.html.php @@ -2,6 +2,6 @@ <div id="none" class="gBlock"> <h3 class="gWarning"> <?= t("No Active Toolkit") ?> </h3> <p> - <?= t("We were unable to detect a graphics program. You must install one of the toolkits below in order to many Gallery features.") ?> + <?= t("We were unable to detect a graphics program. You must install one of the toolkits below in order to use many Gallery features.") ?> </p> </div> diff --git a/modules/gallery/views/after_install.html.php b/modules/gallery/views/after_install.html.php index bfce46f0..41e600fb 100644 --- a/modules/gallery/views/after_install.html.php +++ b/modules/gallery/views/after_install.html.php @@ -16,7 +16,7 @@ title="<?= t("Edit Your Profile") ?>" id="gAfterInstallChangePasswordLink" class="gButtonLink ui-state-default ui-corners-all"><?= t("Change Password Now") ?></a> <script> - $("#gAfterInstallChangePasswordLink").gallery_dialog(); + $("#gAfterInstallChangePasswordLink").gallery_dialog({immediate: true}); </script> </p> diff --git a/modules/search/helpers/search_event.php b/modules/search/helpers/search_event.php index b65763af..836bbe15 100644 --- a/modules/search/helpers/search_event.php +++ b/modules/search/helpers/search_event.php @@ -35,9 +35,4 @@ class search_event_Core { static function item_related_update($item) { search::update($item); } - - static function item_related_update_batch($sql) { - $db = Database::instance(); - $db->query("UPDATE {search_records} SET `dirty` = 1 WHERE item_id IN ($sql)"); - } } diff --git a/modules/tag/models/tag.php b/modules/tag/models/tag.php index e910a8ee..d9488e1c 100644 --- a/modules/tag/models/tag.php +++ b/modules/tag/models/tag.php @@ -54,4 +54,52 @@ class Tag_Model extends ORM { } return $model->count_all(); } + + /** + * Overload ORM::save() to trigger an item_related_update event for all items that are related + * to this tag. Since items can be added or removed as part of the save, we need to trigger an + * event for the union of all related items before and after the save. + */ + public function save() { + $db = Database::instance(); + $related_item_ids = array(); + foreach ($db->getwhere("items_tags", array("tag_id" => $this->id)) as $row) { + $related_item_ids[$row->item_id] = 1; + } + + $result = parent::save(); + + foreach ($db->getwhere("items_tags", array("tag_id" => $this->id)) as $row) { + $related_item_ids[$row->item_id] = 1; + } + + if ($related_item_ids) { + foreach (ORM::factory("item")->in("id", array_keys($related_item_ids))->find_all() as $item) { + module::event("item_related_update", $item); + } + } + + return $result; + } + + /** + * Overload ORM::delete() to trigger an item_related_update event for all items that are + * related to this tag. + */ + public function delete() { + $related_item_ids = array(); + $db = Database::Instance(); + foreach ($db->getwhere("items_tags", array("tag_id" => $this->id)) as $row) { + $related_item_ids[$row->item_id] = 1; + } + + $result = parent::delete(); + + if ($related_item_ids) { + foreach (ORM::factory("item")->in("id", array_keys($related_item_ids))->find_all() as $item) { + module::event("item_related_update", $item); + } + } + return $result; + } }
\ No newline at end of file diff --git a/themes/default/views/movie.html.php b/themes/default/views/movie.html.php index b9e1bc21..d255922b 100644 --- a/themes/default/views/movie.html.php +++ b/themes/default/views/movie.html.php @@ -2,16 +2,29 @@ <div id="gItem"> <?= $theme->photo_top() ?> - <ul id="gPager"> - <li><?= t("%position of %total", array("position" => $position, "total" => $sibling_count)) ?></li> - <? if ($previous_item): ?> - <li><span class="ui-icon ui-icon-seek-prev"></span><a href="<?= $previous_item->url() ?>"><?= t("previous") ?></a></li> - <? endif ?> - <? if ($next_item): ?> - <li><a href="<?= $next_item->url() ?>"><?= t("next") ?></a><span class="ui-icon ui-icon-seek-next"></span></li> - <? endif ?> + <ul class="gPager"> + <li> + <? if ($previous_item): ?> + <a href="<?= $previous_item->url() ?>" class="gButtonLink ui-icon-left ui-state-default ui-corner-all"> + <span class="ui-icon ui-icon-triangle-1-w"></span><?= t("previous") ?></a> + <? else: ?> + <a class="gButtonLink ui-icon-left ui-state-disabled ui-corner-all"> + <span class="ui-icon ui-icon-triangle-1-w"></span><?= t("previous") ?></a> + <? endif; ?> + </li> + <li class="gInfo"><?= t("%position of %total", array("position" => $position, "total" => $sibling_count)) ?></li> + <li class="txtright"> + <? if ($next_item): ?> + <a href="<?= $next_item->url() ?>" class="gButtonLink ui-icon-right ui-state-default ui-corner-all"> + <span class="ui-icon ui-icon-triangle-1-e"></span><?= t("next") ?></a> + <? else: ?> + <a class="gButtonLink ui-icon-right ui-state-disabled ui-corner-all"> + <span class="ui-icon ui-icon-triangle-1-e"></span><?= t("next") ?></a> + <? endif ?> + </li> </ul> + <?= $item->movie_img(array("class" => "gMovie", "id" => "gMovieId-{$item->id}")) ?> <div id="gInfo"> |