From 08910caa0a8750a449db6910bb28d0d1e758c615 Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 25 Oct 2011 19:18:09 -0400 Subject: added new view for the full display of objects --- mod/blog/views/default/object/blog.php | 17 ++++----- mod/bookmarks/views/default/object/bookmarks.php | 18 ++++++---- mod/file/views/default/object/file.php | 23 ++++++------ mod/pages/views/default/object/page_top.php | 15 ++++---- views/default/object/elements/full.php | 45 ++++++++++++++++++++++++ 5 files changed, 81 insertions(+), 37 deletions(-) create mode 100644 views/default/object/elements/full.php diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php index b51b769a2..05ddf62c7 100644 --- a/mod/blog/views/default/object/blog.php +++ b/mod/blog/views/default/object/blog.php @@ -66,8 +66,6 @@ if ($full) { 'class' => 'blog-post', )); - $header = elgg_view_title($blog->title); - $params = array( 'entity' => $blog, 'title' => false, @@ -76,15 +74,14 @@ if ($full) { 'tags' => $tags, ); $params = $params + $vars; - $list_body = elgg_view('object/elements/summary', $params); + $summary = elgg_view('object/elements/summary', $params); - $blog_info = elgg_view_image_block($owner_icon, $list_body); - - echo << $blog->title, + 'summary' => $summary, + 'icon' => $owner_icon, + 'body' => $body, + )); } else { // brief view diff --git a/mod/bookmarks/views/default/object/bookmarks.php b/mod/bookmarks/views/default/object/bookmarks.php index bdd623bb5..ba8029a54 100644 --- a/mod/bookmarks/views/default/object/bookmarks.php +++ b/mod/bookmarks/views/default/object/bookmarks.php @@ -58,7 +58,6 @@ if (elgg_in_context('widgets')) { } if ($full && !elgg_in_context('gallery')) { - $header = elgg_view_title($bookmark->title); $params = array( 'entity' => $bookmark, @@ -68,19 +67,24 @@ if ($full && !elgg_in_context('gallery')) { 'tags' => $tags, ); $params = $params + $vars; - $list_body = elgg_view('object/elements/summary', $params); - $bookmark_info = elgg_view_image_block($owner_icon, $list_body); + $summary = elgg_view('object/elements/summary', $params); $bookmark_icon = elgg_view_icon('push-pin-alt'); - echo << $bookmark_icon$link $description HTML; + echo elgg_view('object/elements/full', array( + 'entity' => $bookmark, + 'title' => $bookmark->title, + 'icon' => $owner_icon, + 'summary' => $summary, + 'body' => $body, + )); + } elseif (elgg_in_context('gallery')) { echo << @@ -124,4 +128,4 @@ HTML; $body = elgg_view('object/elements/summary', $params); echo elgg_view_image_block($owner_icon, $body); -} \ No newline at end of file +} diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php index 874d8fb07..81421133f 100644 --- a/mod/file/views/default/object/file.php +++ b/mod/file/views/default/object/file.php @@ -19,8 +19,6 @@ $excerpt = elgg_get_excerpt($file->description); $mime = $file->mimetype; $base_type = substr($mime, 0, strpos($mime,'/')); -$body = elgg_view('output/longtext', array('value' => $file->description)); - $owner_link = elgg_view('output/url', array( 'href' => "file/owner/$owner->username", 'text' => $owner->name, @@ -69,8 +67,6 @@ if ($full && !elgg_in_context('gallery')) { $extra = elgg_view("file/specialcontent/$base_type/default", $vars); } - $header = elgg_view_title($file->title); - $params = array( 'entity' => $file, 'title' => false, @@ -79,17 +75,18 @@ if ($full && !elgg_in_context('gallery')) { 'tags' => $tags, ); $params = $params + $vars; - $list_body = elgg_view('object/elements/summary', $params); + $summary = elgg_view('object/elements/summary', $params); - $file_info = elgg_view_image_block($file_icon, $list_body); + $text = elgg_view('output/longtext', array('value' => $file->description)); + $body = "$text $extra"; - echo << - $body - $extra - -HTML; + echo elgg_view('object/elements/full', array( + 'entity' => $file, + 'title' => false, + 'icon' => $file_icon, + 'summary' => $summary, + 'body' => $body, + )); } elseif (elgg_in_context('gallery')) { echo ' +HTML; -- cgit v1.2.3 From 5c43ddc2d58dbe7a280742131f221e4947f73125 Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 25 Oct 2011 19:30:44 -0400 Subject: Fixes #2292 added object/summary/extend view --- views/default/object/elements/summary.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/views/default/object/elements/summary.php b/views/default/object/elements/summary.php index 3ca4de2be..8d82bc52a 100644 --- a/views/default/object/elements/summary.php +++ b/views/default/object/elements/summary.php @@ -49,6 +49,9 @@ if ($metadata) { echo "

$title_link

"; echo "
$subtitle
"; echo $tags; + +echo elgg_view('object/summary/extend', $vars); + if ($content) { echo "
$content
"; } -- cgit v1.2.3