aboutsummaryrefslogtreecommitdiff
path: root/views/default/object/album/list.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-23 18:46:41 -0500
committerCash Costello <cash.costello@gmail.com>2011-11-23 18:46:41 -0500
commit47bd8586910b1df3f29e2425572372e382b26f6a (patch)
tree044b79b6d9ac1317837fe08f4359f2c291497c9d /views/default/object/album/list.php
parent0aa823656bf92ae472cb6780afb24f5a0390b880 (diff)
downloadelgg-47bd8586910b1df3f29e2425572372e382b26f6a.tar.gz
elgg-47bd8586910b1df3f29e2425572372e382b26f6a.tar.bz2
added support for group albums
Diffstat (limited to 'views/default/object/album/list.php')
-rw-r--r--views/default/object/album/list.php52
1 files changed, 52 insertions, 0 deletions
diff --git a/views/default/object/album/list.php b/views/default/object/album/list.php
new file mode 100644
index 000000000..ccbd01cd1
--- /dev/null
+++ b/views/default/object/album/list.php
@@ -0,0 +1,52 @@
+<?php
+/**
+ * Display an album as an item in a list
+ *
+ * @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);
+$owner = $album->getOwnerEntity();
+
+$owner_link = elgg_view('output/url', array(
+ 'href' => "photos/owner/$owner->username",
+ 'text' => $owner->name,
+ 'is_trusted' => true,
+));
+$author_text = elgg_echo('byline', array($owner_link));
+$date = elgg_view_friendly_time($album->time_created);
+$categories = elgg_view('output/categories', $vars);
+
+$subtitle = "$author_text $date $categories";
+
+$title = elgg_view('output/url', array(
+ 'text' => $album->getTitle(),
+ 'href' => $album->getURL(),
+));
+
+$params = array(
+ 'entity' => $album,
+ 'title' => $title,
+ 'metadata' => null,
+ 'subtitle' => $subtitle,
+ 'tags' => elgg_view('output/tags', array('tags' => $album->tags)),
+);
+$params = $params + $vars;
+$summary = elgg_view('object/elements/summary', $params);
+
+$cover = elgg_view('output/img', array(
+ 'src' => $album->getCoverImageURL('thumb'),
+ 'alt' => $album->getTitle(),
+ 'class' => 'elgg-photo',
+));
+$icon = elgg_view('output/url', array(
+ 'text' => $cover,
+ 'href' => $album->getURL(),
+ 'encode_text' => false,
+ 'is_trusted' => true,
+));
+
+echo $header = elgg_view_image_block($icon, $summary);