mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-21 11:59:13 -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.
42 lines
1.5 KiB
PHP
42 lines
1.5 KiB
PHP
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
<? // @todo Set hover on AlbumGrid list items for guest users ?>
|
|
<div id="gInfo">
|
|
<?= $theme->album_top() ?>
|
|
<h1><?= p::purify($item->title) ?></h1>
|
|
<div class="gDescription"><?= nl2br(p::purify($item->description)) ?></div>
|
|
</div>
|
|
|
|
<ul id="gAlbumGrid">
|
|
<? if (count($children)): ?>
|
|
<? foreach ($children as $i => $child): ?>
|
|
<? $item_class = "gPhoto"; ?>
|
|
<? if ($child->is_album()): ?>
|
|
<? $item_class = "gAlbum"; ?>
|
|
<? endif ?>
|
|
<li id="gItemId-<?= $child->id ?>" class="gItem <?= $item_class ?>">
|
|
<?= $theme->thumb_top($child) ?>
|
|
<a href="<?= $child->url() ?>">
|
|
<?= $child->thumb_img(array("class" => "gThumbnail")) ?>
|
|
</a>
|
|
<?= $theme->thumb_bottom($child) ?>
|
|
<?= $theme->context_menu($child, "#gItemId-{$child->id} .gThumbnail") ?>
|
|
<h2><span></span><a href="<?= $child->url() ?>"><?= p::clean($child->title) ?></a></h2>
|
|
<ul class="gMetadata">
|
|
<?= $theme->thumb_info($child) ?>
|
|
</ul>
|
|
</li>
|
|
<? endforeach ?>
|
|
<? else: ?>
|
|
<? if ($user->admin || access::can("add", $item)): ?>
|
|
<? $addurl = url::file("index.php/simple_uploader/app/$item->id") ?>
|
|
<li><?= t("There aren't any photos here yet! <a %attrs>Add some</a>.",
|
|
array("attrs" => "href=\"$addurl\" class=\"gDialogLink\"")) ?></li>
|
|
<? else: ?>
|
|
<li><?= t("There aren't any photos here yet!") ?></li>
|
|
<? endif; ?>
|
|
<? endif; ?>
|
|
</ul>
|
|
<?= $theme->album_bottom() ?>
|
|
|
|
<?= $theme->pager() ?>
|