<commit_before>{* $Id$ *}
{title help="Structures"}{tr}Structures{/tr}{/title}

{if $tiki_p_admin eq 'y'}
	<div class="t_navbar">
		{button href='tiki-import_xml_zip.php' _text="{tr}XML Zip Import{/tr}"}
	</div>
{/if}

{if $just_created neq 'n' && $tiki_p_edit_structures == 'y'}
	{remarksbox type="feedback" title="{tr}Feedback{/tr}"}
		{tr}Structure created{/tr}: <a class='alert-link' href='tiki-edit_structure.php?page_ref_id={$just_created}'>{$just_created_name|escape}</a> <a class='alert-link tips' href='tiki-index.php?page={$just_created_name|escape:"url"}' title=":{tr}View Page{/tr}">{icon name="view"}</a>
	{/remarksbox}
{/if}

{if $askremove eq 'y'}
	{remarksbox type='confirm' title="{tr}Please Confirm{/tr}"}
		{tr}You will remove structure:{/tr} {$removename|escape}<br>
		{button href="?rremove=$remove&amp;page=$removename" _text="{tr}Destroy the structure leaving the wiki pages{/tr}"}
		{if $tiki_p_remove == 'y'}
			{button href="?rremovex=$remove&amp;page=$removename" _text="{tr}Destroy the structure and remove the pages{/tr}"}
		{/if}
	{/remarksbox}
{/if}

{if count($alert_in_st) > 0}
	{remarksbox type='warning' title="{tr}Warning{/tr}"}
		{tr}Note that the following pages are also part of another structure. Make sure that access permissions (if any) do not conflict:{/tr}
		{foreach from=$alert_in_st item=thest}
			&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$thest|escape:"url"}' target="_blank">{$thest}</a>
		{/foreach}
	{/remarksbox}
{/if}

{if count($alert_categorized) > 0}
	{remarksbox type='feedback' title="{tr}Feedback{/tr}"}
		{tr}The following pages have automatically been categorized with the same categories as the structure:{/tr}
		{foreach from=$alert_categorized item=thecat}
			&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$thecat|escape:"url"}' target="_blank">{$thecat}</a>
		{/foreach}
	{/remarksbox}
{/if}

{if count($alert_to_remove_cats) > 0}
	{remarksbox type='warning' title="{tr}Warning{/tr}"}
		{tr}The following pages have categories but the structure has none. You may wish to uncategorize them to be consistent:{/tr}
		{foreach from=$alert_to_remove_cats item=thecat}
			&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$thecat|escape:"url"}' target="_blank">{$thecat}</a>
		{/foreach}
	{/remarksbox}
{/if}

{if count($alert_to_remove_extra_cats) > 0}
	{remarksbox type='warning' title="{tr}Warning{/tr}"}
		{tr}The following pages are in categories that the structure is not in. You may wish to recategorize them in order to be consistent:{/tr}
		{foreach from=$alert_to_remove_extra_cats item=theextracat}
			&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$theextracat|escape:"url"}' target="_blank">{$theextracat}</a>
		{/foreach}
	{/remarksbox}
{/if}

{if !empty($error)}
	{remarksbox type='warning' title="{tr}Error{/tr}"}
		{$error|escape}
	{/remarksbox}
{/if}

{tabset}
	{tab name="{tr}Structures{/tr}"}
		<h2>{tr}Structures{/tr}</h2>
		{if $channels or ($find ne '')}
			{include file='find.tpl' find_show_languages='y' find_show_categories='y' find_show_num_rows='y'}
		{/if}
		<br>
		<form class="form" role="form">
			<div class="table-responsive">
				<table class="table normal">
					<tr>
						{if $tiki_p_admin eq 'y'}<th width="15">{select_all checkbox_names='action[]'}</th>{/if}
						<th>{tr}Structure{/tr}</th>
						<th>{tr}Action{/tr}</th>
					</tr>

					{section loop=$channels name=ix}
						<tr>
							{if $tiki_p_admin eq 'y'}
								<td class="checkbox-cell">
									<input type="checkbox" name="action[]" value='{$channels[ix].page_ref_id}' style="border:1px;font-size:80%;">
								</td>
							{/if}
							<td class="text">
								<a class="tips" href="tiki-edit_structure.php?page_ref_id={$channels[ix].page_ref_id}" title=":{tr}View Structure{/tr}">
									{$channels[ix].pageName}
									{if $channels[ix].page_alias}
										({$channels[ix].page_alias})
									{/if}
								</a>
							</td>
							<td class="action">
								<a class="tips" href="tiki-edit_structure.php?page_ref_id={$channels[ix].page_ref_id}" title=":{tr}View structure{/tr}">{icon name="information"}</a>
								<a class='tips' href='{sefurl page=$channels[ix].pageName structure=$channels[ix].pageName page_ref_id=$channels[ix].page_ref_id}' title=":{tr}View page{/tr}">{icon name="view"}</a>

								{if $prefs.feature_wiki_export eq 'y' and $tiki_p_admin_wiki eq 'y'}
									<a title=":{tr}Export Pages{/tr}" class="tips" href="tiki-admin_structures.php?export={$channels[ix].page_ref_id|escape:"url"}">{icon name="export"}</a>
								{/if}

								{if $pdf_export eq 'y'}<a href="tiki-print_multi_pages.php?printstructures=a%3A1%3A%7Bi%3A0%3Bs%3A1%3A%22{$channels[ix].page_ref_id}%22%3B%7D&amp;display=pdf" title="{tr}PDF{/tr}">{icon _id='page_white_acrobat' alt="{tr}PDF{/tr}"}</a>
								{/if}

								{if $tiki_p_edit_structures == 'y'}<a title=":{tr}Dump Tree{/tr}" class="tips" href="tiki-admin_structures.php?export_tree={$channels[ix].page_ref_id|escape:"url"}">{icon name="structure"}</a>{/if}

								{if $tiki_p_edit_structures == 'y' and $channels[ix].editable == 'y'}<a title=":{tr}Delete{/tr}" class="tips" href="tiki-admin_structures.php?remove={$channels[ix].page_ref_id|escape:"url"}">{icon name="delete"}</a>{/if}

								{if $prefs.feature_create_webhelp == 'y' && $tiki_p_edit_structures == 'y'}<a title=":{tr}Create WebHelp{/tr}" class="tips" href="tiki-create_webhelp.php?struct={$channels[ix].page_ref_id|escape:"url"}">{icon name="help"}</a>{/if}

								{if $prefs.feature_create_webhelp == 'y' && $channels[ix].webhelp eq 'y'}
									<a title=":{tr}View WebHelp{/tr}" class="tips" href="whelp/{$channels[ix].pageName}/index.html">{icon name="documentation"}</a>
								{/if}

								{if $tiki_p_admin eq 'y'}
									<a title=":{tr}XML Zip{/tr}" class="tips" href="tiki-admin_structures.php?zip={$channels[ix].page_ref_id|escape:"url"}">{icon name="zip"}</a>
								{/if}
							</td>
						</tr>
					{sectionelse}
						{if $tiki_p_admin eq 'y'}{norecords _colspan=3}{else}{norecords _colspan=2}{/if}
					{/section}
				</table>
			</div>

			{if $tiki_p_admin eq 'y'}
				<div class="form-group">
					<label for="batchaction" class="control-label">{tr}Perform action with selected{/tr}</label>
					<div class="input-group col-sm-6">
						<select name="batchaction" class="form-control">
							<option value="">{tr}...{/tr}</option>
							<option value="delete">{tr}Delete{/tr}</option>
							<option value="delete_with_page">{tr}Delete with the pages{/tr}</option>
						</select>
						<div class="input-group-btn">
							<input type="submit" class="btn btn-primary" name="act" value="{tr}Ok{/tr}">
						</div>
					</div>
				</div>
			</form>
		{/if}

		{pagination_links cant=$cant step=$maxRecords offset=$offset}{/pagination_links}
	{/tab}

	{if $tiki_p_edit_structures == 'y'}<commit_msg>[REF] admin structures: put list action items under wrench popover<commit_after>{* $Id$ *}
{title help="Structures"}{tr}Structures{/tr}{/title}

{if $tiki_p_admin eq 'y'}
	<div class="t_navbar">
		{button href='tiki-import_xml_zip.php' _text="{tr}XML Zip Import{/tr}"}
	</div>
{/if}

{if $just_created neq 'n' && $tiki_p_edit_structures == 'y'}
	{remarksbox type="feedback" title="{tr}Feedback{/tr}"}
		{tr}Structure created{/tr}: <a class='alert-link' href='tiki-edit_structure.php?page_ref_id={$just_created}'>{$just_created_name|escape}</a> <a class='alert-link tips' href='tiki-index.php?page={$just_created_name|escape:"url"}' title=":{tr}View Page{/tr}">{icon name="view"}</a>
	{/remarksbox}
{/if}

{if $askremove eq 'y'}
	{remarksbox type='confirm' title="{tr}Please Confirm{/tr}"}
		{tr}You will remove structure:{/tr} {$removename|escape}<br>
		{button href="?rremove=$remove&amp;page=$removename" _text="{tr}Destroy the structure leaving the wiki pages{/tr}"}
		{if $tiki_p_remove == 'y'}
			{button href="?rremovex=$remove&amp;page=$removename" _text="{tr}Destroy the structure and remove the pages{/tr}"}
		{/if}
	{/remarksbox}
{/if}

{if count($alert_in_st) > 0}
	{remarksbox type='warning' title="{tr}Warning{/tr}"}
		{tr}Note that the following pages are also part of another structure. Make sure that access permissions (if any) do not conflict:{/tr}
		{foreach from=$alert_in_st item=thest}
			&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$thest|escape:"url"}' target="_blank">{$thest}</a>
		{/foreach}
	{/remarksbox}
{/if}

{if count($alert_categorized) > 0}
	{remarksbox type='feedback' title="{tr}Feedback{/tr}"}
		{tr}The following pages have automatically been categorized with the same categories as the structure:{/tr}
		{foreach from=$alert_categorized item=thecat}
			&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$thecat|escape:"url"}' target="_blank">{$thecat}</a>
		{/foreach}
	{/remarksbox}
{/if}

{if count($alert_to_remove_cats) > 0}
	{remarksbox type='warning' title="{tr}Warning{/tr}"}
		{tr}The following pages have categories but the structure has none. You may wish to uncategorize them to be consistent:{/tr}
		{foreach from=$alert_to_remove_cats item=thecat}
			&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$thecat|escape:"url"}' target="_blank">{$thecat}</a>
		{/foreach}
	{/remarksbox}
{/if}

{if count($alert_to_remove_extra_cats) > 0}
	{remarksbox type='warning' title="{tr}Warning{/tr}"}
		{tr}The following pages are in categories that the structure is not in. You may wish to recategorize them in order to be consistent:{/tr}
		{foreach from=$alert_to_remove_extra_cats item=theextracat}
			&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$theextracat|escape:"url"}' target="_blank">{$theextracat}</a>
		{/foreach}
	{/remarksbox}
{/if}

{if !empty($error)}
	{remarksbox type='warning' title="{tr}Error{/tr}"}
		{$error|escape}
	{/remarksbox}
{/if}

{tabset}
	{tab name="{tr}Structures{/tr}"}
		<h2>{tr}Structures{/tr}</h2>
		{if $channels or ($find ne '')}
			{include file='find.tpl' find_show_languages='y' find_show_categories='y' find_show_num_rows='y'}
		{/if}
		<br>
		<form class="form" role="form">
			<div class="table-responsive">
				<table class="table normal">
					<tr>
						{if $tiki_p_admin eq 'y'}<th width="15">{select_all checkbox_names='action[]'}</th>{/if}
						<th>{tr}Structure{/tr}</th>
						<th></th>
					</tr>

					{section loop=$channels name=ix}
						<tr>
							{if $tiki_p_admin eq 'y'}
								<td class="checkbox-cell">
									<input type="checkbox" name="action[]" value='{$channels[ix].page_ref_id}' style="border:1px;font-size:80%;">
								</td>
							{/if}
							<td class="text">
								<a class="tips" href="tiki-edit_structure.php?page_ref_id={$channels[ix].page_ref_id}" title=":{tr}View Structure{/tr}">
									{$channels[ix].pageName}
									{if $channels[ix].page_alias}
										({$channels[ix].page_alias})
									{/if}
								</a>
							</td>
							<td class="action">
								{capture name=admin_structure_actions}
									{strip}
										<a href="tiki-edit_structure.php?page_ref_id={$channels[ix].page_ref_id}">
											{icon name="information" _menu_text='y' _menu_icon='y' alt="{tr}View structure{/tr}"}
										</a>
										<a href='{sefurl page=$channels[ix].pageName structure=$channels[ix].pageName page_ref_id=$channels[ix].page_ref_id}'>
											{icon name="view" _menu_text='y' _menu_icon='y' alt="{tr}View page{/tr}"}
										</a>

										{if $prefs.feature_wiki_export eq 'y' and $tiki_p_admin_wiki eq 'y'}
											<a href="tiki-admin_structures.php?export={$channels[ix].page_ref_id|escape:"url"}">
												{icon name="export" _menu_text='y' _menu_icon='y' alt="{tr}Export pages{/tr}"}
											</a>
										{/if}

										{if $pdf_export eq 'y'}
											<a href="tiki-print_multi_pages.php?printstructures=a%3A1%3A%7Bi%3A0%3Bs%3A1%3A%22{$channels[ix].page_ref_id}%22%3B%7D&amp;display=pdf">
												{icon name='pdf' _menu_text='y' _menu_icon='y' alt="{tr}PDF{/tr}"}
											</a>
										{/if}

										{if $tiki_p_edit_structures == 'y'}
											<a href="tiki-admin_structures.php?export_tree={$channels[ix].page_ref_id|escape:"url"}">
												{icon name="structure" _menu_text='y' _menu_icon='y' alt="{tr}Dump tree{/tr}"}
											</a>
										{/if}

										{if $tiki_p_edit_structures == 'y' and $channels[ix].editable == 'y'}
											<a href="tiki-admin_structures.php?remove={$channels[ix].page_ref_id|escape:"url"}">
												{icon name="remove" _menu_text='y' _menu_icon='y' alt="{tr}Remove{/tr}"}
											</a>
										{/if}

										{if $prefs.feature_create_webhelp == 'y' && $tiki_p_edit_structures == 'y'}
											<a href="tiki-create_webhelp.php?struct={$channels[ix].page_ref_id|escape:"url"}">
												{icon name="help" _menu_text='y' _menu_icon='y' alt="{tr}Create WebHelp{/tr}"}
											</a>
										{/if}

										{if $prefs.feature_create_webhelp == 'y' && $channels[ix].webhelp eq 'y'}
											<a href="whelp/{$channels[ix].pageName}/index.html">
												{icon name="documentation" _menu_text='y' _menu_icon='y' alt="{tr}View WebHelp{/tr}"}
											</a>
										{/if}

										{if $tiki_p_admin eq 'y'}
											<a href="tiki-admin_structures.php?zip={$channels[ix].page_ref_id|escape:"url"}">
												{icon name="zip" _menu_text='y' _menu_icon='y' alt="{tr}XML Zip{/tr}"}
											</a>
										{/if}
									{/strip}
								{/capture}
								<a class="tips"
								   title="{tr}Actions{/tr}"
								   href="#" {popup trigger="click" fullhtml="1" center=true text=$smarty.capture.admin_structure_actions|escape:"javascript"|escape:"html"}
								   style="padding:0; margin:0; border:0"
										>
									{icon name='wrench'}
								</a>
							</td>
						</tr>
					{sectionelse}
						{if $tiki_p_admin eq 'y'}{norecords _colspan=3}{else}{norecords _colspan=2}{/if}
					{/section}
				</table>
			</div>

			{if $tiki_p_admin eq 'y'}
				<div class="form-group">
					<label for="batchaction" class="control-label">{tr}Perform action with selected{/tr}</label>
					<div class="input-group col-sm-6">
						<select name="batchaction" class="form-control">
							<option value="">{tr}...{/tr}</option>
							<option value="delete">{tr}Delete{/tr}</option>
							<option value="delete_with_page">{tr}Delete with the pages{/tr}</option>
						</select>
						<div class="input-group-btn">
							<input type="submit" class="btn btn-primary" name="act" value="{tr}Ok{/tr}">
						</div>
					</div>
				</div>
			</form>
		{/if}

		{pagination_links cant=$cant step=$maxRecords offset=$offset}{/pagination_links}
	{/tab}

	{if $tiki_p_edit_structures == 'y'}
{'fraction_non_alphanumeric': 0.19960501225824026, 'fraction_numerical': 0.004358485426314356, 'mean_word_length': 4.225978647686833, 'pattern_counts': {'":': 12, '<': 161, '<?xml version=': 0, '>': 169, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6797514', 'n_tokens_mistral': 6684, 'n_tokens_neox': 5475, 'n_words': 952}