aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default/group/default.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-07 12:15:38 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-07 12:15:38 +0000
commit142aef30294caab47a184393103aa6644131ba19 (patch)
tree495f2308c99f76f2e33bdac26ceff4f0c9ff5496 /mod/groups/views/default/group/default.php
parent5991e7a915191a0d7655b51794dfdc1ac05ce5d7 (diff)
downloadelgg-142aef30294caab47a184393103aa6644131ba19.tar.gz
elgg-142aef30294caab47a184393103aa6644131ba19.tar.bz2
Refs #2895 entity menu uses new menu system
git-svn-id: http://code.elgg.org/elgg/trunk@8622 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views/default/group/default.php')
-rw-r--r--mod/groups/views/default/group/default.php41
1 files changed, 6 insertions, 35 deletions
diff --git a/mod/groups/views/default/group/default.php b/mod/groups/views/default/group/default.php
index 77b17402b..14bdc7aa3 100644
--- a/mod/groups/views/default/group/default.php
+++ b/mod/groups/views/default/group/default.php
@@ -9,41 +9,12 @@ $group = $vars['entity'];
$icon = elgg_view_entity_icon($group, 'tiny');
-//get the membership type
-$membership = $group->membership;
-if ($membership == ACCESS_PUBLIC) {
- $mem = elgg_echo("groups:open");
-} else {
- $mem = elgg_echo("groups:closed");
-}
-
-// number of members
-$num_members = get_group_members($group->guid, 10, 0, 0, true);
-$members_string = elgg_echo('groups:member');
-
-$metadata = "<ul class=\"elgg-menu elgg-menu-metadata\"><li>$mem</li>";
-$metadata .= "<li>$num_members $members_string</li>";
-
-// feature link
-if (elgg_is_admin_logged_in()) {
- if ($group->featured_group == "yes") {
- $url = "action/groups/featured?group_guid={$group->guid}&action_type=unfeature";
- $wording = elgg_echo("groups:makeunfeatured");
- } else {
- $url = "action/groups/featured?group_guid={$group->guid}&action_type=feature";
- $wording = elgg_echo("groups:makefeatured");
- }
- $feature_link = elgg_view('output/url', array(
- 'href' => $url,
- 'text' => $wording,
- 'is_action' => true,
- ));
- $metadata .= "<li>$feature_link</li>";
-}
-
-$metadata .= elgg_view("entity/metadata", array('entity' => $group));
-
-$metadata .= "</ul>";
+$metadata = elgg_view_menu('entity', array(
+ 'entity' => $group,
+ 'handler' => 'groups',
+ 'sort_by' => 'priority',
+ 'class' => 'elgg-menu-hz',
+));
if (elgg_in_context('owner_block') || elgg_in_context('widgets')) {
$metadata = '';