diff options
| author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-24 13:39:24 +0000 | 
|---|---|---|
| committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-24 13:39:24 +0000 | 
| commit | c7e2ad1a41eec3a4edc201fb62aa74fe0a0afa66 (patch) | |
| tree | c574861c2f0fde78e9d866020243094dfecf3a66 /mod/blog/views/default | |
| parent | 54dac8c96380082136b38532707c7b1e031549e8 (diff) | |
| download | elgg-c7e2ad1a41eec3a4edc201fb62aa74fe0a0afa66.tar.gz elgg-c7e2ad1a41eec3a4edc201fb62aa74fe0a0afa66.tar.bz2 | |
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
Diffstat (limited to 'mod/blog/views/default')
| -rw-r--r-- | mod/blog/views/default/object/blog.php | 37 | 
1 files changed, 15 insertions, 22 deletions
| 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 = "<a href=\"{$blog->getURL()}\" title=\"" . htmlentities($blog->title) . "\">{$blog->title}</a>"; +$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 = "<a href=\"" . elgg_get_site_url() . "pg/blog/owner/$owner->username\">{$owner->name}</a>"; -$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 = "<p class=\"elgg-tags\">" . elgg_view('output/tags', array('tags' => $blog->tags)) . "</p>";  } else { @@ -64,8 +66,11 @@ if ($blog->canEdit()) {  		$metadata .= "<li>$status_text</li>";  	} -	$edit_url = elgg_get_site_url()."pg/blog/edit/{$owner->username}/{$blog->getGUID()}/"; -	$edit_link = "<span class='entity-edit'><a href=\"$edit_url\">" . elgg_echo('edit') . '</a></span>'; +	$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 .= "<li>$edit_link</li>";  	$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 = <<<HTML -<div class="entity-listing-info clearfix"> -	<div class="entity-metadata">$edit</div> -	<p class="entity-subtext"> -		$author_text -		$date -		$categories -		$comments_link -	</p> -	$tags -</div> -HTML; -  	$blog_info = elgg_view_image_block($owner_icon, $list_body);  	echo <<<HTML  $header  $blog_info -<div class="blog_post elgg-content"> +<div class="blog-post elgg-content">  	$body  </div>  HTML; | 
