aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-25 22:18:16 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-25 22:18:16 +0000
commita201a5bba863a6d0dfa3b68d73a227cfcc7f66b6 (patch)
treeaf382c4f81d43b63c4afe60ace1824c298390d47 /mod/groups/views/default
parent58bd19d7cf35e6159124716d0da48d91354d3a2f (diff)
downloadelgg-a201a5bba863a6d0dfa3b68d73a227cfcc7f66b6.tar.gz
elgg-a201a5bba863a6d0dfa3b68d73a227cfcc7f66b6.tar.bz2
updated owner blocks for users and groups
git-svn-id: http://code.elgg.org/elgg/trunk@7721 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views/default')
-rw-r--r--mod/groups/views/default/group/default.php60
1 files changed, 58 insertions, 2 deletions
diff --git a/mod/groups/views/default/group/default.php b/mod/groups/views/default/group/default.php
index 25e07602b..3ba482d63 100644
--- a/mod/groups/views/default/group/default.php
+++ b/mod/groups/views/default/group/default.php
@@ -5,9 +5,65 @@
* @package ElggGroups
*/
+$group = $vars['entity'];
+
+$icon = elgg_view("groups/icon", array(
+ 'entity' => $group,
+ 'size' => '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 = '17 ' . elgg_echo('groups:member');
+
+$metadata = "<ul class=\"elgg-list-metadata\"><li>$mem</li>";
+$metadata .= "<li>$num_members</li>";
+//. " / <b>" . get_group_members($vars['entity']->guid, 10, 0, 0, true) ."</b> " . elgg_echo("groups:member");
+
+// feature link
+if (isadminloggedin()) {
+ 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>";
+
+if (elgg_in_context('owner_block') || elgg_in_context('widgets')) {
+ $metadata = '';
+}
+
+
if ($vars['full']) {
echo elgg_view("groups/groupprofile",$vars);
} else {
- echo elgg_view("groups/grouplisting",$vars);
+ // brief view
+
+ $params = array(
+ 'entity' => $group,
+ 'metadata' => $metadata,
+ 'subtitle' => $group->briefdescription,
+ );
+ $list_body = elgg_view('layout/objects/list/body', $params);
+
+ echo elgg_view_image_block($icon, $list_body);
}
-?> \ No newline at end of file