Skip to content

Commit

Permalink
added: group status (open/closed) in owner_block and group stats
Browse files Browse the repository at this point in the history
  • Loading branch information
jeabakker committed Nov 11, 2011
1 parent 40d1b97 commit e8a8177
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Version History
x.x:
- added: activity filter in group river widget
- added: group listing filter: open and closed
- added: group status (open/closed) in owner_block and group stats
- changed: group search listing
1.7 (2011-10-17):
Expand Down
5 changes: 5 additions & 0 deletions start.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ function group_tools_init(){

// show group edit as tabbed
elgg_extend_view("forms/groups/edit", "group_tools/group_edit_tabbed", 1);

// show group status in owner block
elgg_extend_view("owner_block/extend", "group_tools/owner_block");
// show group status in stats (on group profile)
elgg_extend_view("groups/groupprofile", "group_tools/group_stats");
}

if(isadminloggedin()){
Expand Down
4 changes: 4 additions & 0 deletions views/default/group_tools/css.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,8 @@

#group_tools_mail_member_selection {
display: none;
}

#group_tools_group_status {
font-weight: normal;
}
17 changes: 17 additions & 0 deletions views/default/group_tools/group_stats.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

if(($group = page_owner_entity()) && ($group instanceof ElggGroup)){
if($group->membership == ACCESS_PUBLIC){
$status = elgg_echo("groups:open");
} else {
$status = elgg_echo("groups:closed");
}

$status = ucfirst($status);

?>
<script type="text/javascript">
$('#group_stats').append("<p><?php echo $status;?></p>");
</script>
<?php
}
17 changes: 17 additions & 0 deletions views/default/group_tools/owner_block.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

if(($group = page_owner_entity()) && ($group instanceof ElggGroup)){
if($group->membership == ACCESS_PUBLIC){
$status = elgg_echo("groups:open");
} else {
$status = elgg_echo("groups:closed");
}

$status = ucfirst($status);

?>
<script type="text/javascript">
$('#owner_block_content').append("<div id='group_tools_group_status'><?php echo $status;?></div>");
</script>
<?php
}

0 comments on commit e8a8177

Please sign in to comment.