mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-21 03:49:21 -04:00
and album covers in the context menu. Notes: - This requires context_menu() to have a CSS selector that refers to the <img> that we're operating on, otherwise we don't know how to find the thumbnail, etc. - Create Menu_Element_Ajax_Link which has an ajax_handler attribute that contains a snippet of JS that we're going to run when the ajax call returns. - Add $.gallery_replace_image in gallery.common.js - Add lib/gallery.ajax.js which can be used to ajaxify any link, and have ui.init.js in the themes call that on all .gAjaxLink elements.
41 lines
1.5 KiB
PHP
41 lines
1.5 KiB
PHP
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
<div id="gItem">
|
|
<?= $theme->photo_top() ?>
|
|
|
|
<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">
|
|
<h1><?= p::purify($item->title) ?></h1>
|
|
<div><?= nl2br(p::purify($item->description)) ?></div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
var ADD_A_COMMENT = "<?= t("Add a comment") ?>";
|
|
</script>
|
|
<?= $theme->photo_bottom() ?>
|
|
<?= $theme->context_menu($item, "#gMovieId-{$item->id}") ?>
|
|
</div>
|