Commit 8d950b40 authored by Francois Marier's avatar Francois Marier Committed by Richard Mansfield
Browse files

group/members: Add a note about visiting user profile pages to invite/add users to the group


Signed-off-by: default avatarFrancois Marier <francois@catalyst.net.nz>
parent 2f14fc60
......@@ -70,11 +70,22 @@ $offset = param_integer('offset', 0);
$limit = param_integer('limit', 10);
list($html, $pagination, $count, $offset, $membershiptype) = group_get_membersearch_data($group->id, $query, $offset, $limit, $membershiptype);
// Type-specific instructions
$instructions = '';
if ('admin' == $role) {
if ('invite' == $group->jointype) {
$instructions = get_string('instructions:invite', 'group');
} elseif ('controlled' == $group->jointype) {
$instructions = get_string('instructions:controlled', 'group');
}
}
$smarty = smarty(array('groupmembersearch'));
$smarty->assign('heading', $group->name);
$smarty->assign('query', $query);
$smarty->assign('results', $html);
$smarty->assign('pagination', $pagination['html']);
$smarty->assign('instructions', $instructions);
$smarty->assign('membershiptype', $membershiptype);
$smarty->display('group/members.tpl');
......
......@@ -280,4 +280,7 @@ $string['userremoved'] = 'User removed';
$string['About'] = 'About';
$string['Joined'] = 'Joined';
$string['instructions:invite'] = 'This is an invite-only group. Invite users through their profile pages.';
$string['instructions:controlled'] = 'This is a controlled membership group. Add users through their profile pages.';
?>
......@@ -9,6 +9,9 @@
<button id="query-button" type="submit">{str tag="go"}</button>
{if $membershiptype}<input type="hidden" name="membershiptype" value="{$membershiptype|escape}" />{/if}
</div>
<div>
{$instructions}
</div>
</form>
{if $membershiptype}<h3>{str tag=pendingmembers section=group}</h3>{/if}
<div id="results">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment