<?if(hun()):?>
<h2>Rendezés</h2>
<p><a href="/admin/editor/page_title">Cím szerint</a>&nbsp;-&nbsp;<a href="/admin/editor/page_date">Dátum szerint</a></p>
<?else:?>
<h2>Sorting</h2>
<p><a href="/admin/editor/page_title">By title</a>&nbsp;-&nbsp;<a href="/admin/editor/page_date">By date of change</a></p>
<?endif;?>

<h2><?=$this->lang->line('pages_h1_new')?></h2>
<p>
	<input type="button" value="<?=$this->lang->line('pages_button_new')?>" onclick="window.location.href='/admin/pageedit/new'"/>
    <?if(hun()):?>
        <input type="button" value="Új help oldal" onclick="window.location.href='/admin/pageedit_help/new'"/>
    <?endif;?>
</p>
<p>&nbsp;</p>



<?foreach($by_category as $category_title => $pages):?>
	<?if(is_array($pages) && count($pages)!=0):?>
		<h2><?=$category_title?></h2>
        <div onclick="window.location.href='/admin/pageedit/new/<?=base64_encode($category_title)?>'" style="color: gray; margin: 5px; cursor: pointer;"><?='+ ', $this->lang->line('pages_button_new')?></div>
		
		<table width="100%">
		<?foreach($pages as $page):?>
		<tr>
			<td style="width: 60px;">
				<a href="#" onclick="delQue('admin/pagedelete/<?=$page->page_id?>', <?if(hun()):?>'Biztosan törölni akarod?'<?else:?>'Are You sure?'<?endif;?>)"><span class="news-delete"><?=$this->lang->line('pages_button_delete')?></span></a>
			</td>
			<td><?=anchor('admin/pageedit/'.$page->page_id,$page->page_title)?></td>
			<td><?=$page->page_desc?></td>
			<td>
				<?if($page->page_urls=="e-mail"):?>e-mail
				<?elseif($page->page_urls):?><a href="<?=$page->page_urls?>" target="_blank"><?=$page->page_urls?></a>
				<?elseif(false):?><a href="/page/show/<?=$page->page_id?>" target="_blank">/page/show/<?=$page->page_id?></a>
				<?endif;?>
			</td>
		</tr>
		<?endforeach;?>
		</table>
	<?endif;?>

<br />
<?endforeach;?>