aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/views')
-rw-r--r--mod/groups/views/default/river/annotation/group_topic_post/reply.php25
-rw-r--r--mod/groups/views/default/river/group/create.php20
-rw-r--r--mod/groups/views/default/river/object/groupforumtopic/create.php32
-rw-r--r--mod/groups/views/default/river/relationship/member/create.php14
4 files changed, 17 insertions, 74 deletions
diff --git a/mod/groups/views/default/river/annotation/group_topic_post/reply.php b/mod/groups/views/default/river/annotation/group_topic_post/reply.php
index 1999c8dd9..cc94fbd43 100644
--- a/mod/groups/views/default/river/annotation/group_topic_post/reply.php
+++ b/mod/groups/views/default/river/annotation/group_topic_post/reply.php
@@ -4,24 +4,9 @@
*/
$object = $vars['item']->getObjectEntity();
$reply = $vars['item']->getAnnotation();
+$excerpt = elgg_get_excerpt($reply->value);
-$url = $object->getURL();
-$title = $object->title;
-$params = array(
- 'href' => $object->getURL(),
- 'text' => $title,
-);
-$object_link = elgg_view('output/url', $params);
-
-$type = $object->getType();
-$subtype = $object->getSubtype();
-
-echo elgg_echo('groups:river:reply') . ' ';
-echo $object_link;
-
-if ($reply) {
- $excerpt = elgg_get_excerpt($reply->value);
- echo '<div class="elgg-river-content">';
- echo $excerpt;
- echo '</div>';
-}
+echo elgg_view('river/item', array(
+ 'item' => $vars['item'],
+ 'message' => $excerpt,
+)); \ No newline at end of file
diff --git a/mod/groups/views/default/river/group/create.php b/mod/groups/views/default/river/group/create.php
index a70f8b51d..cacb5ad3f 100644
--- a/mod/groups/views/default/river/group/create.php
+++ b/mod/groups/views/default/river/group/create.php
@@ -7,19 +7,7 @@ $object = $vars['item']->getObjectEntity();
$excerpt = strip_tags($object->description);
$excerpt = elgg_get_excerpt($excerpt);
-$params = array(
- 'href' => $object->getURL(),
- 'text' => $object->name,
-);
-$link = elgg_view('output/url', $params);
-
-
-echo elgg_echo('groups:river:create');
-
-echo " $link";
-
-if ($excerpt) {
- echo '<div class="elgg-river-content">';
- echo $excerpt;
- echo '</div>';
-}
+echo elgg_view('river/item', array(
+ 'item' => $vars['item'],
+ 'message' => $excerpt,
+)); \ No newline at end of file
diff --git a/mod/groups/views/default/river/object/groupforumtopic/create.php b/mod/groups/views/default/river/object/groupforumtopic/create.php
index 466196921..cca44e523 100644
--- a/mod/groups/views/default/river/object/groupforumtopic/create.php
+++ b/mod/groups/views/default/river/object/groupforumtopic/create.php
@@ -7,34 +7,12 @@ $object = $vars['item']->getObjectEntity();
$excerpt = strip_tags($object->description);
$excerpt = elgg_get_excerpt($excerpt);
-$params = array(
- 'href' => $object->getURL(),
- 'text' => $object->title,
-);
-$link = elgg_view('output/url', $params);
+echo elgg_view('river/item', array(
+ 'item' => $vars['item'],
+ 'message' => $excerpt,
+));
-$group_string = '';
-$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('forumtopic:river:create');
-
-echo " $link $group_string";
-
-if ($excerpt) {
- echo '<div class="elgg-river-content">';
- echo $excerpt;
- echo '</div>';
-}
-
-if (elgg_is_logged_in() && $container->canWriteToContainer()) {
+if (elgg_is_logged_in() && $object->canAnnotate(0, 'group_topic_post')) {
// inline comment form
$form_vars = array('id' => "groups-reply-{$object->getGUID()}", 'class' => 'hidden');
$body_vars = array('entity' => $object, 'inline' => true);
diff --git a/mod/groups/views/default/river/relationship/member/create.php b/mod/groups/views/default/river/relationship/member/create.php
index 060826649..d1c4c3ed3 100644
--- a/mod/groups/views/default/river/relationship/member/create.php
+++ b/mod/groups/views/default/river/relationship/member/create.php
@@ -3,14 +3,6 @@
* Group join river view.
*/
-$object = $vars['item']->getObjectEntity();
-
-$params = array(
- 'href' => $object->getURL(),
- 'text' => $object->name,
-);
-$link = elgg_view('output/url', $params);
-
-echo elgg_echo('groups:river:join');
-
-echo " $link";
+echo elgg_view('river/item', array(
+ 'item' => $vars['item'],
+));