';
if (!empty($context['board']))
echo '
', $txt['permissions_boards'], ': ', $context['board']['name'], ' |
';
echo '
', $txt['membergroups_name'], ' |
', $txt['membergroups_members_top'], ' |
', $txt['membergroups_permissions'], empty($modSettings['permission_enable_deny']) ? '' : '
' . $txt['permissions_allowed'] . ' ' . $txt['permissions_denied'], '
| ';
if (!empty($context['board']))
echo '
', $txt['permissions_access'], ' | ';
echo '
', $txt['permissions_modify'], ' |
|
';
foreach ($context['groups'] as $group)
{
echo '
', $group['name'], $group['id'] == -1 ? ' (?)' : ($group['id'] == 0 ? ' (?)' : ($group['id'] == 1 ? ' (?)' : ($group['id'] == 3 ? ' (?)' : ''))), ' |
', $group['can_search'] ? $group['link'] : $group['num_members'], ' |
';
if (empty($modSettings['permission_enable_deny']))
echo '
', $group['num_permissions']['allowed'];
else
echo '
', $group['num_permissions']['allowed'], ' ', empty($group['num_permissions']['denied']) || $group['id'] == 1 ? $group['num_permissions']['denied'] : ($group['id'] == -1 ? '' . $group['num_permissions']['denied'] . '' : '' . $group['num_permissions']['denied'] . '');
echo '
| ';
if (!empty($context['board']))
{
echo '
';
// Don't show the checkbox for admins and moderators, doesn't make sense!
if ($group['id'] != 1 && $group['id'] != 3)
echo '
';
echo '
| ';
}
echo '
', $group['allow_modify'] ? '' . $txt['permissions_modify'] . '' : '', ' |
', $group['allow_modify'] ? '' : '', ' |
';
}
echo '
', $txt['permissions_with_selection'], '...
', $txt['permissions_apply_pre_defined'], ' (?):
';
if (!empty($context['board']) && !empty($context['copy_boards']))
{
echo '
', $txt['permissions_copy_from_board'], ':
';
}
echo '
', $txt['permissions_like_group'], ':
|
|
|
';
if (!empty($context['board']))
echo '
', $txt[20], ' |
', $txt['permissions_switch'], ' |
';
foreach ($context['boards'] as $board)
{
echo '
', str_repeat('-', $board['child_level']), ' ' . $board['name'] . '', empty($modSettings['permission_enable_by_board']) ? '' : ' (' . ($board['use_local_permissions'] ? $txt['permissions_local'] : $txt['permissions_global']) . ')', '
| ';
if (empty($modSettings['permission_enable_by_board']))
echo '
', $txt['permission_mode_normal'], ' |
', $txt['permission_mode_no_polls'], ' |
', $txt['permission_mode_reply_only'], ' |
', $txt['permission_mode_read_only'], ' | ';
else
echo '
', $txt['permissions_global'], ' |
', $txt['permissions_local'], ' | ';
echo '
';
}
echo '
';
}
function template_modify_group()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '