diff options
author | cash <cash.costello@gmail.com> | 2011-06-24 21:03:45 -0400 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-06-24 21:10:05 -0400 |
commit | 0594a363ae77c5427eb96a8753e644897fdc5491 (patch) | |
tree | dbca4467b0b3dd21ce746b196b392ec99da3f61c /mod/bookmarks/views/default | |
parent | f0c01363ac796a5b11490c6570db9827360f3118 (diff) | |
download | elgg-0594a363ae77c5427eb96a8753e644897fdc5491.tar.gz elgg-0594a363ae77c5427eb96a8753e644897fdc5491.tar.bz2 |
Fixes #3139 DRYs up group modules
Diffstat (limited to 'mod/bookmarks/views/default')
-rw-r--r-- | mod/bookmarks/views/default/bookmarks/group_module.php | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/mod/bookmarks/views/default/bookmarks/group_module.php b/mod/bookmarks/views/default/bookmarks/group_module.php index 3166fc0f0..3797de010 100644 --- a/mod/bookmarks/views/default/bookmarks/group_module.php +++ b/mod/bookmarks/views/default/bookmarks/group_module.php @@ -16,9 +16,6 @@ $all_link = elgg_view('output/url', array( 'text' => elgg_echo('link:view:all'), )); -$header = "<span class=\"groups-widget-viewall\">$all_link</span>"; -$header .= '<h3>' . elgg_echo('bookmarks:group') . '</h3>'; - elgg_push_context('widgets'); $options = array( 'type' => 'object', @@ -35,12 +32,14 @@ if (!$content) { $content = '<p>' . elgg_echo('bookmarks:none') . '</p>'; } -if ($group->canWriteToContainer()) { - $new_link = elgg_view('output/url', array( - 'href' => "bookmarks/add/$group->guid", - 'text' => elgg_echo('bookmarks:add'), - )); - $content .= "<span class='elgg-widget-more'>$new_link</span>"; -} +$new_link = elgg_view('output/url', array( + 'href' => "bookmarks/add/$group->guid", + 'text' => elgg_echo('bookmarks:add'), +)); -echo elgg_view_module('info', '', $content, array('header' => $header)); +echo elgg_view('groups/profile/module', array( + 'title' => elgg_echo('bookmarks:group'), + 'content' => $content, + 'all_link' => $all_link, + 'add_link' => $new_link, +)); |