aboutsummaryrefslogtreecommitdiff
path: root/views/default/river/object/image/create.php
blob: 44efa0c594ba2d45eca3a372f6c3a32428755e4a (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
<?php
/**
 * Image album view
 */

$subject = $vars['item']->getSubjectEntity();
$subject_link = elgg_view('output/url', array(
	'href' => $subject->getURL(),
	'text' => $subject->name,
	'class' => 'elgg-river-subject',
	'is_trusted' => true,
));

$image = $vars['item']->getObjectEntity();
$attachments = elgg_view('output/img', array(
	'src' => $image->getSrcUrl('thumb'),
	'class' => 'elgg-photo',
));
$image_link = elgg_view('output/url', array(
	'href' => $image->getURL(),
	'text' => $image->getTitle(),
	'is_trusted' => true,
));

$album_link = elgg_view('output/url', array(
	'href' => $image->getContainerEntity()->getURL(),
	'text' => $image->getContainerEntity()->getTitle(),
	'is_trusted' => true,
));

echo elgg_view('river/elements/layout', array(
	'item' => $vars['item'],
	'attachments' => $attachments,
	'summary' => elgg_echo('image:river:created', array($subject_link, $image_link, $album_link)),
));