<?php
/**
 * @version		$Id: default.php 115 2009-06-17 07:20:36Z eddieajau $
 * @package		TAOJ.Quanta
 * @subpackage	com_quanta
 * @copyright	Copyright (C) 2009 New Life in IT Pty Ltd. All rights reserved.
 * @license		GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
 * @link		http://www.theartofjoomla.com
 */

// no direct access
defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHtml::script('checkall.js', 'administrator/components/com_quanta/media/js/');
JHtml::stylesheet('default.css', 'administrator/components/com_quanta/media/css/');
?>
<form action="<?php echo JRoute::_('index.php?option=com_quanta&view=categories');?>" method="post" name="adminForm">
	<fieldset class="filter clearfix">
		<div class="left">
			<label for="filter_search">
				<?php echo JText::_('Quanta_Filter_Search_Label'); ?>
			</label>
			<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->state->get('filter.search'); ?>" size="60" title="<?php echo JText::_('Quanta_Filter_Search_Desc'); ?>" />

			<button type="submit">
				<?php echo JText::_('Quanta_Button_Go'); ?></button>
			<button type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();">
				<?php echo JText::_('Quanta_Button_Clear'); ?></button>
		</div>
		<div class="right">
			<select name="filter_published" id="filter_published" class="inputbox" onchange="this.form.submit()">
				<?php echo JHtml::_('quanta.publishedOptions', $this->state->get('filter.published')); ?>
			</select>
		</div>
	</fieldset>
	<table class="adminlist">
		<thead>
			<tr>
				<th width="20">
					<input type="checkbox" name="toggle" value="" onclick="checkAll(this)" />
				</th>
				<th class="left">
					<?php echo JHtml::_('grid.sort', 'Quanta_Heading_Title', 'a.title', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
				</th>
				<th nowrap="nowrap" width="5%">
					<?php echo JHtml::_('grid.sort', 'Quanta_Heading_Published', 'a.published', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
				</th>
				<th nowrap="nowrap" width="5%">
					<?php echo JHtml::_('grid.sort', 'Quanta_Heading_ID', 'a.id', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
				</th>
				<th width="40%">
					&nbsp;
				</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="15">
					<?php echo $this->pagination->getListFooter(); ?>
				</td>
			</tr>
		</tfoot>
		<tbody>
		<?php
			$i = 0;
			foreach ($this->items as $item) : ?>
			<tr class="row<?php echo $i++ % 2; ?>">
				<td style="text-align:center">
					<?php echo JHtml::_('grid.id', $item->id, $item->id); ?>
				</td>
				<td>
					<?php if ($item->checked_out) : ?>
						<?php echo JHtml::_('jxgrid.checkedout', $item->editor, $item->checked_out_time); ?>
					<?php endif; ?>
					<a href="<?php echo JRoute::_('index.php?option=com_quanta&task=category.edit&cid[]='.$item->id);?>">
						<?php echo $item->title; ?></a>
					<br /><small>(<?php echo $item->alias; ?>)</small>
				</td>
				<td align="center">
					<?php echo JHtml::_('jxgrid.published', $item->id, $item->published, 'categories.'); ?>
				</td>
				<td align="center">
					<?php echo $item->id; ?>
				</td>
				<td>
					&nbsp;
				</td>
			</tr>
		<?php endforeach; ?>
		</tbody>
	</table>

	<input type="hidden" name="task" value="" />

	<input type="hidden" name="boxchecked" value="0" />
	<input type="hidden" name="filter_order" value="<?php echo $this->state->get('list.ordering'); ?>" />
	<input type="hidden" name="filter_order_Dir" value="<?php echo $this->state->get('list.direction'); ?>" />
	<input type="hidden" name="<?php echo JUtility::getToken();?>" value="1" />
</form>
