<?php 
	defined('_JEXEC') or die('Restricted access');
	JHTML::_('behavior.tooltip');
	JToolBarHelper::title(   JText::_( 'Fusion Charts Manager' ), 'generic.png' );
?>
<form action="index.php" method="post" name="adminForm">
	<table>
		<tr>
			<td align="left" width="100%">
				<?php echo JText::_( 'Filter' ); ?>:
				<input type="text" name="search" id="search" value="<?php echo $this->lists['search'];?>" class="text_area" onchange="document.adminForm.submit();" />
				<button onclick="this.form.submit();"><?php echo JText::_( 'Go' ); ?></button>
				<button onclick="document.getElementById('search').value='';this.form.getElementById('filter_categories').value='0';this.form.getElementById('filter_types').value=0;this.form.submit();"><?php echo JText::_( 'Reset' ); ?></button>
			</td>
			<td nowrap="nowrap">
				<?php
					echo $this->lists['filter_categories'];
					echo $this->lists['filter_types'];
				?>
			</td>
		</tr>
	</table>
	<div id="editcell">
		<table class="adminlist">
			<thead>
				<tr>					
					<th class="title">
						<?php echo JHTML::_('grid.sort',  'Title', 'title', $this->lists['order_Dir'], $this->lists['order'] ); ?>
					</th>
					<th width="15%"  class="title">
						<?php echo JHTML::_('grid.sort',  'Category', 'category', $this->lists['order_Dir'], $this->lists['order'] ); ?>
					</th>
					<th width="15%"  class="title">
						<?php echo JHTML::_('grid.sort',  'Type', 'type', $this->lists['order_Dir'], $this->lists['order'] ); ?>
					</th>
					<th width="1%" nowrap="nowrap">
						<?php echo JHTML::_('grid.sort',  'ID', 'id', $this->lists['order_Dir'], $this->lists['order'] ); ?>
					</th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="7">
						<?php echo $this->pagination->getListFooter(); ?>
					</td>
				</tr>
			</tfoot>
			<tbody>
				<?php foreach ($this->items as $i=>$row){ ?>
					<tr class="row<?php echo $i%2; ?>">
						<td>
							<?php
								if (  $row->isChecked ) {
									echo $row->title;
								} else {
							?>
									<span class="editlinktip hasTip" title="<?php echo JText::_( 'Edit Chart' );?>::<?php echo $row->title; ?>">
										<a href="<?php echo $row->link; ?>">
											<?php echo $row->title; ?>
										</a>
									</span>
							<?php } ?>
						</td>
						<td align="center">
							<?php echo $row->category; ?>
						</td>
						<td align="center">
							<?php echo $row->type; ?>
						</td>
						<td align="center">
							<?php echo $row->id; ?>
						</td>
					</tr>
				<?php } ?>
			</tbody>
		</table>
	</div>
	<input type="hidden" name="option" value="<?php echo ARTIOFUSIONCHARTS_OPTION; ?>" />
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="boxchecked" value="0" />
	<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
	<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>