aboutsummaryrefslogtreecommitdiff
path: root/views/default/object
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/object')
-rw-r--r--views/default/object/album/full.php10
-rw-r--r--views/default/object/image/full.php66
2 files changed, 73 insertions, 3 deletions
diff --git a/views/default/object/album/full.php b/views/default/object/album/full.php
index 4d2d8c88b..e350d2327 100644
--- a/views/default/object/album/full.php
+++ b/views/default/object/album/full.php
@@ -41,9 +41,13 @@ $params = array(
$params = $params + $vars;
$summary = elgg_view('object/elements/summary', $params);
-$body = elgg_view('output/longtext', array(
- 'value' => $album->description,
-));
+$body = '';
+if ($album->description) {
+ $body = elgg_view('output/longtext', array(
+ 'value' => $album->description,
+ 'class' => 'mbm',
+ ));
+}
$body .= elgg_list_entities(array(
'type' => 'object',
'subtype' => 'image',
diff --git a/views/default/object/image/full.php b/views/default/object/image/full.php
index a4abe2daf..d08c03f9c 100644
--- a/views/default/object/image/full.php
+++ b/views/default/object/image/full.php
@@ -1,2 +1,68 @@
<?php
+/**
+ * Full view of an image
+ *
+ * @uses $vars['entity'] TidypicsImage
+ *
+ * @author Cash Costello
+ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
+ */
+$image = $photo = $vars['entity'];
+
+$img = elgg_view('output/img', array(
+ 'src' => $image->getSrcURL('large'),
+ 'alt' => $image->getTitle(),
+ 'class' => 'elgg-photo',
+));
+
+$content = elgg_view('output/url', array(
+ 'text' => $img,
+ 'href' => $image->getURL(),
+));
+
+$owner_link = elgg_view('output/url', array(
+ 'href' => "photos/owner/" . $photo->getOwnerEntity()->username,
+ 'text' => $photo->getOwnerEntity()->name,
+));
+$author_text = elgg_echo('byline', array($owner_link));
+
+$owner_icon = elgg_view_entity_icon($photo->getOwnerEntity(), 'tiny');
+
+$metadata = elgg_view_menu('entity', array(
+ 'entity' => $vars['entity'],
+ 'handler' => 'photos',
+ 'sort_by' => 'priority',
+ 'class' => 'elgg-menu-hz',
+));
+
+$subtitle = "$author_text $date $categories $comments_link";
+
+$params = array(
+ 'entity' => $photo,
+ 'title' => false,
+ 'metadata' => $metadata,
+ 'subtitle' => $subtitle,
+ 'tags' => $tags,
+);
+$list_body = elgg_view('object/elements/summary', $params);
+
+$params = array('class' => 'mbl');
+$summary = elgg_view_image_block($owner_icon, $list_body, $params);
+
+echo $summary;
+
+if ($photo->description) {
+ echo elgg_view('output/longtext', array(
+ 'value' => $photo->description,
+ 'class' => 'mbl',
+ ));
+}
+
+echo '<div class="tidypics-wrapper-photo">';
+echo elgg_view('tidypics/tagging/help');
+echo elgg_view('tidypics/tagging/select', array('photo' => $photo));
+echo $content;
+echo '</div>';
+
+ echo elgg_view_comments($photo); \ No newline at end of file