diff options
Diffstat (limited to 'mod/bookmarks/views/default')
-rw-r--r-- | mod/bookmarks/views/default/river/object/bookmarks/create.php | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/mod/bookmarks/views/default/river/object/bookmarks/create.php b/mod/bookmarks/views/default/river/object/bookmarks/create.php index f30097dd9..bd07db089 100644 --- a/mod/bookmarks/views/default/river/object/bookmarks/create.php +++ b/mod/bookmarks/views/default/river/object/bookmarks/create.php @@ -13,35 +13,23 @@ $params = array( ); $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)); +} + echo elgg_echo('bookmarks:river:create'); -echo " $link"; +echo " $link $group_string"; if ($excerpt) { echo '<div class="elgg-river-content">'; echo $excerpt; echo '</div>'; } - -return true; -/** - * Elgg bookmark river entry view - */ - -$performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject(); -$object = get_entity($vars['item']->object_guid); -$is_group = get_entity($object->container_guid); -$url = $object->getURL(); -$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; -$string = elgg_echo("bookmarks:river:created", array($url)) . " "; -$string .= "<a href=\"" . $object->address . "\">" . $object->title . "</a>"; -if (($is_group instanceof ElggGroup) && (elgg_get_context() != 'groups')){ - $string .= " " . elgg_echo('bookmarks:ingroup') . " <a href=\"{$is_group->getURL()}\">" . $is_group->name . "</a>"; -} -$string .= " <span class='entity-subtext'>" . elgg_view_friendly_time($object->time_created); -if (isloggedin()){ - $string .= "<a class='river_comment_form_button link'>Comment</a>"; - $string .= elgg_view('forms/likes/link', array('entity' => $object)); -} -$string .= "</span>"; -echo $string;
\ No newline at end of file |