aboutsummaryrefslogtreecommitdiff
path: root/views/default/river
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/river')
-rw-r--r--views/default/river/annotation/generic_comment/create.php2
-rw-r--r--views/default/river/elements/body.php2
-rw-r--r--views/default/river/elements/layout.php14
-rw-r--r--views/default/river/elements/responses.php1
-rw-r--r--views/default/river/elements/summary.php3
-rw-r--r--views/default/river/item.php28
-rw-r--r--views/default/river/relationship/friend/create.php2
-rw-r--r--views/default/river/user/default/profileiconupdate.php9
-rw-r--r--views/default/river/user/default/profileupdate.php20
9 files changed, 70 insertions, 11 deletions
diff --git a/views/default/river/annotation/generic_comment/create.php b/views/default/river/annotation/generic_comment/create.php
index d3db68e41..7d586450d 100644
--- a/views/default/river/annotation/generic_comment/create.php
+++ b/views/default/river/annotation/generic_comment/create.php
@@ -5,7 +5,7 @@
$object = $vars['item']->getObjectEntity();
$comment = $vars['item']->getAnnotation();
-echo elgg_view('river/item', array(
+echo elgg_view('river/elements/layout', 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 c5a525733..6894b81e2 100644
--- a/views/default/river/elements/body.php
+++ b/views/default/river/elements/body.php
@@ -27,6 +27,7 @@ if ($summary === false) {
'href' => $subject->getURL(),
'text' => $subject->name,
'class' => 'elgg-river-subject',
+ 'is_trusted' => true,
));
}
@@ -52,6 +53,7 @@ if ($container instanceof ElggGroup && $container->guid != elgg_get_page_owner_g
$group_link = elgg_view('output/url', array(
'href' => $container->getURL(),
'text' => $container->name,
+ 'is_trusted' => true,
));
$group_string = elgg_echo('river:ingroup', array($group_link));
}
diff --git a/views/default/river/elements/layout.php b/views/default/river/elements/layout.php
new file mode 100644
index 000000000..94622e272
--- /dev/null
+++ b/views/default/river/elements/layout.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Layout of a river item
+ *
+ * @uses $vars['item'] ElggRiverItem
+ */
+
+$item = $vars['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',
+));
diff --git a/views/default/river/elements/responses.php b/views/default/river/elements/responses.php
index 8c5be6316..f6c32e142 100644
--- a/views/default/river/elements/responses.php
+++ b/views/default/river/elements/responses.php
@@ -50,6 +50,7 @@ if ($comments) {
$params = array(
'href' => $url,
'text' => elgg_echo('river:comments:more', array($num_more_comments)),
+ 'is_trusted' => true,
);
$link = elgg_view('output/url', $params);
echo "<div class=\"elgg-river-more\">$link</div>";
diff --git a/views/default/river/elements/summary.php b/views/default/river/elements/summary.php
index 4d80c29a6..84941131f 100644
--- a/views/default/river/elements/summary.php
+++ b/views/default/river/elements/summary.php
@@ -15,12 +15,14 @@ $subject_link = elgg_view('output/url', array(
'href' => $subject->getURL(),
'text' => $subject->name,
'class' => 'elgg-river-subject',
+ 'is_trusted' => true,
));
$object_link = elgg_view('output/url', array(
'href' => $object->getURL(),
'text' => $object->title ? $object->title : $object->name,
'class' => 'elgg-river-object',
+ 'is_trusted' => true,
));
$action = $item->action_type;
@@ -32,6 +34,7 @@ if ($container instanceof ElggGroup) {
$params = array(
'href' => $container->getURL(),
'text' => $container->name,
+ 'is_trusted' => true,
);
$group_link = elgg_view('output/url', $params);
$group_string = elgg_echo('river:ingroup', array($group_link));
diff --git a/views/default/river/item.php b/views/default/river/item.php
index 94622e272..75767e08d 100644
--- a/views/default/river/item.php
+++ b/views/default/river/item.php
@@ -1,14 +1,30 @@
<?php
/**
- * Layout of a river item
+ * Primary river item view
+ *
+ * Calls the individual view saved for that river item. Most of these
+ * individual river views then use the views in river/elements.
*
* @uses $vars['item'] ElggRiverItem
*/
+// @todo remove this in Elgg 1.9
+global $_elgg_special_river_catch;
+if (!isset($_elgg_special_river_catch)) {
+ $_elgg_special_river_catch = false;
+}
+if ($_elgg_special_river_catch) {
+ // we changed the views a little in 1.8.1 so this catches the plugins that
+ // were updated in 1.8.0 and redirects to the layout view
+ echo elgg_view('river/elements/layout', $vars);
+ return true;
+}
+$_elgg_special_river_catch = true;
+
+
$item = $vars['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($item->getView(), $vars);
+
+
+$_elgg_special_river_catch = false;
diff --git a/views/default/river/relationship/friend/create.php b/views/default/river/relationship/friend/create.php
index a191e7b1e..0408d79e1 100644
--- a/views/default/river/relationship/friend/create.php
+++ b/views/default/river/relationship/friend/create.php
@@ -8,7 +8,7 @@ $object = $vars['item']->getObjectEntity();
$subject_icon = elgg_view_entity_icon($subject, 'tiny');
$object_icon = elgg_view_entity_icon($object, 'tiny');
-echo elgg_view('river/item', array(
+echo elgg_view('river/elements/layout', array(
'item' => $vars['item'],
'attachments' => $subject_icon . elgg_view_icon('arrow-right') . $object_icon,
));
diff --git a/views/default/river/user/default/profileiconupdate.php b/views/default/river/user/default/profileiconupdate.php
index c7f691533..271064a06 100644
--- a/views/default/river/user/default/profileiconupdate.php
+++ b/views/default/river/user/default/profileiconupdate.php
@@ -3,19 +3,22 @@
* Update avatar river view
*/
-
$subject = $vars['item']->getSubjectEntity();
$subject_link = elgg_view('output/url', array(
'href' => $subject->getURL(),
'text' => $subject->name,
'class' => 'elgg-river-subject',
+ 'is_trusted' => true,
));
$string = elgg_echo('river:update:user:avatar', array($subject_link));
-echo elgg_view('river/item', array(
+echo elgg_view('river/elements/layout', array(
'item' => $vars['item'],
'summary' => $string,
- 'attachments' => elgg_view_entity_icon($subject, 'tiny'),
+ 'attachments' => elgg_view_entity_icon($subject, 'tiny', array(
+ 'use_hover' => false,
+ 'use_link' => false,
+ )),
));
diff --git a/views/default/river/user/default/profileupdate.php b/views/default/river/user/default/profileupdate.php
new file mode 100644
index 000000000..ce72970d6
--- /dev/null
+++ b/views/default/river/user/default/profileupdate.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Update profile river view
+ */
+
+$subject = $vars['item']->getSubjectEntity();
+
+$subject_link = elgg_view('output/url', array(
+ 'href' => $subject->getURL(),
+ 'text' => $subject->name,
+ 'class' => 'elgg-river-subject',
+ 'is_trusted' => true,
+));
+
+$string = elgg_echo('river:update:user:profile', array($subject_link));
+
+echo elgg_view('river/elements/layout', array(
+ 'item' => $vars['item'],
+ 'summary' => $string,
+));