aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/css/admin.php6
-rw-r--r--views/default/css/elements/components.php12
-rw-r--r--views/default/css/elements/core.php6
-rw-r--r--views/default/css/elements/layout.php3
-rw-r--r--views/default/css/elements/navigation.php31
-rw-r--r--views/default/css/elgg.php7
-rw-r--r--views/default/object/default.php1
-rw-r--r--views/default/object/elements/summary.php8
-rw-r--r--views/default/object/plugin/advanced.php2
-rw-r--r--views/default/object/plugin/invalid.php2
-rw-r--r--views/default/object/widget/elements/controls.php6
-rw-r--r--views/default/page/components/gallery.php31
-rw-r--r--views/default/page/components/list.php6
-rw-r--r--views/default/page/default.php2
-rw-r--r--views/default/page/elements/owner_block.php2
-rw-r--r--views/default/page/layouts/one_column.php15
-rw-r--r--views/default/page/layouts/widgets/add_button.php11
-rw-r--r--views/default/river/annotation/generic_comment/create.php27
-rw-r--r--views/default/river/elements/body.php70
-rw-r--r--views/default/river/elements/responses.php (renamed from views/default/river/elements/footer.php)10
-rw-r--r--views/default/river/elements/summary.php41
-rw-r--r--views/default/river/item.php10
-rw-r--r--views/default/river/relationship/friend/create.php16
-rw-r--r--views/default/river/user/default/profileiconupdate.php18
-rw-r--r--views/default/widgets/friends/content.php16
25 files changed, 247 insertions, 112 deletions
diff --git a/views/default/css/admin.php b/views/default/css/admin.php
index a4d413781..d7c154438 100644
--- a/views/default/css/admin.php
+++ b/views/default/css/admin.php
@@ -383,7 +383,7 @@ table.mceLayout {
margin-left: 5px;
}
-.elgg-list-item {
+.elgg-item {
margin: 3px;
}
.elgg-menu-metadata {
@@ -1102,6 +1102,10 @@ a.elgg-widget-collapsed:before {
ADMIN MISC
*************************************** */
+.elgg-instructs {
+ max-width: 600px;
+}
+
.manifest_file {
background-color:#eee;
diff --git a/views/default/css/elements/components.php b/views/default/css/elements/components.php
index 0fcbe3619..3f30a6422 100644
--- a/views/default/css/elements/components.php
+++ b/views/default/css/elements/components.php
@@ -47,10 +47,10 @@
border-bottom: 1px dotted #CCCCCC;
}
-.elgg-list-item .elgg-subtext {
+.elgg-item .elgg-subtext {
margin-bottom: 5px;
}
-.elgg-list-content {
+.elgg-item .elgg-content {
margin: 10px 5px;
}
@@ -65,9 +65,12 @@
.elgg-gallery td {
padding: 5px;
}
-.elgg-gallery-fluid li {
+.elgg-gallery-fluid > li {
float: left;
}
+.elgg-gallery-users > li {
+ margin: 0 2px;
+}
/* ***************************************
Tables
@@ -161,6 +164,9 @@
font-style: italic;
line-height: 1.2em;
}
+
+.elgg-river-attachments,
+.elgg-river-message,
.elgg-river-content {
border-left: 1px solid #CCC;
font-size: 85%;
diff --git a/views/default/css/elements/core.php b/views/default/css/elements/core.php
index 61dcdb1fe..af4a1882a 100644
--- a/views/default/css/elements/core.php
+++ b/views/default/css/elements/core.php
@@ -96,9 +96,6 @@
.elgg-menu-hz > li > span {
/* Google says do this, but why? */
position: relative;
-
- /* FF2 */
- display: -moz-inline-box;
display: inline-block;
@@ -106,6 +103,3 @@
zoom: 1;
*display: inline;
}
-
-/* Looks much better when middle-aligned with surrounding text */
-.elgg-icon {vertical-align:middle} \ No newline at end of file
diff --git a/views/default/css/elements/layout.php b/views/default/css/elements/layout.php
index 4d87b8824..42d898439 100644
--- a/views/default/css/elements/layout.php
+++ b/views/default/css/elements/layout.php
@@ -75,9 +75,6 @@
.elgg-layout {
min-height: 360px;
}
-.elgg-layout-one-column {
- padding: 10px 0;
-}
.elgg-layout-one-sidebar {
background: transparent url(<?php echo elgg_get_site_url(); ?>_graphics/sidebar_background.gif) repeat-y right top;
}
diff --git a/views/default/css/elements/navigation.php b/views/default/css/elements/navigation.php
index 99de0867b..64b7c47b4 100644
--- a/views/default/css/elements/navigation.php
+++ b/views/default/css/elements/navigation.php
@@ -144,6 +144,11 @@
float: right;
}
+.elgg-menu-topbar .elgg-icon {
+ vertical-align: middle;
+ margin-top: -1px;
+}
+
.elgg-menu-topbar > li > a.elgg-topbar-logo {
margin-top: 0;
padding-left: 5px;
@@ -421,20 +426,27 @@ li:hover > .elgg-menu-site-more {
/* ***************************************
ENTITY
*************************************** */
+<?php // height depends on line height/font size ?>
.elgg-menu-entity {
float: right;
margin-left: 15px;
font-size: 90%;
color: #aaa;
+ line-height: 16px;
+ height: 16px;
}
.elgg-menu-entity > li {
- display: inline-block;
margin-left: 15px;
}
-<?php // height depends on line height/font size ?>
.elgg-menu-entity > li > a {
color: #aaa;
- height: 18px;
+}
+<?php // need to override .elgg-menu-hz ?>
+.elgg-menu-entity > li > a {
+ display: block;
+}
+.elgg-menu-entity > li > span {
+ vertical-align: baseline;
}
/* ***************************************
@@ -476,11 +488,24 @@ li:hover > .elgg-menu-site-more {
margin-left: 15px;
font-size: 90%;
color: #aaa;
+ line-height: 16px;
+ height: 16px;
}
.elgg-menu-river > li {
display: inline-block;
margin-left: 5px;
}
+.elgg-menu-river > li > a {
+ color: #aaa;
+ height: 16px;
+}
+<?php // need to override .elgg-menu-hz ?>
+.elgg-menu-river > li > a {
+ display: block;
+}
+.elgg-menu-river > li > span {
+ vertical-align: baseline;
+}
/* ***************************************
SIDEBAR EXTRAS (rss, bookmark, etc)
diff --git a/views/default/css/elgg.php b/views/default/css/elgg.php
index 675af860d..4960e6ade 100644
--- a/views/default/css/elgg.php
+++ b/views/default/css/elgg.php
@@ -26,13 +26,12 @@ if ($old_css_view != elgg_get_config('viewpath')) {
Base CSS
* CSS reset
* core
- * helpers
+ * helpers (moved to end to have a higher priority)
* grid
*******************************************************************************/
echo elgg_view('css/elements/reset', $vars);
echo elgg_view('css/elements/core', $vars);
-echo elgg_view('css/elements/helpers', $vars);
echo elgg_view('css/elements/grid', $vars);
@@ -61,5 +60,9 @@ echo elgg_view('css/elements/layout', $vars);
echo elgg_view('css/elements/misc', $vars);
+// included last to have higher priority
+echo elgg_view('css/elements/helpers', $vars);
+
+
// in case plugins are still extending the old 'css' view, display it
echo elgg_view('css', $vars);
diff --git a/views/default/object/default.php b/views/default/object/default.php
index 27bb1890e..a50f19387 100644
--- a/views/default/object/default.php
+++ b/views/default/object/default.php
@@ -42,6 +42,7 @@ $params = array(
'subtitle' => $subtitle,
'tags' => $vars['entity']->tags,
);
+$params = $params + $vars;
$body = elgg_view('object/elements/summary', $params);
echo elgg_view_image_block($icon, $body);
diff --git a/views/default/object/elements/summary.php b/views/default/object/elements/summary.php
index d3a6ea862..10cf0b148 100644
--- a/views/default/object/elements/summary.php
+++ b/views/default/object/elements/summary.php
@@ -3,15 +3,15 @@
* Object summary
*
* Sample output
- * <ul class="elgg-menu elgg-menu-metadata"><li>Public</li><li>Like this</li></ul>
+ * <ul class="elgg-menu elgg-menu-entity"><li>Public</li><li>Like this</li></ul>
* <h3><a href="">Title</a></h3>
* <p class="elgg-subtext">Posted 3 hours ago by George</p>
* <p class="elgg-tags"><a href="">one</a>, <a href="">two</a></p>
- * <div class="elgg-list-content">Excerpt text</div>
+ * <div class="elgg-content">Excerpt text</div>
*
* @uses $vars['entity'] ElggEntity
* @uses $vars['title'] Title link (optional) false = no title, '' = default
- * @uses $vars['metadata'] HTML for entity metadata and actions (optional)
+ * @uses $vars['metadata'] HTML for entity menu and metadata (optional)
* @uses $vars['subtitle'] HTML for the subtitle (optional)
* @uses $vars['tags'] HTML for the tags (optional)
* @uses $vars['content'] HTML for the entity content (optional)
@@ -49,5 +49,5 @@ echo "<h3>$title_link</h3>";
echo "<div class=\"elgg-subtext\">$subtitle</div>";
echo $tags;
if ($content) {
- echo "<div class=\"elgg-list-content\">$content</div>";
+ echo "<div class=\"elgg-content\">$content</div>";
}
diff --git a/views/default/object/plugin/advanced.php b/views/default/object/plugin/advanced.php
index 51fb69d17..84fc0439b 100644
--- a/views/default/object/plugin/advanced.php
+++ b/views/default/object/plugin/advanced.php
@@ -242,7 +242,7 @@ if (elgg_view_exists($settings_view_old) || elgg_view_exists($settings_view_new)
echo elgg_view('output/url', array(
'href' => "#elgg-plugin-manifest-{$plugin->getID()}",
'text' => elgg_echo("admin:plugins:label:moreinfo"),
- 'class' => 'elgg-toggler',
+ 'rel' => 'toggle',
));
?>
</div>
diff --git a/views/default/object/plugin/invalid.php b/views/default/object/plugin/invalid.php
index 9e239b7ca..f29ee8d12 100644
--- a/views/default/object/plugin/invalid.php
+++ b/views/default/object/plugin/invalid.php
@@ -29,7 +29,7 @@ $error = $plugin->getError();
echo elgg_view('output/url', array(
'href' => "#elgg-plugin-manifest-{$plugin->getID()}",
'text' => elgg_echo("admin:plugins:label:moreinfo"),
- 'class' => 'elgg-toggler',
+ 'rel' => 'toggle',
));
?>
</div>
diff --git a/views/default/object/widget/elements/controls.php b/views/default/object/widget/elements/controls.php
index 83a2f5767..abf2154fc 100644
--- a/views/default/object/widget/elements/controls.php
+++ b/views/default/object/widget/elements/controls.php
@@ -12,7 +12,8 @@ $show_edit = elgg_extract('show_edit', $vars, true);
$params = array(
'text' => ' ',
'href' => "#elgg-widget-content-$widget->guid",
- 'class' => 'elgg-widget-collapse-button elgg-toggler',
+ 'class' => 'elgg-widget-collapse-button',
+ 'rel' => 'toggle',
);
$collapse_link = elgg_view('output/url', $params);
@@ -33,7 +34,8 @@ if ($widget->canEdit()) {
'text' => elgg_view_icon('settings-alt'),
'title' => elgg_echo('widget:edit'),
'href' => "#widget-edit-$widget->guid",
- 'class' => "elgg-toggler elgg-widget-edit-button",
+ 'class' => "elgg-widget-edit-button",
+ 'rel' => 'toggle',
);
$edit_link = elgg_view('output/url', $params);
}
diff --git a/views/default/page/components/gallery.php b/views/default/page/components/gallery.php
index e86b9f885..f03eb1109 100644
--- a/views/default/page/components/gallery.php
+++ b/views/default/page/components/gallery.php
@@ -2,7 +2,17 @@
/**
* Gallery view
*
- * @uses $vars['items']
+ * Implemented as an unorder list
+ *
+ * @uses $vars['items'] Array of ElggEntity or ElggAnnotation objects
+ * @uses $vars['offset'] Index of the first list item in complete list
+ * @uses $vars['limit'] Number of items per page
+ * @uses $vars['count'] Number of items in the complete list
+ * @uses $vars['pagination'] Show pagination? (default: true)
+ * @uses $vars['position'] Position of the pagination: before, after, or both
+ * @uses $vars['full_view'] Show the full view of the items (default: false)
+ * @uses $vars['gallery_class'] Additional CSS class for the <ul> element
+ * @uses $vars['item_class'] Additional CSS class for the <li> elements
*/
$items = $vars['items'];
@@ -19,6 +29,16 @@ $pagination = elgg_extract('pagination', $vars, true);
$offset_key = elgg_extract('offset_key', $vars, 'offset');
$position = elgg_extract('position', $vars, 'after');
+$gallery_class = 'elgg-gallery';
+if (isset($vars['gallery_class'])) {
+ $gallery_class = "$gallery_class {$vars['gallery_class']}";
+}
+
+$item_class = 'elgg-item';
+if (isset($vars['item_class'])) {
+ $item_class = "$item_class {$vars['item_class']}";
+}
+
if ($pagination && $count) {
$nav .= elgg_view('navigation/pagination', array(
'offset' => $offset,
@@ -33,10 +53,15 @@ if ($position == 'before' || $position == 'both') {
}
?>
-<ul class="elgg-gallery">
+<ul class="<?php echo $gallery_class; ?>">
<?php
foreach ($items as $item) {
- echo '<li>';
+ if (elgg_instanceof($item)) {
+ $id = "elgg-{$item->getType()}-{$item->getGUID()}";
+ } else {
+ $id = "item-{$item->getType()}-{$item->id}";
+ }
+ echo "<li id=\"$id\" class=\"$item_class\">";
echo elgg_view_list_item($item, $vars);
echo "</li>";
}
diff --git a/views/default/page/components/list.php b/views/default/page/components/list.php
index ae951c89f..c83fa0966 100644
--- a/views/default/page/components/list.php
+++ b/views/default/page/components/list.php
@@ -27,12 +27,12 @@ $position = elgg_extract('position', $vars, 'after');
$list_class = 'elgg-list';
if (isset($vars['list_class'])) {
- $list_class = "{$vars['list_class']} $list_class";
+ $list_class = "$list_class {$vars['list_class']}";
}
-$item_class = 'elgg-list-item';
+$item_class = 'elgg-item';
if (isset($vars['item_class'])) {
- $item_class = "{$vars['item_class']} $item_class";
+ $item_class = "$item_class {$vars['item_class']}";
}
$html = "";
diff --git a/views/default/page/default.php b/views/default/page/default.php
index 9effce1ec..0e27cda52 100644
--- a/views/default/page/default.php
+++ b/views/default/page/default.php
@@ -17,7 +17,7 @@ if (elgg_get_context() == 'admin') {
elgg_deprecated_notice("admin plugins should route through 'admin'.", 1.8);
elgg_admin_add_plugin_settings_menu();
elgg_unregister_css('elgg');
- echo elgg_view('page/shells/admin', $vars);
+ echo elgg_view('page/admin', $vars);
return true;
}
diff --git a/views/default/page/elements/owner_block.php b/views/default/page/elements/owner_block.php
index c525a38aa..fc7f0f6d2 100644
--- a/views/default/page/elements/owner_block.php
+++ b/views/default/page/elements/owner_block.php
@@ -15,7 +15,7 @@ $owner = elgg_get_page_owner_entity();
if ($owner instanceof ElggGroup ||
($owner instanceof ElggUser && $owner->getGUID() != elgg_get_logged_in_user_guid())) {
- $header = elgg_view_entity($owner, false);
+ $header = elgg_view_entity($owner, array('full_view' => false));
$body = elgg_view_menu('owner_block', array('entity' => $owner));
diff --git a/views/default/page/layouts/one_column.php b/views/default/page/layouts/one_column.php
index c59a574e7..7546a4cdf 100644
--- a/views/default/page/layouts/one_column.php
+++ b/views/default/page/layouts/one_column.php
@@ -13,11 +13,22 @@ $class = 'elgg-layout elgg-layout-one-column clearfix';
if (isset($vars['class'])) {
$class = "$class {$vars['class']}";
}
+
+// navigation defaults to breadcrumbs
+$nav = elgg_extract('nav', $vars, elgg_view('navigation/breadcrumbs'));
+
?>
<div class="<?php echo $class; ?>">
- <div class="elgg-body">
- <?php echo $vars['content']; ?>
+ <div class="elgg-body elgg-main">
<?php
+ echo $nav;
+
+ if (isset($vars['title'])) {
+ echo elgg_view_title($vars['title']);
+ }
+
+ echo $vars['content'];
+
// @deprecated 1.8
echo $vars['area1'];
?>
diff --git a/views/default/page/layouts/widgets/add_button.php b/views/default/page/layouts/widgets/add_button.php
index a8670146b..89e83b096 100644
--- a/views/default/page/layouts/widgets/add_button.php
+++ b/views/default/page/layouts/widgets/add_button.php
@@ -4,7 +4,12 @@
*/
?>
<div class="elgg-widget-add-control">
- <a class="elgg-button elgg-button-action elgg-toggler" href="#widgets-add-panel">
- <?php echo elgg_echo('widgets:add'); ?>
- </a>
+<?php
+ echo elgg_view('output/url', array(
+ 'href' => '#widgets-add-panel',
+ 'text' => elgg_echo('widgets:add'),
+ 'class' => 'elgg-button elgg-button-action',
+ 'rel' => 'toggle',
+ ));
+?>
</div>
diff --git a/views/default/river/annotation/generic_comment/create.php b/views/default/river/annotation/generic_comment/create.php
index aabb6a9c6..d3db68e41 100644
--- a/views/default/river/annotation/generic_comment/create.php
+++ b/views/default/river/annotation/generic_comment/create.php
@@ -5,26 +5,7 @@
$object = $vars['item']->getObjectEntity();
$comment = $vars['item']->getAnnotation();
-$url = $object->getURL();
-$title = $object->title;
-if (!$title) {
- $title = elgg_echo('untitled');
-}
-$params = array(
- 'href' => $object->getURL(),
- 'text' => $title,
-);
-$object_link = elgg_view('output/url', $params);
-
-$type = $object->getType();
-$subtype = $object->getSubtype();
-
-$type_string = elgg_echo("river:commented:$type:$subtype");
-echo elgg_echo('river:generic_comment', array($type_string, $object_link));
-
-if ($comment) {
- $excerpt = elgg_get_excerpt($comment->value);
- echo '<div class="elgg-river-content">';
- echo $excerpt;
- echo '</div>';
-}
+echo elgg_view('river/item', array(
+ 'item' => $vars['item'],
+ 'message' => elgg_get_excerpt($comment->value),
+));
diff --git a/views/default/river/elements/body.php b/views/default/river/elements/body.php
index f9ecbc03c..f7a9d2426 100644
--- a/views/default/river/elements/body.php
+++ b/views/default/river/elements/body.php
@@ -2,32 +2,64 @@
/**
* Body of river item
*
- * @uses $vars['item']
+ * @uses $vars['item'] ElggRiverItem
+ * @uses $vars['summary'] Alternate summary (the short text summary of action)
+ * @uses $vars['message'] Optional message (usually excerpt of text)
+ * @uses $vars['attachments'] Optional attachments (displaying icons or other non-text data)
+ * @uses $vars['responses'] Alternate respones (comments, replies, etc.)
*/
$item = $vars['item'];
-$subject = $item->getSubjectEntity();
+
+$menu = elgg_view_menu('river', array(
+ 'item' => $item,
+ 'sort_by' => 'priority',
+ 'class' => 'elgg-menu-hz',
+));
// river item header
-$params = array(
- 'href' => $subject->getURL(),
- 'text' => $subject->name,
-);
-$subject_link = elgg_view('output/url', $params);
$timestamp = elgg_get_friendly_time($item->getPostedTime());
-$header = elgg_view_menu('river', array('item' => $item, 'sort_by' => 'priority'));
-$header .= "$subject_link <span class=\"elgg-river-timestamp\">$timestamp</span>";
+$summary = elgg_extract('summary', $vars, elgg_view('river/elements/summary', array('item' => $vars['item'])));
+if ($summary === false) {
+ $subject = $item->getSubjectEntity();
+ $summary = elgg_view('output/url', array(
+ 'href' => $subject->getURL(),
+ 'text' => $subject->name,
+ 'class' => 'elgg-river-subject',
+ ));
+}
+
+$message = elgg_extract('message', $vars, false);
+if ($message !== false) {
+ $message = "<div class=\"elgg-river-message\">$message</div>";
+}
+
+$attachments = elgg_extract('attachments', $vars, false);
+if ($attachments !== false) {
+ $attachments = "<div class=\"elgg-river-attachments\">$attachments</div>";
+}
-// body
-$body = elgg_view($item->getView(), array('item' => $item));
+$responses = elgg_view('river/elements/responses', $vars);
+if ($responses) {
+ $responses = "<div class=\"elgg-river-responses\">$responses</div>";
+}
-// footer
-$footer = elgg_view('river/elements/footer', $vars);
+$group_string = '';
+$object = $item->getObjectEntity();
+$container = $object->getContainerEntity();
+if ($container instanceof ElggGroup && $container->guid != elgg_get_page_owner_guid()) {
+ $group_link = elgg_view('output/url', array(
+ 'href' => $container->getURL(),
+ 'text' => $container->name,
+ ));
+ $group_string = elgg_echo('river:ingroup', array($group_link));
+}
-echo elgg_view('page/components/module', array(
- 'header' => $header,
- 'body' => $body,
- 'footer' => $footer,
- 'class' => 'mbn',
-)); \ No newline at end of file
+echo <<<RIVER
+$menu
+<div class="elgg-river-summary">$summary $group_string <span class="elgg-river-timestamp">$timestamp</span></div>
+$message
+$attachments
+$responses
+RIVER;
diff --git a/views/default/river/elements/footer.php b/views/default/river/elements/responses.php
index f1e79f131..8c5be6316 100644
--- a/views/default/river/elements/footer.php
+++ b/views/default/river/elements/responses.php
@@ -1,8 +1,18 @@
<?php
/**
* River item footer
+ *
+ * @uses $vars['item'] ElggRiverItem
+ * @uses $vars['responses'] Alternate override for this item
*/
+// allow river views to override the response content
+$responses = elgg_extract('responses', $vars, false);
+if ($responses) {
+ echo $responses;
+ return true;
+}
+
$item = $vars['item'];
$object = $item->getObjectEntity();
diff --git a/views/default/river/elements/summary.php b/views/default/river/elements/summary.php
new file mode 100644
index 000000000..4d80c29a6
--- /dev/null
+++ b/views/default/river/elements/summary.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Short summary of the action that occurred
+ *
+ * @vars['item'] ElggRiverItem
+ */
+
+$item = $vars['item'];
+
+$subject = $item->getSubjectEntity();
+$object = $item->getObjectEntity();
+$target = $object->getContainerEntity();
+
+$subject_link = elgg_view('output/url', array(
+ 'href' => $subject->getURL(),
+ 'text' => $subject->name,
+ 'class' => 'elgg-river-subject',
+));
+
+$object_link = elgg_view('output/url', array(
+ 'href' => $object->getURL(),
+ 'text' => $object->title ? $object->title : $object->name,
+ 'class' => 'elgg-river-object',
+));
+
+$action = $item->action_type;
+$type = $item->type;
+$subtype = $item->subtype ? $item->subtype : 'default';
+
+$container = $object->getContainerEntity();
+if ($container instanceof ElggGroup) {
+ $params = array(
+ 'href' => $container->getURL(),
+ 'text' => $container->name,
+ );
+ $group_link = elgg_view('output/url', $params);
+ $group_string = elgg_echo('river:ingroup', array($group_link));
+}
+
+
+echo elgg_echo("river:$action:$type:$subtype", array($subject_link, $object_link)); \ No newline at end of file
diff --git a/views/default/river/item.php b/views/default/river/item.php
index bf7c80b03..94622e272 100644
--- a/views/default/river/item.php
+++ b/views/default/river/item.php
@@ -7,10 +7,8 @@
$item = $vars['item'];
-$vars = array(
- 'image' => elgg_view('river/elements/image', array('item' => $item)),
- 'body' => elgg_view('river/elements/body', array('item' => $item)),
+echo elgg_view('page/components/image_block', array(
+ 'image' => elgg_view('river/elements/image', $vars),
+ 'body' => elgg_view('river/elements/body', $vars),
'class' => 'elgg-river-item',
-);
-
-echo elgg_view('page/components/image_block', $vars);
+));
diff --git a/views/default/river/relationship/friend/create.php b/views/default/river/relationship/friend/create.php
index 14dab4451..f3f4a9b14 100644
--- a/views/default/river/relationship/friend/create.php
+++ b/views/default/river/relationship/friend/create.php
@@ -5,18 +5,10 @@
$subject = $vars['item']->getSubjectEntity();
$object = $vars['item']->getObjectEntity();
-$params = array(
- 'href' => $object->getURL(),
- 'text' => $object->name,
-);
-$object_link = elgg_view('output/url', $params);
$subject_icon = elgg_view_entity_icon($subject, 'tiny');
$object_icon = elgg_view_entity_icon($object, 'tiny');
-echo elgg_echo("friends:river:add", array($object_link));
-
-echo '<div class="elgg-river-content clearfix">';
-echo $subject_icon;
-echo elgg_view_icon('arrow-right', true);
-echo $object_icon;
-echo '</div>';
+echo elgg_view('river/item', array(
+ 'item' => $vars['item'],
+ 'attachments' => $subject_icon . elgg_view_icon('arrow-right', true) . $object_icon,
+));
diff --git a/views/default/river/user/default/profileiconupdate.php b/views/default/river/user/default/profileiconupdate.php
index a723c5335..c7f691533 100644
--- a/views/default/river/user/default/profileiconupdate.php
+++ b/views/default/river/user/default/profileiconupdate.php
@@ -2,12 +2,20 @@
/**
* Update avatar river view
*/
+
+
$subject = $vars['item']->getSubjectEntity();
-$subject_icon = elgg_view_entity_icon($subject, 'tiny');
+$subject_link = elgg_view('output/url', array(
+ 'href' => $subject->getURL(),
+ 'text' => $subject->name,
+ 'class' => 'elgg-river-subject',
+));
-echo elgg_echo("profile:river:iconupdate");
+$string = elgg_echo('river:update:user:avatar', array($subject_link));
-echo '<div class="elgg-river-content clearfix">';
-echo $subject_icon;
-echo '</div>';
+echo elgg_view('river/item', array(
+ 'item' => $vars['item'],
+ 'summary' => $string,
+ 'attachments' => elgg_view_entity_icon($subject, 'tiny'),
+));
diff --git a/views/default/widgets/friends/content.php b/views/default/widgets/friends/content.php
index 4c5ef5b4a..bb5bd7a8d 100644
--- a/views/default/widgets/friends/content.php
+++ b/views/default/widgets/friends/content.php
@@ -13,12 +13,12 @@ $num = (int) $vars['entity']->num_display;
// get the correct size
$size = $vars['entity']->icon_size;
-$html = $owner->listFriends('', $num, array(
- 'size' => $size,
- 'gallery' => true,
-));
-if ($html) {
- echo $html;
-} else {
-
+if (elgg_instanceof($owner, 'user')) {
+ $html = $owner->listFriends('', $num, array(
+ 'size' => $size,
+ 'list_type' => 'gallery',
+ ));
+ if ($html) {
+ echo $html;
+ }
}