Location: PHPKode > projects > Aratix > admin/templates/pages_overview.tpl
<div class="heading">Seiten&uuml;bersicht</div>
<div class="content">
{if $overview_array.0.parent ne "-1"}
<p class="backlink"><a href="index.php?{$session_string}module=pages&action=overview&parent={$parent}">Eine Ebene höher</a></p>
{/if}
<form name="pages" action="">
	<table class="pages">
		<tr class="pages_header">
			<td class="pages_small">&nbsp;</td>
			<td class="pages_text">Men&uuml;text</td>
			<td class="pages_dropdown">Elternseite</td>
			<td class="pages_dropdown">Men&uuml;pos.</td>
			<td class="pages_dropdown">Kategorie</td>
			<td class="pages_dropdown">Gruppen</td>
			<td class="pages_del">&nbsp;</td>
		</tr>
		{foreach from=$overview_array item=page_data name=array}
			{if $page_data.id eq $id}
				<tr class="pages_act_page">
			{else}
				<tr>
			{/if}
				<td class="pages_small">{if $page_data.child eq "true"}<a href="index.php?{$session_string}module=pages&action=overview&parent={$page_data.id}">X</a>{else}&nbsp;{/if}</td>
				<td class="pages_text" title="{$page_data.splash_text}">{if $page_data.module_name ne ""}{i18n s=$page_data.module_name art="module"} [Modul]{else}{$page_data.menu_text}{/if}</td>
				<td class="pages_dropdown">
					{$parent_dropdown[$smarty.foreach.array.iteration]}
				</td>
				<td class="pages_dropdown">
					{$menupos_dropdown[$smarty.foreach.array.iteration]}
				</td>
				<td class="pages_dropdown">
					{if $page_data.id ne 1}
						<div onclick="change_display('{$smarty.foreach.array.iteration}', 'block', 'category')" style="cursor: pointer;">
							{i18n s="core_select"}
						</div>
						<div id="category_{$smarty.foreach.array.iteration}" class="category" onmouseout="change_display('{$smarty.foreach.array.iteration}', 'none', 'category')" onmouseover="change_display('{$smarty.foreach.array.iteration}', 'block', 'category')" onclick="change_display('{$smarty.foreach.array.iteration}', 'block', 'category')">
						<div class="pages_dropdown_heading" onclick="submit_form('change_category', '{$smarty.foreach.array.iteration}', '{$page_data.id}', '{$page_data.parent}')">Absenden</div><hr />
						<input type="checkbox" name="category_all" id="category_{$smarty.foreach.array.iteration}_all"{if $category_array[$smarty.foreach.array.iteration].0 eq ""} checked{/if} onchange="change_radio('category', '{$smarty.foreach.array.iteration}')" onmouseover="change_display('{$smarty.foreach.array.iteration}', 'block', 'category')" />&nbsp;{i18n s="core_all"}<br />
							{foreach from=$categories item=category name=categories} {* Layer für Kategorieauswahl durchlaufen *}
								<input type="checkbox" name="{$category.id}" id="category_{$smarty.foreach.array.iteration}_{$smarty.foreach.categories.iteration}" onmouseover="change_display('{$smarty.foreach.array.iteration}', 'block', 'category')"{foreach from=$category_array[$smarty.foreach.array.iteration] item=act_category name=category}{if $act_category eq $category.id} checked{/if}{/foreach}>&nbsp;{$category.name}<br />
							{/foreach}
						</div>
					{else}&nbsp;{/if}
				</td>
				<td class="pages_dropdown">
					{if $page_data.id ne 1}
						<div onclick="change_display('{$smarty.foreach.array.iteration}', 'block', 'groups')" style="cursor: pointer;">
							{i18n s="core_select"}
						</div>
						<div id="groups_{$smarty.foreach.array.iteration}" class="groups" onmouseout="change_display('{$smarty.foreach.array.iteration}', 'none', 'groups')" onmouseover="change_display('{$smarty.foreach.array.iteration}', 'block', 'groups')" onclick="change_display('{$smarty.foreach.array.iteration}', 'block', 'groups')">
						<div class="pages_dropdown_heading" onclick="submit_form('change_groups', '{$smarty.foreach.array.iteration}', '{$page_data.id}', '{$page_data.parent}')">Absenden</div><hr />
						<input type="checkbox" name="groups_all" id="groups_{$smarty.foreach.array.iteration}_all"{if $group_array[$smarty.foreach.array.iteration].0 eq "2"} checked{/if} onchange="change_radio('groups', '{$smarty.foreach.array.iteration}')" onmouseover="change_display('{$smarty.foreach.array.iteration}', 'block', 'groups')" />&nbsp;{i18n s="core_all"}<br />
							{foreach from=$groups item=group name=groups} {* Layer für Gruppenauswahl durchlaufen *}
								<input type="checkbox" name="{$group.id}" id="groups_{$smarty.foreach.array.iteration}_{$smarty.foreach.groups.iteration}"               onmouseover="change_display('{$smarty.foreach.array.iteration}', 'block', 'groups')"{foreach from=$group_array[$smarty.foreach.array.iteration] item=act_group name=group}{if $act_group eq $group.id} checked{/if}{/foreach}>&nbsp;{$group.name}<br />
							{/foreach}
						</div>
					{else}&nbsp;{/if}
				</td>
				<td class="pages_del">
					<a href="index.php?{$session_string}&module=pages&action=edit&id={$page_data.id}"><img src="images/edit.gif" width="16" height="17" alt="Seite editieren" title="Seite editieren" border="0" /></a>
					{if $page_data.id ne 1}
						&nbsp;<a href="#" onclick="delete_page('{$page_data.id}')"><img src="images/trash.gif" width="16" height="17" alt="Seite löschen" title="Seite löschen" border="0" /></a><!-- &nbsp;
						<img src="images/trash_r.gif" width="16" height="17" alt="Rekursives Löschen noch nicht verfügbar!" title="Rekursives Löschen noch nicht verfügbar!" /> -->
					{/if}
				</td>
			</a>
		{/foreach}
	</table>
{literal}
<script type="text/javascript">
	function change_menupos(id){
		eval("var new_pos = document.pages.menupos_" + id + ".options[document.pages.menupos_" + id + ".selectedIndex].value;");
		window.location.href = "index.php?{/literal}{$session_string}module=pages&action=change_menupos&id=" + id + "&new_position=" + new_pos;{literal}
	}
	function change_parent(id){
		eval("var parent = document.pages.parent_" + id + ".options[document.pages.parent_" + id + ".selectedIndex].value;");
		window.location.href = "index.php?{/literal}{$session_string}module=pages&action=change_parent&id=" + id + "&parent=" + parent;{literal}
	}
	function change_display(id,vis,vis_type){
		document.getElementById(vis_type + "_" + id).style.display = vis;
	}
	function submit_form(action,id,page_id,parent){
		var groups = {/literal}{if $smarty.foreach.groups.total == 0}0{else}{$smarty.foreach.groups.total}{/if}{literal};
		var categories = {/literal}{$smarty.foreach.categories.total}{literal};
		var group_count = 0;

		if(action == "change_groups"){
			var group_acc = "";

			if(document.getElementById('groups_' + id + '_all').checked){
				group_acc = group_acc + '2,' + document.getElementById('groups_' + id + '_all').checked + ";";
			}
			else {
				for(group = 1; group <= groups; group++){
					if(document.getElementById('groups_' + id + '_' + group).checked){
						group_acc = group_acc + document.getElementById('groups_' + id + '_' + group).name + ',' + document.getElementById('groups_' + id + '_' + group).checked + ";";
						group_count++;
					}
				}
			}
			group_acc = group_acc.substr(0, group_acc.length - 1);
			var target_link = "index.php?{/literal}{$session_string}module=pages&action=change_groups&id=" + page_id + "&parent=" + parent + "&group_acc=" + group_acc;{literal}
		}
		if(action == "change_category"){
			var category_list = "";
			var category_count = 0;

			if(document.getElementById('category_' + id + '_all').checked){
				category_list = "";
			}
			else {
				for(category = 1; category <= categories; category++){
					if(document.getElementById('category_' + id + '_' + category).checked){
						category_list = category_list + document.getElementById('category_' + id + '_' + category).name + ',' + document.getElementById('category_' + id + '_' + category).checked + ";";
						category_count++;
					}
				}
			}
			category_list = category_list.substr(0, category_list.length - 1);
			var target_link = "index.php?{/literal}{$session_string}module=pages&action=change_categories&id=" + page_id + "&parent=" + parent + "&category_list=" + category_list;{literal}
		}
		location.href = target_link;
	}
	function delete_page(id){
		check = confirm("Seite wirklich unwiederruflich löschen?");

		if(check == true)
			location.href="index.php?{/literal}{$session_string}{literal}&module=pages&action=delete&id=" + id;
		else
			return;
	}
	function change_radio(id, counter){
		number = new Array();
		{/literal}
			number['groups'] = {$smarty.foreach.groups.total};
			number['category'] = {$smarty.foreach.categories.total};
		{literal}

		var num = number[id];
		if(num != "" && document.getElementById(id + "_" + counter + "_all")){
			var dis = document.getElementById(id + "_" + counter + "_all").checked;

			for(var c = 1; c <= num; c++){
				document.getElementById(id + "_" + counter + "_" + c).disabled = dis;
			}
		}
	}
	function init(){
	}
var pages = {/literal}{$smarty.foreach.array.total}{literal};

for(var c = 1; c <= pages; c++){
	change_radio('category', c);
	change_radio('groups', c);
}
</script>
{/literal}
</form>
</div>


Return current item: Aratix