<?php
/**
* Joomla! 1.5 component injooosm
*
* @version $Id: default.php 2009-11-22 14:03:00$
* @author Christian Knorr
* @package injooosm
* @subpackage backend
* @license GNU/GPL
* @filesource
*
*/
defined('_JEXEC') or die('Restricted access');
// toolbar
JToolBarHelper::title(JText::_('OSM_FILES'), 'categories.png');
JToolBarHelper::back($alt= 'Back', $href= 'javascript:history.back();');
// JToolBarHelper::back();
JToolBarHelper::spacer();
JToolBarHelper::addNew('newfiles', JText::_('OSM_NEW_FILES'), 'new.png' );
JToolBarHelper::addNew('newfile', 'New', 'new.png' );
JToolBarHelper::editList('editfile');
JToolBarHelper::publish();
JToolBarHelper::unpublish();
JToolBarHelper::deleteList();
$ordering = ($this->lists['order'] == 'ordering');
$document =& JFactory::getDocument();
$document->addStyleSheet(JURI::base().'components'.DS.'com_injooosm'.DS.'template.css');
?>
<form action="" 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_state').value='';this.form.submit();"><?php echo JText::_( 'Reset' ); ?></button>
</td>
<td nowrap="nowrap">
</td>
</tr>
</table>
<table class="adminlist" cellpadding="1">
<thead>
<tr>
<th class="title"><?php echo JText::_( 'NUM' ); ?></th>
<th class="title" nowrap="nowrap"><?php
echo JHTML::_('grid.sort',
JText::_('ID'), 'id', @$this->lists['order_Dir'], @$this->lists['order'], 'files' ); ?>:</th>
<th class="title"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php
echo count($this->rows); ?>);" /></th>
<th class="title"><?php
echo JHTML::_('grid.sort', JText::_('FILE'),
'file', @$this->lists['order_Dir'], @$this->lists['order'], 'files' ); ?>:</th>
<th class="title"><?php
echo JText::_('OSM_FILETYPE');
?>:</th>
<th class="title"><?php
echo JHTML::_('grid.sort', JText::_('OSM_TITLE'),
'title', @$this->lists['order_Dir'], @$this->lists['order'], 'files' ); ?>:</th>
<th class="title"><?php
echo JHTML::_('grid.sort', JText::_('OSM_CAT'),
'cat', @$this->lists['order_Dir'], @$this->lists['order'], 'files' ); ?>:</th>
<th class="title"><?php
echo JHTML::_('grid.sort', JText::_('OSM_TERRAIN'),
'terrain', @$this->lists['order_Dir'], @$this->lists['order'], 'files' ); ?>:</th>
<th class="title"><?php
echo JHTML::_('grid.sort', JText::_('OSM_LEVEL'),
'level', @$this->lists['order_Dir'], @$this->lists['order'], 'files' ); ?>:</th>
<th class="title"><?php
echo JHTML::_('grid.sort', JText::_('DATE'),
'date', @$this->lists['order_Dir'], @$this->lists['order'], 'files' ); ?>:</th>
<th class="title"><?php
echo JHTML::_('grid.sort', JText::_('ENABLED'),
'published', @$this->lists['order_Dir'], @$this->lists['order'], 'files' ); ?>:</th>
<th class="title"><?php
echo JHTML::_('grid.sort', JText::_('ACCESS LEVEL'),
'access', @$this->lists['order_Dir'], @$this->lists['order'], 'files' ); ?>:</th>
<th class="title"><?php
echo JHTML::_('grid.sort', JText::_('AUTHOR'),
'uid', @$this->lists['order_Dir'], @$this->lists['order'], 'files' ); ?>:</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="13">
<?php echo $this->pagination->getListFooter(); ?>
</td>
</tr>
</tfoot>
<tbody>
<?php
$k = 0;
for ($i=0, $n=count( $this->rows ); $i < $n; $i++)
{
$row = &$this->rows[$i];
$row->groupname = $this->buildRowGroupname($row->access); // wird für die Zugriffsebene benötigt
$access = JHTML::_('grid.access', $row, $i );
$checked = JHTML::_('grid.checkedout', $row, $i );
$published = JHTML::_('grid.published', $row, $i );
$user = JFactory::getUser($row->uid);
$imagelink = $this->buildImageFiletypes($row->istrack,$row->iswp,$row->isroute);
$file = $this->buildEditKlicks($row->file,$i);
$parent = $this->giveParentCat($row->catid);
if ( $parent !== null )
$row->cat = $parent."<br /> |_ ".$row->cat;
?>
<tr class="<?php echo "row".$k; ?>">
<td align="center"><?php echo $this->pagination->getRowOffset( $i ); ?></td>
<td align="center"><?php echo $row->id; ?></td>
<td align="center"><?php echo $checked; ?></td>
<td align="center"><?php echo $file; ?></td>
<td align="center" nowrap><?php echo $imagelink; ?></td>
<td align="center"><?php echo $row->title; ?></td>
<td align="left"><?php echo $row->cat; ?></td>
<td align="center"><?php echo $row->terrain; ?></td>
<td align="center"><?php echo $row->level; ?></td>
<td align="center"><?php echo $row->date; ?></td>
<td align="center"><?php echo $published;?></td>
<td align="center"><?php echo $access; ?></td>
<td align="center"><?php echo $user->username;?></td>
</tr>
<?php
$k = 1 - $k;
} ?>
</tbody>
</table>
<input type="hidden" name="option" value="com_injooosm" />
<input type="hidden" name="task" value="files" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="controller" value="files" />
<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>