aboutsummaryrefslogtreecommitdiff
path: root/views/default/object/album/gallery.php
blob: 78eec3517130d2893046bb45e3e93fb9e9d64d64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
 * Summary of an album for lists/galleries
 *
 * @uses $vars['entity'] TidypicsAlbum
 *
 * @author Cash Costello
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
 */

$album = elgg_extract('entity', $vars);

$album_cover = elgg_view('output/img', array(
	'src' => $album->getCoverImageURL(),
	'alt' => $album->getTitle(),
	'class' => 'elgg-photo',
));

$header = elgg_view('output/url', array(
	'text' => $album->getTitle(),
	'href' => $album->getURL(),
));

$body = elgg_view('output/url', array(
	'text' => $album_cover,
	'href' => $album->getURL(),
	'encode_text' => false,
	'is_trusted' => true,
));

$footer = elgg_view('output/url', array(
	'text' => $album->getContainerEntity()->name,
	'href' => $album->getContainerEntity()->getURL(),
	'is_trusted' => true,
));
$footer .= '<div class="elgg-subtext">' . elgg_echo('album:num', array($album->getSize())) . '</div>';

$params = array(
	'footer' => $footer,
);
echo elgg_view_module('tidypics-album', $header, $body, $params);