1
0
This repository has been archived on 2021-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
gallery3-contrib/themes/3nids/views/album.html.php

49 lines
1.9 KiB
PHP
Raw Normal View History

2009-09-23 06:43:11 +00:00
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? // @todo Set hover on AlbumGrid list items for guest users ?>
2009-10-19 07:21:48 +00:00
<div id="g-info">
2009-09-23 06:43:11 +00:00
<?= $theme->album_top() ?>
<h1><?= html::purify($item->title) ?></h1>
2009-10-19 07:21:48 +00:00
<div class="g-description"><?= nl2br(html::purify($item->description)) ?></div>
2009-09-23 06:43:11 +00:00
</div>
<? $children_all = $item->viewable()->children();
$theme->pagination = new Pagination();
$theme->pagination->initialize(array("query_string" => "page","total_items" => $children_count,"items_per_page" => $page_size,"style" => "classic"));
$children_offset = ($theme->pagination->current_page -1) * $page_size ; ?>
2009-10-19 07:21:48 +00:00
2009-10-19 08:43:55 +00:00
<ul id="g-album-grid" class="ui-helper-clearfix">
2009-09-23 06:43:11 +00:00
<? if (count($children)): ?>
<? for($i=0;$i<$children_offset;$i++): ?>
<? $child = $children_all[$i] ?>
<?= theme_3nids::fancylink($child,"header") ?>
2009-09-23 06:43:11 +00:00
<? endfor ?>
<? foreach ($children as $i => $child): ?>
2009-10-19 07:21:48 +00:00
<? $item_class = "g-photo"; ?>
2009-09-23 06:43:11 +00:00
<? if ($child->is_album()): ?>
2009-10-19 07:21:48 +00:00
<? $item_class = "g-album"; ?>
2009-09-23 06:43:11 +00:00
<? endif ?>
2009-10-19 07:21:48 +00:00
<li id="g-item-id-<?= $child->id ?>" class="g-item <?= $item_class ?>">
2009-09-23 06:43:11 +00:00
<?= $theme->thumb_top($child) ?>
<?= theme_3nids::fancylink($child,"album") ?>
2009-09-23 06:43:11 +00:00
<?= $theme->thumb_bottom($child) ?>
2009-10-19 07:21:48 +00:00
<?= $theme->context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?>
2009-09-23 06:43:11 +00:00
</li>
<? endforeach ?>
<? for($i=$children_offset+$page_size;$i<$children_count;$i++): ?>
<? $child = $children_all[$i] ?>
<?= theme_3nids::fancylink($child,"header") ?>
<? endfor ?>
2009-09-23 06:43:11 +00:00
<? 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>.",
2009-10-19 07:21:48 +00:00
array("attrs" => html::mark_clean("href=\"$addurl\" class=\"g-dialog-link\""))) ?></li>
2009-09-23 06:43:11 +00:00
<? else: ?>
<li><?= t("There aren't any photos here yet!") ?></li>
<? endif; ?>
<? endif; ?>
</ul>
<?= $theme->album_bottom() ?>
<?= $theme->pager() ?>