// @todo Set hover on AlbumGrid list items for guest users ?>
if (count($children)): ?>
foreach ($children as $i => $child): ?>
// Skip invalid children
if (!is_object($child) || empty($child->id)) {
continue;
}
$item_class = "g-photo";
if ($child->is_album()) {
$item_class = "g-album";
}
// Store ALL values and generate ALL HTML BEFORE any theme function calls
$child_id = $child->id;
$child_url = $child->url();
$child_title = $child->title;
$child_has_thumb = $child->has_thumb();
$thumb_img_html = $child_has_thumb ? $child->thumb_img(array("class" => "g-thumbnail")) : '';
// Now call theme functions (these may destroy $child)
$thumb_top_html = $theme->thumb_top($child);
$thumb_bottom_html = $theme->thumb_bottom($child);
$context_menu_html = $theme->context_menu($child, "#g-item-id-{$child_id} .g-thumbnail");
$thumb_info_html = $theme->thumb_info($child);
?>
-
endforeach ?>
else: ?>
if ($user->admin || access::can("add", $item)): ?>
$addurl = url::site("uploader/index/$item->id") ?>
- There aren't any photos here yet! Add some.
else: ?>
- There aren't any photos here yet!
endif; ?>
endif; ?>
// This is a generic paginator for album, photo and movie pages. Depending on the page type,
// there are different sets of variables available. With this data, you can make a paginator
// that lets you say "You're viewing photo 5 of 35", or "You're viewing photos 10 - 18 of 37"
// for album views.
//
// Available variables for all page types:
// $page_type - "collection", "item", or "other"
// $page_subtype - "album", "movie", "photo", "tag", etc.
// $previous_page_url - the url to the previous page, if there is one
// $next_page_url - the url to the next page, if there is one
// $total - the total number of photos in this album
//
// Available for the "collection" page types:
// $page - what page number we're on
// $max_pages - the maximum page number
// $page_size - the page size
// $first_page_url - the url to the first page, or null if we're on the first page
// $last_page_url - the url to the last page, or null if we're on the last page
// $first_visible_position - the position number of the first visible photo on this page
// $last_visible_position - the position number of the last visible photo on this page
//
// Available for "item" page types:
// $position - the position number of this photo
//
?>
-
if ($page_type == "collection"): ?>
if (isset($first_page_url)): ?>
First
else: ?>
First
endif ?>
endif ?>
if (isset($previous_page_url)): ?>
Previous
else: ?>
Previous
endif ?>
-
if ($total): ?>
if ($page_type == "collection"): ?>
Photos 1 - 18 of 18 else: ?>
of 18 endif ?>
else: ?>
No photos endif ?>
-
if (isset($next_page_url)): ?>
Next
else: ?>
Next
endif ?>
if ($page_type == "collection"): ?>
if (isset($last_page_url)): ?>
Last
else: ?>
Last
endif ?>
endif ?>