aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/views/default
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-06-24 18:12:47 -0700
committerCash Costello <cash.costello@gmail.com>2011-06-24 18:12:47 -0700
commit8565bdf9a471e541af576201a756b9da58e1c81b (patch)
treedbca4467b0b3dd21ce746b196b392ec99da3f61c /mod/blog/views/default
parentf0c01363ac796a5b11490c6570db9827360f3118 (diff)
parent0594a363ae77c5427eb96a8753e644897fdc5491 (diff)
downloadelgg-8565bdf9a471e541af576201a756b9da58e1c81b.tar.gz
elgg-8565bdf9a471e541af576201a756b9da58e1c81b.tar.bz2
Merge pull request #49 from cash/dry_group_modules
Fixes #3139 DRYs up group modules
Diffstat (limited to 'mod/blog/views/default')
-rw-r--r--mod/blog/views/default/blog/group_module.php22
1 files changed, 10 insertions, 12 deletions
diff --git a/mod/blog/views/default/blog/group_module.php b/mod/blog/views/default/blog/group_module.php
index 6cfe6c98e..d769fbd59 100644
--- a/mod/blog/views/default/blog/group_module.php
+++ b/mod/blog/views/default/blog/group_module.php
@@ -14,10 +14,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('blog:group') . '</h3>';
-
-
elgg_push_context('widgets');
$options = array(
'type' => 'object',
@@ -34,12 +30,14 @@ if (!$content) {
$content = '<p>' . elgg_echo('blog:none') . '</p>';
}
-if ($group->canWriteToContainer()) {
- $new_link = elgg_view('output/url', array(
- 'href' => "blog/add/$group->guid",
- 'text' => elgg_echo('blog:write'),
- ));
- $content .= "<span class='elgg-widget-more'>$new_link</span>";
-}
+$new_link = elgg_view('output/url', array(
+ 'href' => "blog/add/$group->guid",
+ 'text' => elgg_echo('blog:write'),
+));
-echo elgg_view_module('info', '', $content, array('header' => $header));
+echo elgg_view('groups/profile/module', array(
+ 'title' => elgg_echo('blog:group'),
+ 'content' => $content,
+ 'all_link' => $all_link,
+ 'add_link' => $new_link,
+));