From 152a6ae4f00f6e0407d9a7ba04ae0000a818c554 Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 17 Dec 2010 12:23:35 +0000 Subject: supporting putting content in groups in for river views and added file river code git-svn-id: http://code.elgg.org/elgg/trunk@7658 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../views/default/river/object/file/create.php | 42 +++++++++++++++------- 1 file changed, 30 insertions(+), 12 deletions(-) (limited to 'mod/file/views/default/river/object') diff --git a/mod/file/views/default/river/object/file/create.php b/mod/file/views/default/river/object/file/create.php index b9b5c4299..620d1d18c 100644 --- a/mod/file/views/default/river/object/file/create.php +++ b/mod/file/views/default/river/object/file/create.php @@ -1,17 +1,35 @@ subject_guid); - $object = get_entity($vars['item']->object_guid); - $url = $object->getURL(); - $container = get_entity($object->container_guid); +$object = $vars['item']->getObjectEntity(); +$excerpt = strip_tags($object->description); +$excerpt = elgg_get_excerpt($excerpt); - $url = "getURL()}\">{$performed_by->name}"; - $string = elgg_echo("file:river:created", array($url)) . " " . elgg_echo("file:river:item"); - $string .= " getURL() . "\">" . $object->title . ""; - if ($container && $container instanceof ElggGroup) { - $string .= ' ' . elgg_echo('groups:river:togroup') . " getURL() ."\">". $container->name . ""; - } +$params = array( + 'href' => $object->getURL(), + 'text' => $object->title, +); +$link = elgg_view('output/url', $params); - echo $string; +$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)); +} -?> \ No newline at end of file +echo elgg_echo('file:river:create'); + +echo " $link $group_string"; + +if ($excerpt) { + echo '
'; + echo $excerpt; + echo '
'; +} -- cgit v1.2.3