<commit_before>{* $Id$ *}

{title help="Groups+Management" admpage="login"}{tr}Admin groups{/tr}{/title}

<div class="t_navbar margin-bottom-md">
	{button href="tiki-adminusers.php" class="btn btn-default" _icon_name="user" _text="{tr}Admin Users{/tr}"}
	{button href="tiki-admingroups.php?clean=y" class="btn btn-default" _icon_name="trash" _text="{tr}Clear cache{/tr}"}
	{if $groupname}
		{if $prefs.feature_tabs ne 'y'}
			{button href="tiki-admingroups.php?add=1&amp;cookietab=2#tab2" class="btn btn-default" _icon_name="create" _text="{tr}Add New Group{/tr}"}
		{else}
			{button href="tiki-admingroups.php?add=1&amp;cookietab=2" class="btn btn-default" _icon_name="create" _text="{tr}Add New Group{/tr}"}
		{/if}
	{/if}
	<button class="btn btn-default">
		{permission_link mode=text}
	</button>
	{if $prefs.feature_invite eq 'y' and $tiki_p_invite eq 'y'}
		{button href="tiki-list_invite.php" class="btn btn-default" _icon_name="thumbs-up" _text="{tr}Invitation List{/tr}"}
	{/if}
</div>

{tabset name='tabs_admingroups'}

	{tab name="{tr}List{/tr}"}
		{* ----------------------- tab with list --------------------------------------- *}
		<h2>{tr}List of existing groups{/tr}</h2>

		{include file='find.tpl' find_show_num_rows='y'}

		{if $cant_pages > $maxRecords or !empty($initial) or !empty($find)}
			{initials_filter_links}
		{/if}

		<form name="checkform" method="post">
			<div class="table-responsive">
				<table class="table normal">
					<tr>
						<th style="width: 20px;">{select_all checkbox_names='checked[]'}</th>
						<th>{self_link _sort_arg='sort_mode' _sort_field='id'}{tr}ID{/tr}{/self_link}</th>
						<th>{self_link _sort_arg='sort_mode' _sort_field='groupName'}{tr}Name{/tr}{/self_link}</th>
						<th>{tr}Inherits Permissions from{/tr}</th>

						{if $prefs.useGroupHome eq 'y'}
							<th>{self_link _sort_arg='sort_mode' _sort_field='groupHome'}{tr}Homepage{/tr}{/self_link}</th>
						{/if}

						<th>{self_link _sort_arg='sort_mode' _sort_field='userChoice'}{tr}User Choice{/tr}{/self_link}</th>
						<th>{tr}Actions{/tr}</th>
					</tr>

					{section name=user loop=$users}
						<tr>
							<td class="checkbox-cell">
								{if $users[user].groupName ne 'Admins' and $users[user].groupName ne 'Anonymous' and $users[user].groupName ne 'Registered'}
									<input type="checkbox" name="checked[]" value="{$users[user].groupName|escape}">
								{/if}
							</td>
							<td class="id">{$users[user].id|escape}</td>
							<td class="text">
								<a class="link" href="tiki-admingroups.php?group={$users[user].groupName|escape:"url"}&amp;cookietab=2{if $prefs.feature_tabs ne 'y'}#tab2{/if}" title="{tr}Edit{/tr}">{$users[user].groupName|escape}</a>
								<div class="text">{tr}{$users[user].groupDesc|escape|nl2br}{/tr}</div>
							</td>
							<td class="text">
								{foreach $users[user].included as $incl}
									<div>
										{if in_array($incl, $users[user].included_direct)}
											{$incl|escape}
										{else}
											<i>{$incl|escape}</i>
										{/if}
									</div>
								{/foreach}
							</td>

							{if $prefs.useGroupHome eq 'y'}
								<td class="text">
									<a class="link" href="tiki-index.php?page={$users[user].groupHome|escape:"url"}" title="{tr}Group Homepage{/tr}">{tr}{$users[user].groupHome}{/tr}</a>
								</td>
							{/if}

							<td class="text">{tr}{$users[user].userChoice}{/tr}</td>
							<td class="action">
								<a class="link tips" href="tiki-admingroups.php?group={$users[user].groupName|escape:"url"}&amp;cookietab=2{if $prefs.feature_tabs ne 'y'}#tab2{/if}" title="{$users[user].groupName|escape}:{tr}Edit{/tr}">{icon name="edit"} <span class="sr-only">{tr}Edit{/tr}</span></a>
								{permission_link mode=glyph addclass="tips" group=$users[user].groupName count=$users[user].permcant label="{$users[user].groupName|escape}:{tr}Permissions{/tr}"}
								{if $users[user].groupName ne 'Anonymous' and $users[user].groupName ne 'Registered' and $users[user].groupName ne 'Admins'}
									<a class="link text-danger tips" href="tiki-admingroups.php?offset={$offset}&amp;sort_mode={$sort_mode}&amp;action=delete&amp;group={$users[user].groupName|escape:"url"}" title="{$users[user].groupName|escape}:{tr}Delete{/tr}">{icon name="remove"} <span class="sr-only">{tr}Remove{/tr}"}</span></a>
								{/if}
							</td>
						</tr>
					{/section}
				</table>
			</div>
			<div class="form-group" >
				<div class="input-group col-sm-6">
					<label for="submit_mult" class="control-label sr-only">{tr}Select action to perform with checked{/tr}</label>
						<select name="submit_mult" class="form-control">
							<option value="" selected="selected">{tr}Select action to perform with checked{/tr}...</option>
							<option value="remove_groups" >{tr}Remove{/tr}</option>
						</select>
					<div class="input-group-btn">
						<input type="submit" class="btn btn-primary" value="{tr}OK{/tr}">
					</div>
				</div>
			</div>
		</form>
		{pagination_links cant=$cant_pages step=$prefs.maxRecords offset=$offset}{/pagination_links}
	{/tab}

	{if $groupname}
		{capture assign=tabaddeditgroup_admgrp}{tr}Edit group{/tr} <i>{$groupname|escape}</i>{/capture}
	{else}
		{assign var=tabaddeditgroup_admgrp value="{tr}Add a New Group{/tr}"}
	{/if}

	{tab name=$tabaddeditgroup_admgrp}
		{* ----------------------- tab with form --------------------------------------- *}
<commit_msg>[REF] place item actions under wrench popover<commit_after>{* $Id$ *}

{title help="Groups+Management" admpage="login"}{tr}Admin groups{/tr}{/title}

<div class="t_navbar margin-bottom-md">
	{button href="tiki-adminusers.php" class="btn btn-default" _icon_name="user" _text="{tr}Admin Users{/tr}"}
	{button href="tiki-admingroups.php?clean=y" class="btn btn-default" _icon_name="trash" _text="{tr}Clear cache{/tr}"}
	{if $groupname}
		{if $prefs.feature_tabs ne 'y'}
			{button href="tiki-admingroups.php?add=1&amp;cookietab=2#tab2" class="btn btn-default" _icon_name="create" _text="{tr}Add New Group{/tr}"}
		{else}
			{button href="tiki-admingroups.php?add=1&amp;cookietab=2" class="btn btn-default" _icon_name="create" _text="{tr}Add New Group{/tr}"}
		{/if}
	{/if}
	<button class="btn btn-default">
		{permission_link mode=text}
	</button>
	{if $prefs.feature_invite eq 'y' and $tiki_p_invite eq 'y'}
		{button href="tiki-list_invite.php" class="btn btn-default" _icon_name="thumbs-up" _text="{tr}Invitation List{/tr}"}
	{/if}
</div>

{tabset name='tabs_admingroups'}

	{tab name="{tr}List{/tr}"}
		{* ----------------------- tab with list --------------------------------------- *}
		<h2>{tr}List of existing groups{/tr}</h2>

		{include file='find.tpl' find_show_num_rows='y'}

		{if $cant_pages > $maxRecords or !empty($initial) or !empty($find)}
			{initials_filter_links}
		{/if}

		<form name="checkform" method="post">
			<div class="table-responsive">
				<table class="table normal">
					<tr>
						<th style="width: 20px;">{select_all checkbox_names='checked[]'}</th>
						<th>{self_link _sort_arg='sort_mode' _sort_field='id'}{tr}ID{/tr}{/self_link}</th>
						<th>{self_link _sort_arg='sort_mode' _sort_field='groupName'}{tr}Name{/tr}{/self_link}</th>
						<th>{tr}Inherits Permissions from{/tr}</th>

						{if $prefs.useGroupHome eq 'y'}
							<th>{self_link _sort_arg='sort_mode' _sort_field='groupHome'}{tr}Homepage{/tr}{/self_link}</th>
						{/if}

						<th>{self_link _sort_arg='sort_mode' _sort_field='userChoice'}{tr}User Choice{/tr}{/self_link}</th>
						<th></th>
					</tr>

					{section name=user loop=$users}
						<tr>
							<td class="checkbox-cell">
								{if $users[user].groupName ne 'Admins' and $users[user].groupName ne 'Anonymous' and $users[user].groupName ne 'Registered'}
									<input type="checkbox" name="checked[]" value="{$users[user].groupName|escape}">
								{/if}
							</td>
							<td class="id">{$users[user].id|escape}</td>
							<td class="text">
								<a class="link" href="tiki-admingroups.php?group={$users[user].groupName|escape:"url"}&amp;cookietab=2{if $prefs.feature_tabs ne 'y'}#tab2{/if}" title="{tr}Edit{/tr}">{$users[user].groupName|escape}</a>
								<div class="text">{tr}{$users[user].groupDesc|escape|nl2br}{/tr}</div>
							</td>
							<td class="text">
								{foreach $users[user].included as $incl}
									<div>
										{if in_array($incl, $users[user].included_direct)}
											{$incl|escape}
										{else}
											<i>{$incl|escape}</i>
										{/if}
									</div>
								{/foreach}
							</td>

							{if $prefs.useGroupHome eq 'y'}
								<td class="text">
									<a class="link" href="tiki-index.php?page={$users[user].groupHome|escape:"url"}" title="{tr}Group Homepage{/tr}">{tr}{$users[user].groupHome}{/tr}</a>
								</td>
							{/if}

							<td class="text">{tr}{$users[user].userChoice}{/tr}</td>
							<td class="action">
								{capture name=group_actions}
									{strip}
										<a href="tiki-admingroups.php?group={$users[user].groupName|escape:"url"}&amp;cookietab=2{if $prefs.feature_tabs ne 'y'}#tab2{/if}">
											{icon name="edit" _menu_text='y' _menu_icon='y' alt="{tr}Edit{/tr}"}
										</a>
										{permission_link mode=text group=$users[user].groupName count=$users[user].permcant}
										{if $users[user].groupName ne 'Anonymous' and $users[user].groupName ne 'Registered' and $users[user].groupName ne 'Admins'}
											<a href="tiki-admingroups.php?offset={$offset}&amp;sort_mode={$sort_mode}&amp;action=delete&amp;group={$users[user].groupName|escape:"url"}">
												{icon name="remove" _menu_text='y' _menu_icon='y' alt="{tr}Remove{/tr}"}
											</a>
										{/if}
									{/strip}
								{/capture}
								<a class="tips"
								   title="{tr}Actions{/tr}"
								   href="#" {popup trigger="click" fullhtml="1" center=true text=$smarty.capture.group_actions|escape:"javascript"|escape:"html"}
								   style="padding:0; margin:0; border:0"
										>
									{icon name='wrench'}
								</a>
							</td>
						</tr>
					{/section}
				</table>
			</div>
			<div class="form-group" >
				<div class="input-group col-sm-6">
					<label for="submit_mult" class="control-label sr-only">{tr}Select action to perform with checked{/tr}</label>
						<select name="submit_mult" class="form-control">
							<option value="" selected="selected">{tr}Select action to perform with checked{/tr}...</option>
							<option value="remove_groups" >{tr}Remove{/tr}</option>
						</select>
					<div class="input-group-btn">
						<input type="submit" class="btn btn-primary" value="{tr}OK{/tr}">
					</div>
				</div>
			</div>
		</form>
		{pagination_links cant=$cant_pages step=$prefs.maxRecords offset=$offset}{/pagination_links}
	{/tab}

	{if $groupname}
		{capture assign=tabaddeditgroup_admgrp}{tr}Edit group{/tr} <i>{$groupname|escape}</i>{/capture}
	{else}
		{assign var=tabaddeditgroup_admgrp value="{tr}Add a New Group{/tr}"}
	{/if}

	{tab name=$tabaddeditgroup_admgrp}
		{* ----------------------- tab with form --------------------------------------- *}

{'fraction_non_alphanumeric': 0.22121732838925567, 'fraction_numerical': 0.003074975128877634, 'mean_word_length': 3.5788819875776396, 'pattern_counts': {'":': 0, '<': 161, '<?xml version=': 0, '>': 163, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7196776', 'n_tokens_mistral': 4960, 'n_tokens_neox': 4007, 'n_words': 643}