diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-17 18:33:00 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-17 18:33:00 +0000 |
commit | 57d865b09630ba9ea9cdf9a16067c01c818564dc (patch) | |
tree | b505b1d60319e3dbc3c179a021c9ac92cb361c60 /mod/groups/views/default/river/object | |
parent | d09ee2588c8a4ebf279a03368776d073ba9576da (diff) | |
download | elgg-57d865b09630ba9ea9cdf9a16067c01c818564dc.tar.gz elgg-57d865b09630ba9ea9cdf9a16067c01c818564dc.tar.bz2 |
updated group member and group forum topics to new river
git-svn-id: http://code.elgg.org/elgg/trunk@7661 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views/default/river/object')
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 |