aboutsummaryrefslogtreecommitdiff
path: root/mod/riverdashboard/views/default/river/item
diff options
context:
space:
mode:
Diffstat (limited to 'mod/riverdashboard/views/default/river/item')
-rw-r--r--mod/riverdashboard/views/default/river/item/list.php14
-rw-r--r--mod/riverdashboard/views/default/river/item/wrapper.php122
2 files changed, 61 insertions, 75 deletions
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,9 +1,4 @@
<?php
-/**
- */
-?>
-<div class="river_item_list">
-<?php
if (isset($vars['items']) && is_array($vars['items'])) {
$i = 0;
@@ -33,7 +28,7 @@
$nexturl=$baseurl . '?' . $urladdition;
}
- $nav .= '<a class="back" href="'.$nexturl.'">&laquo; ' . elgg_echo('previous') . '</a> ';
+ $nav .= '<a class="pagination_previous" href="'.$nexturl.'">&laquo; ' . elgg_echo('previous') . '</a> ';
}
if ($vars['offset'] > 0) {
@@ -48,12 +43,11 @@
$prevurl=$baseurl . '?' . $urladdition;
}
- $nav .= '<a class="forward" href="'.$prevurl.'">' . elgg_echo('next') . ' &raquo;</a> ';
+ $nav .= '<a class="pagination_next" href="'.$prevurl.'">' . elgg_echo('next') . ' &raquo;</a> ';
}
if (!empty($nav)) {
- echo '<div class="river_pagination"><p>'.$nav.'</p><div class="clearfloat"></div></div>';
+ echo '<div class="pagination clearfloat">'.$nav.'</div>';
}
}
-?>
-</div> \ 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;
?>
<div class="river_item">
- <!-- avatar -->
- <span class="river_item_useravatar" style="float:left;margin:0 10px 10px 0;">
- <?php
- echo elgg_view("profile/icon",array('entity' => $user, 'size' => 'small'));
- ?>
+ <span class="river_item_useravatar">
+ <?php echo elgg_view("profile/icon",array('entity' => $user, 'size' => 'small')); ?>
</span>
- <!-- body contents, generated by the river view in each plugin -->
- <?php
- echo $vars['body'];
- ?>
- <div class="clearfloat"></div>
- <!-- display comments and likes if on the dashboard/live feed -->
- <div class="river_item_annotation">
- <?php
- //display the number of comments and likes if there are any
- if($num_comments != 0){
- echo "<div class='river_more_comments'><span class='more_comments'>";
- //set the correct context comment or comments
- if($num_comments == 1)
- echo "<a href=\"{$object_url}\">+{$num_comments} more comment</a>";
- else
- echo "<a href=\"{$object_url}\">+{$num_comments} more comments</a>";
-
- echo "</span></div>";
- }
- //display latest 2 comments if there are any
- if($get_comments){
- $counter = 0;
- $background = "";
- echo "<div class='river_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 "<div class='river_comment {$alt}'>";
- echo "<div class='river_comment_owner_icon'>";
- echo elgg_view("profile/icon",array('entity' => $comment_owner, 'size' => 'tiny'));
- echo "</div>";
- //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 "<div class='comment_wrapper'>";
- echo "<a href=\"{$comment_owner_url}\">" . $comment_owner->name . "</a> " . parse_urls($contents);
- echo "<br /><span class='river_item_time'>" . friendly_time($gc->time_created) . "</span>";
- echo "<div class=\"clearfloat\"></div>";
- echo "</div></div>";
- $counter++;
- }
- echo "</div>";
- }
+ <div class="river_item_contents clearfloat">
+ <!-- body contents, generated by the river view in each plugin -->
+ <?php echo $vars['body']; ?>
+ </div>
+
+<!-- display comments -->
+<?php
+ //display latest 2 comments if there are any
+ if($get_comments){
+ $counter = 0;
+ $background = "";
+ echo "<div class='river_comments'>";
+
+ //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 "<a class='river_more_comments' href=\"{$object_url}\">+{$num_comments} more comment</a>";
+ else
+ echo "<a class='river_more_comments' href=\"{$object_url}\">+{$num_comments} more comments</a>";
+ }
+
+ 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 "<div class='river_comment {$alt} clearfloat'>";
+ echo "<span class='river_comment_owner_icon'>";
+ echo elgg_view("profile/icon",array('entity' => $comment_owner, 'size' => 'tiny'));
+ echo "</span>";
+ //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 "<div class='river_comment_contents'>";
+ echo "<a href=\"{$comment_owner_url}\">" . $comment_owner->name . "</a> " . parse_urls($contents);
+ echo "<span class='entity_subtext'>" . friendly_time($gc->time_created) . "</span>";
+ echo "</div></div>";
+ $counter++;
+ }
+ echo "</div>";
+ }
//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 "<span class='comment_link'><a href=\"{$object_url}\">Comment</a></span>";
+ 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 "<a class='comment_link' href=\"{$object_url}\">Comment</a>";
}
?>
- </div>
- <div class="clearfloat"></div>
</div> \ No newline at end of file