diff options
author | Sem <sembrestels@riseup.net> | 2012-07-08 19:31:39 +0200 |
---|---|---|
committer | Steve Clay <steve@mrclay.org> | 2012-11-19 08:01:01 -0500 |
commit | 8183d5bbc2c18b6825da8ebfc15581231e23de04 (patch) | |
tree | 103ba017a78bad5df11e9d88b29291677be4746c /mod/groups/views/default/forms | |
parent | d857c68fd91b1bcf586a30d86108b1898c2bb2d3 (diff) | |
download | elgg-8183d5bbc2c18b6825da8ebfc15581231e23de04.tar.gz elgg-8183d5bbc2c18b6825da8ebfc15581231e23de04.tar.bz2 |
Fixes #1854. Group owners can delegate the ownership to another group member.
Diffstat (limited to 'mod/groups/views/default/forms')
-rw-r--r-- | mod/groups/views/default/forms/groups/edit.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/mod/groups/views/default/forms/groups/edit.php b/mod/groups/views/default/forms/groups/edit.php index 532e89c35..52900d2d9 100644 --- a/mod/groups/views/default/forms/groups/edit.php +++ b/mod/groups/views/default/forms/groups/edit.php @@ -83,6 +83,37 @@ if (elgg_get_plugin_setting('hidden_groups', 'groups') == 'yes') { <?php } +if (isset($vars['entity'])) { + $entity = $vars['entity']; + $owner_guid = $vars['entity']->owner_guid; +} else { + $entity = false; +} + +if ($entity && ($owner_guid == elgg_get_logged_in_user_guid() || elgg_is_admin_logged_in())) { + $owner_guid = $vars['entity']->owner_guid; + $members = array(); + foreach ($vars['entity']->getMembers(0) as $member) { + $members[$member->guid] = "$member->name (@$member->username)"; + } +?> + +<div> + <label> + <?php echo elgg_echo('groups:owner'); ?><br /> + <?php echo elgg_view('input/dropdown', array( + 'name' => 'owner_guid', + 'value' => $owner_guid, + 'options_values' => $members, + 'class' => 'groups-owner-input', + )); + ?> + </label> +</div> + +<?php +} + $tools = elgg_get_config('group_tool_options'); if ($tools) { usort($tools, create_function('$a,$b', 'return strcmp($a->label,$b->label);')); |