aboutsummaryrefslogtreecommitdiff
path: root/views/default/river
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-17 01:08:23 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-17 01:08:23 +0000
commit7c7dc0e249fb4afd1b0f4826bdbd27aa5d9f2a26 (patch)
treeaa3afd1a6c4493ef463bc8c0e4d77a11942e081f /views/default/river
parente634e03a412afdb4f31923b91b2af8efc0bb2be0 (diff)
downloadelgg-7c7dc0e249fb4afd1b0f4826bdbd27aa5d9f2a26.tar.gz
elgg-7c7dc0e249fb4afd1b0f4826bdbd27aa5d9f2a26.tar.bz2
updated the river friend view for the new river code
git-svn-id: http://code.elgg.org/elgg/trunk@7649 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/river')
-rw-r--r--views/default/river/item/list.php52
-rw-r--r--views/default/river/item/wrapper.php61
-rw-r--r--views/default/river/relationship/friend/create.php18
3 files changed, 18 insertions, 113 deletions
diff --git a/views/default/river/item/list.php b/views/default/river/item/list.php
deleted file mode 100644
index d791c74e8..000000000
--- a/views/default/river/item/list.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-/**
- *
- * @package Elgg
- * @subpackage Core
- *
- */
-?>
-<div class="river_item_list">
-<?php
- if (isset($vars['items']) && is_array($vars['items'])) {
-
- $i = 0;
- if (!empty($vars['items'])) {
- foreach($vars['items'] as $item) {
- echo elgg_view_river_item($item);
- $i++;
- if ($i >= $vars['limit']) {
- break;
- }
- }
- }
- }
-
- if ($vars['pagination'] !== false) {
- $baseurl = $_SERVER['REQUEST_URI'];
-
- $nav = '';
-
- if (sizeof($vars['items']) > $vars['limit']) {
- $newoffset = $vars['offset'] + $vars['limit'];
- $nexturl = elgg_http_add_url_query_elements($baseurl, array('offset' => $newoffset));
-
- $nav .= '<a class="back" href="'.$nexturl.'">&laquo; ' . elgg_echo('previous') . '</a> ';
- }
-
- if ($vars['offset'] > 0) {
- $newoffset = $vars['offset'] - $vars['limit'];
- if ($newoffset < 0) {
- $newoffset = 0;
- }
- $prevurl = elgg_http_add_url_query_elements($baseurl, array('offset' => $newoffset));
-
- $nav .= '<a class="forward" href="'.$prevurl.'">' . elgg_echo('next') . ' &raquo;</a> ';
- }
-
- if (!empty($nav)) {
- echo '<div class="river_pagination"><p>'.$nav.'</p></div>';
- }
- }
-?>
-</div> \ No newline at end of file
diff --git a/views/default/river/item/wrapper.php b/views/default/river/item/wrapper.php
deleted file mode 100644
index 0bdf2f4aa..000000000
--- a/views/default/river/item/wrapper.php
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-/**
- * Elgg river item wrapper.
- * Wraps all river items.
- *
- * @package Elgg
- */
-
-//get the site admins choice avatars or action icons
-$avatar_icon = get_plugin_setting("avatar_icon","riverdashboard");
-if(!$avatar_icon) {
- $avatar_icon = "icon";
-}
-
-if($avatar_icon == "icon"){
-
- ?>
- <div class="river_item">
- <div class="river_<?php echo $vars['item']->type; ?>">
- <div class="river_<?php echo $vars['item']->subtype; ?>">
- <div class="river_<?php echo $vars['item']->action_type; ?>">
- <div class="river_<?php echo $vars['item']->type; ?>_<?php if($vars['item']->subtype) echo $vars['item']->subtype . "_"; ?><?php echo $vars['item']->action_type; ?>">
- <p>
- <?php
- echo $vars['body'];
- ?>
- <span class="entity-subtext">
- (<?php
- echo elgg_view_friendly_time($vars['item']->posted);
- ?>)
- </span>
- </p>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <?php
-} else {
- ?>
- <div class="river_item">
- <span class="river_item_useravatar">
- <?php
- echo elgg_view("profile/icon",array('entity' => get_entity($vars['item']->subject_guid), 'size' => 'tiny'));
- ?>
- </span>
- <p class="river_item_body">
- <?php
- echo $vars['body'];
- ?>
- <span class="entity-subtext">
- (<?php
- echo elgg_view_friendly_time($vars['item']->posted);
- ?>)
- </span>
- </p>
- </div>
- <?php
-}
-?> \ No newline at end of file
diff --git a/views/default/river/relationship/friend/create.php b/views/default/river/relationship/friend/create.php
new file mode 100644
index 000000000..80c567795
--- /dev/null
+++ b/views/default/river/relationship/friend/create.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Create friend river view
+ */
+$subject = $vars['item']->getSubjectEntity();
+$object = $vars['item']->getObjectEntity();
+
+$object_link = "<a href=\"{$object->getURL()}\">$object->name</a>";
+$subject_icon = elgg_view("profile/icon", array('entity' => $subject, 'size' => 'tiny'));
+$object_icon = elgg_view("profile/icon", array('entity' => $object, 'size' => 'tiny'));
+
+echo elgg_echo("friends:river:add", array($object_link));
+
+echo '<div class="elgg-river-excerpt">';
+echo $subject_icon;
+echo '<span class="elgg-icon elgg-icon-following"></span>';
+echo $object_icon;
+echo '</div>';