aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default/river/object
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/views/default/river/object')
-rw-r--r--mod/groups/views/default/river/object/groupforumtopic/annotate.php14
-rw-r--r--mod/groups/views/default/river/object/groupforumtopic/create.php39
-rw-r--r--mod/groups/views/default/river/object/groupforumtopic/update.php13
3 files changed, 30 insertions, 36 deletions
diff --git a/mod/groups/views/default/river/object/groupforumtopic/annotate.php b/mod/groups/views/default/river/object/groupforumtopic/annotate.php
deleted file mode 100644
index 5456b8302..000000000
--- a/mod/groups/views/default/river/object/groupforumtopic/annotate.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-
- $statement = $vars['statement'];
- $performed_by = $statement->getSubject();
- $object = $statement->getObject();
-
- $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
- $string = elgg_echo("groupforum:river:posted", array($url)) . " ";
- $string .= elgg_echo("groupforum:river:annotate:create") . " | <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";
- //$string .= "<div class=\"river_content\">Title: " . $object->title . "</div>";
-
-?>
-
-<?php echo $string; ?> \ 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 d9bebc003..1ca871b58 100644
--- a/mod/groups/views/default/river/object/groupforumtopic/create.php
+++ b/mod/groups/views/default/river/object/groupforumtopic/create.php
@@ -1,14 +1,35 @@
<?php
+/**
+ * Group forum topic create river view.
+ */
- $statement = $vars['statement'];
- $performed_by = $statement->getSubject();
- $object = $statement->getObject();
+$object = $vars['item']->getObjectEntity();
+$excerpt = strip_tags($object->description);
+$excerpt = elgg_get_excerpt($excerpt);
- $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
- $string = elgg_echo("groupforum:river:created", array($url)) . " ";
- $string .= elgg_echo("groupforum:river:create") . " | <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";
- //$string .= "<div class=\"river_content\">Discussion topic: " . $object->title . "</div>";
+$params = array(
+ 'href' => $object->getURL(),
+ 'text' => $object->title,
+);
+$link = elgg_view('output/url', $params);
-?>
+$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));
+}
-<?php echo $string; ?> \ No newline at end of file
+echo elgg_echo('forumtopic:river:create');
+
+echo " $link $group_string";
+
+if ($excerpt) {
+ echo '<div class="elgg-river-content">';
+ echo $excerpt;
+ echo '</div>';
+}
diff --git a/mod/groups/views/default/river/object/groupforumtopic/update.php b/mod/groups/views/default/river/object/groupforumtopic/update.php
deleted file mode 100644
index ba9b91d2c..000000000
--- a/mod/groups/views/default/river/object/groupforumtopic/update.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
- $statement = $vars['statement'];
- $performed_by = $statement->getSubject();
- $object = $statement->getObject();
-
- $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
- $string = elgg_echo("groupforum:river:updated", array($url)) . " ";
- $string .= elgg_echo("groupforum:river:update") . " | <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";
-
-?>
-
-<?php echo $string; ?> \ No newline at end of file