aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-04-24 12:51:26 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-04-24 12:51:26 +0000
commita489cdae5b58ac27858e03921441a4f6e150a6d6 (patch)
tree8eb1d365169250aaf80c694553f288c55cd2f3a3 /mod/groups/views
parentf64a66a816e3bedfb37b29ac3946e83f8c0aa087 (diff)
downloadelgg-a489cdae5b58ac27858e03921441a4f6e150a6d6.tar.gz
elgg-a489cdae5b58ac27858e03921441a4f6e150a6d6.tar.bz2
Closes #969: Admin option to allow the setting of certain access controls on a group
git-svn-id: https://code.elgg.org/elgg/trunk@3234 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views')
-rw-r--r--mod/groups/views/default/forms/groups/edit.php35
1 files changed, 34 insertions, 1 deletions
diff --git a/mod/groups/views/default/forms/groups/edit.php b/mod/groups/views/default/forms/groups/edit.php
index 82dd3d71f..87d79aaf4 100644
--- a/mod/groups/views/default/forms/groups/edit.php
+++ b/mod/groups/views/default/forms/groups/edit.php
@@ -52,7 +52,40 @@
<?php echo elgg_view('input/access', array('internalname' => 'membership','value' => $vars['entity']->membership, 'options' => array( ACCESS_PRIVATE => elgg_echo('groups:access:private'), ACCESS_PUBLIC => elgg_echo('groups:access:public')))); ?>
</label>
</p>
-
+
+ <?php
+
+ if (get_plugin_setting('hidden_groups', 'groups') == 'yes')
+ {
+?>
+
+ <p>
+ <label>
+ <?php echo elgg_echo('groups:visibility'); ?><br />
+ <?php
+
+ $this_owner = $vars['entity']->owner_guid;
+ if (!$this_owner) $this_owner = get_loggedin_userid();
+
+ $access = array(ACCESS_FRIENDS => elgg_echo("access:friends:label"), 1 => elgg_echo("LOGGED_IN"), 2 => elgg_echo("PUBLIC"));
+ $collections = get_user_access_collections($this_owner);
+ if (is_array($collections))
+ {
+ foreach ($collections as $c)
+ $access[$c->id] = $c->name;
+ }
+
+ echo elgg_view('input/access', array('internalname' => 'vis', 'value' => ($vars['entity']->access_id ? $vars['entity']->access_id : ACCESS_PUBLIC), 'options' => $access));
+
+
+ ?>
+ </label>
+ </p>
+
+<?php
+ }
+
+ ?>
<?php
if (isset($vars['config']->group_tool_options)) {