From 7433b07dac28a87a8d22bd0dd5fa78effe333255 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 4 Dec 2010 21:05:54 +0000 Subject: welcome to the new media view - it is being used in the new latest comments module git-svn-id: http://code.elgg.org/elgg/trunk@7530 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/annotation/generic_comment.php | 54 +++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) (limited to 'views/default/annotation/generic_comment.php') diff --git a/views/default/annotation/generic_comment.php b/views/default/annotation/generic_comment.php index 26fd468b7..ac603e978 100644 --- a/views/default/annotation/generic_comment.php +++ b/views/default/annotation/generic_comment.php @@ -1,8 +1,60 @@ entity_guid); +$commenter = get_user($comment->owner_guid); +if (!$entity || !$commenter) { + return true; +} + + +$friendlytime = elgg_view_friendly_time($comment->time_created); + +$commenter_icon = elgg_view("profile/icon", array('entity' => $commenter, 'size' => 'tiny')); +$commenter_link = "getURL()}\">$commenter->name"; + +$entity_title = $entity->title ? $entity->title : elgg_echo('untitled'); +$entity_link = "getURL()}\">$entity_title"; + +if ($full_view) { + +} else { + // brief view + + //@todo need link to actual comment! + + $on = elgg_echo('on'); + + $body = <<$commenter_link $on $entity_link ($friendlytime) +HTML; + + $params = array( + 'img' => $commenter_icon, + 'body' => $body, + ); + echo elgg_view('layout_elements/media', $params); + + // @todo remove this once the full view has been rewritten + return true; +} + + +// @todo - below needs to be rewritten like the brief view + $owner = get_user($vars['annotation']->owner_guid); ?> -- cgit v1.2.3