From a8e680230b2ca66cd1d95aaac228ed0c3a0d77ad Mon Sep 17 00:00:00 2001 From: pete Date: Thu, 11 Mar 2010 13:04:38 +0000 Subject: Riverdashboard updated to new UI. DOM simplified a bit & css cleaned up. git-svn-id: http://code.elgg.org/elgg/trunk@5358 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../views/default/river/item/list.php | 14 +-- .../views/default/river/item/wrapper.php | 122 ++++++++++----------- 2 files changed, 61 insertions(+), 75 deletions(-) (limited to 'mod/riverdashboard/views/default/river') diff --git a/mod/riverdashboard/views/default/river/item/list.php b/mod/riverdashboard/views/default/river/item/list.php index 25774ff08..0c0d7a4db 100644 --- a/mod/riverdashboard/views/default/river/item/list.php +++ b/mod/riverdashboard/views/default/river/item/list.php @@ -1,8 +1,3 @@ - -
« ' . elgg_echo('previous') . ' '; + $nav .= '« ' . elgg_echo('previous') . ' '; } if ($vars['offset'] > 0) { @@ -48,12 +43,11 @@ $prevurl=$baseurl . '?' . $urladdition; } - $nav .= '' . elgg_echo('next') . ' » '; + $nav .= '' . elgg_echo('next') . ' » '; } if (!empty($nav)) { - echo '

'.$nav.'

'; + echo ''; } } -?> -
\ No newline at end of file +?> \ No newline at end of file diff --git a/mod/riverdashboard/views/default/river/item/wrapper.php b/mod/riverdashboard/views/default/river/item/wrapper.php index 1aa508d99..eabe48e53 100644 --- a/mod/riverdashboard/views/default/river/item/wrapper.php +++ b/mod/riverdashboard/views/default/river/item/wrapper.php @@ -47,73 +47,65 @@ else $num_comments = $comment_count - 3; ?>
- - - $user, 'size' => 'small')); - ?> + + $user, 'size' => 'small')); ?> - - -
- -
- "; - //set the correct context comment or comments - if($num_comments == 1) - echo "+{$num_comments} more comment"; - else - echo "+{$num_comments} more comments"; - - echo "
"; - } - //display latest 2 comments if there are any - if($get_comments){ - $counter = 0; - $background = ""; - echo "
"; - foreach($get_comments as $gc){ - //get the comment owner - $comment_owner = get_user($gc->owner_guid); - //get the comment owner's profile url - $comment_owner_url = $comment_owner->getURL(); - // color-code each of the 3 comments - if( ($counter == 2 && $comment_count >= 4) || ($counter == 1 && $comment_count == 2) || ($counter == 0 && $comment_count == 1) || ($counter == 2 && $comment_count == 3) ) - $alt = 'latest'; - else if( ($counter == 1 && $comment_count >= 4) || ($counter == 0 && $comment_count == 2) || ($counter == 1 && $comment_count == 3) ) - $alt = 'penultimate'; - - //display comment - echo "
"; - echo "
"; - echo elgg_view("profile/icon",array('entity' => $comment_owner, 'size' => 'tiny')); - echo "
"; - //truncate comment to 150 characters - if(strlen($gc->value) > 150) { - $gc->value = substr($gc->value, 0, strpos($gc->value, ' ', 150)) . "..."; - } - $contents = strip_tags($gc->value); - echo "
"; - echo "" . $comment_owner->name . " " . parse_urls($contents); - echo "
" . friendly_time($gc->time_created) . ""; - echo "
"; - echo "
"; - $counter++; - } - echo "
"; - } +
+ + +
+ + +"; + + //display the number of comments if there are any + if($num_comments != 0){ + //set the correct context comment or comments + if($num_comments == 1) + echo "+{$num_comments} more comment"; + else + echo "+{$num_comments} more comments"; + } + + foreach($get_comments as $gc){ + //get the comment owner + $comment_owner = get_user($gc->owner_guid); + //get the comment owner's profile url + $comment_owner_url = $comment_owner->getURL(); + // color-code each of the 3 comments + if( ($counter == 2 && $comment_count >= 4) || ($counter == 1 && $comment_count == 2) || ($counter == 0 && $comment_count == 1) || ($counter == 2 && $comment_count == 3) ) + $alt = 'latest'; + else if( ($counter == 1 && $comment_count >= 4) || ($counter == 0 && $comment_count == 2) || ($counter == 1 && $comment_count == 3) ) + $alt = 'penultimate'; + + //display comment + echo "
"; + echo ""; + echo elgg_view("profile/icon",array('entity' => $comment_owner, 'size' => 'tiny')); + echo ""; + //truncate comment to 150 characters + if(strlen($gc->value) > 150) { + $gc->value = substr($gc->value, 0, strpos($gc->value, ' ', 150)) . "..."; + } + $contents = strip_tags($gc->value); + echo "
"; + echo "" . $comment_owner->name . " " . parse_urls($contents); + echo "" . friendly_time($gc->time_created) . ""; + echo "
"; + $counter++; + } + echo "
"; + } //display the comment link - if($vars['item']->type != 'user'){ - //for now don't display the comment link on bookmarks and wire messages - if($vars['item']->subtype != 'thewire' && $vars['item']->subtype != 'bookmarks' && $vars['item']->subtype != '') - echo "Comment"; + if($vars['item']->type != 'user'){ + //for now don't display the comment link on bookmarks and wire messages + if($vars['item']->subtype != 'thewire' && $vars['item']->subtype != 'bookmarks' && $vars['item']->subtype != '') + echo "Comment"; } ?> - -
\ No newline at end of file -- cgit v1.2.3