diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-17 12:23:35 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-17 12:23:35 +0000 |
commit | 152a6ae4f00f6e0407d9a7ba04ae0000a818c554 (patch) | |
tree | 313404e4f91a1328d8ebcbc9d9b8e41ecb968d53 /mod/file | |
parent | 31867d1a44f87c775014c9f9c0b8fd546d7c4ba9 (diff) | |
download | elgg-152a6ae4f00f6e0407d9a7ba04ae0000a818c554.tar.gz elgg-152a6ae4f00f6e0407d9a7ba04ae0000a818c554.tar.bz2 |
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
Diffstat (limited to 'mod/file')
-rw-r--r-- | mod/file/languages/en.php | 4 | ||||
-rw-r--r-- | mod/file/views/default/river/object/file/create.php | 42 |
2 files changed, 31 insertions, 15 deletions
diff --git a/mod/file/languages/en.php b/mod/file/languages/en.php index dd317b5c7..1372ae4ce 100644 --- a/mod/file/languages/en.php +++ b/mod/file/languages/en.php @@ -69,9 +69,7 @@ 'file:display:number' => "Number of files to display", - 'file:river:created' => "%s uploaded", - 'file:river:item' => "a file", - 'river:commented:object:file' => 'the file', + 'file:river:create' => 'uploaded the file', 'item:object:file' => 'Files', 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 @@ <?php +/** + * File river view. + */ - $performed_by = get_entity($vars['item']->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 = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; - $string = elgg_echo("file:river:created", array($url)) . " " . elgg_echo("file:river:item"); - $string .= " <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>"; - if ($container && $container instanceof ElggGroup) { - $string .= ' ' . elgg_echo('groups:river:togroup') . " <a href=\"" . $container->getURL() ."\">". $container->name . "</a>"; - } +$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 '<div class="elgg-river-content">'; + echo $excerpt; + echo '</div>'; +} |