From c7e2ad1a41eec3a4edc201fb62aa74fe0a0afa66 Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 24 Dec 2010 13:39:24 +0000 Subject: fixing a few display issues in the object/blog view git-svn-id: http://code.elgg.org/elgg/trunk@7718 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/blog/views/default/object/blog.php | 37 ++++++++++++++-------------------- 1 file changed, 15 insertions(+), 22 deletions(-) (limited to 'mod') diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php index f296caa69..199a7c822 100644 --- a/mod/blog/views/default/object/blog.php +++ b/mod/blog/views/default/object/blog.php @@ -12,16 +12,18 @@ if (!$blog) { return TRUE; } -$owner = get_entity($blog->owner_guid); -$container = get_entity($blog->container_guid); -$linked_title = "getURL()}\" title=\"" . htmlentities($blog->title) . "\">{$blog->title}"; +$owner = $blog->getOwnerEntity(); +$container = $blog->getContainerEntity(); $categories = elgg_view('categories/view', $vars); $excerpt = $blog->excerpt; $body = autop($blog->description); $owner_icon = elgg_view('profile/icon', array('entity' => $owner, 'size' => 'tiny')); -$owner_blog_link = "username\">{$owner->name}"; -$author_text = elgg_echo('blog:author_by_line', array($owner_blog_link)); +$owner_link = elgg_view('output/url', array( + 'href' => "pg/blog/owner/$owner->username", + 'text' => $owner->name, +)); +$author_text = elgg_echo('blog:author_by_line', array($owner_link)); if ($blog->tags) { $tags = "

" . elgg_view('output/tags', array('tags' => $blog->tags)) . "

"; } else { @@ -64,8 +66,11 @@ if ($blog->canEdit()) { $metadata .= "
  • $status_text
  • "; } - $edit_url = elgg_get_site_url()."pg/blog/edit/{$owner->username}/{$blog->getGUID()}/"; - $edit_link = "" . elgg_echo('edit') . ''; + $edit_url = elgg_get_site_url() . "pg/blog/edit/{$owner->username}/{$blog->getGUID()}/"; + $edit_link = elgg_view('output/url', array( + 'href' => $edit_url, + 'text' => elgg_echo('edit'), + )); $metadata .= "
  • $edit_link
  • "; $delete_url = "action/blog/delete?guid={$blog->getGUID()}"; @@ -89,35 +94,23 @@ if ($full) { 'title' => $blog->title, 'buttons' => '', ); - $header = elgg_view('content/header', $params); + $header = elgg_view_title($blog->title); $params = array( 'entity' => $blog, + 'title' => false, 'metadata' => $metadata, 'subtitle' => $subtitle, 'tags' => $tags, ); $list_body = elgg_view('layout/objects/list/body', $params); - $info = << -
    $edit
    -

    - $author_text - $date - $categories - $comments_link -

    - $tags - -HTML; - $blog_info = elgg_view_image_block($owner_icon, $list_body); echo << +
    $body
    HTML; -- cgit v1.2.3