<?php
/**
* @package HikaShop for Joomla!
* @version 1.4.3
* @author hikashop.com
* @copyright (C) 2010 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<div class="iframedoc" id="iframedoc"></div>
<form action="index.php?option=<?php echo HIKASHOP_COMPONENT ?>&ctrl=field" method="post" name="adminForm">
<?php if(hikashop::level(1)){ ?>
<table>
<tr>
<td width="100%">
</td>
<td nowrap="nowrap">
<?php echo $this->tabletype->display('filter_table',$this->selectedType); ?>
</td>
</tr>
</table>
<?php } ?>
<table class="adminlist" cellpadding="1">
<thead>
<tr>
<th class="title titlenum">
<?php echo JText::_( 'HIKA_NUM' );?>
</th>
<th class="title titlebox">
<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->rows); ?>);" />
</th>
<?php if(hikashop::level(1)){ ?>
<th class="title">
<?php echo JText::_('FIELD_TABLE'); ?>
</th>
<?php } ?>
<th class="title">
<?php echo JText::_('FIELD_COLUMN'); ?>
</th>
<th class="title">
<?php echo JText::_('FIELD_LABEL'); ?>
</th>
<th class="title">
<?php echo JText::_('FIELD_TYPE'); ?>
</th>
<th class="title titletoggle">
<?php echo JText::_('REQUIRED'); ?>
</th>
<th class="title titleorder">
<?php echo JText::_('HIKA_ORDER'); echo JHTML::_('grid.order', $this->rows );?>
</th>
<th class="title titletoggle">
<?php echo JText::_('DISPLAY_FRONTCOMP'); ?>
</th>
<th class="title titletoggle">
<?php echo JText::_('DISPLAY_BACKEND_FORM'); ?>
</th>
<th class="title titletoggle">
<?php echo JText::_('DISPLAY_BACKEND_LISTING'); ?>
</th>
<th class="title titletoggle">
<?php echo JText::_('HIKA_PUBLISHED'); ?>
</th>
<th class="title titletoggle">
<?php echo JText::_('CORE'); ?>
</th>
<th class="title titleid">
<?php echo JText::_( 'ID' ); ?>
</th>
</tr>
</thead>
<tbody>
<?php
$k = 0;
for($i = 0,$a = count($this->rows);$i<$a;$i++){
$row =& $this->rows[$i];
$publishedid = 'field_published-'.$row->field_id;
$requiredid = 'field_required-'.$row->field_id;
$backendid = 'field_backend-'.$row->field_id;
$backendlistingid = 'field_backend_listing-'.$row->field_id;
$frontcompid = 'field_frontcomp-'.$row->field_id;
?>
<tr class="<?php echo "row$k"; ?>">
<td align="center">
<?php echo $i+1; ?>
</td>
<td align="center">
<?php echo JHTML::_('grid.id', $i, $row->field_id ); ?>
</td>
<?php if(hikashop::level(1)){ ?>
<td>
<?php echo $row->field_table; ?>
</td>
<?php } ?>
<td>
<a href="<?php echo hikashop::completeLink('field&task=edit&cid[]='.$row->field_id); ?>">
<?php echo $row->field_namekey; ?>
</a>
</td>
<td>
<?php echo $this->fieldsClass->trans($row->field_realname); ?>
</td>
<td>
<?php echo $this->fieldtype->allValues[$row->field_type]; ?>
</td>
<td align="center">
<span id="<?php echo $requiredid ?>" class="loading"><?php echo $this->toggleClass->toggle($requiredid,(int) $row->field_required,'field') ?></span>
</td>
<td class="order">
<span><?php echo $this->pagination->orderUpIcon( $i, $row->field_ordering >= @$this->rows[$i-1]->field_ordering ,'orderup', 'Move Up',true ); ?></span>
<span><?php echo $this->pagination->orderDownIcon( $i, $a, $row->field_ordering <= @$this->rows[$i+1]->field_ordering , 'orderdown', 'Move Down' ,true); ?></span>
<input type="text" name="order[]" size="5" value="<?php echo $row->field_ordering; ?>" class="text_area" style="text-align: center" />
</td>
<td align="center">
<span id="<?php echo $frontcompid ?>" class="loading"><?php echo $this->toggleClass->toggle($frontcompid,(int) $row->field_frontcomp,'field') ?></span>
</td>
<td align="center">
<span id="<?php echo $backendid ?>" class="loading"><?php echo $this->toggleClass->toggle($backendid,(int) $row->field_backend,'field') ?></span>
</td>
<td align="center">
<?php if($row->field_table=='address'){
echo '--';
}else{?>
<span id="<?php echo $backendlistingid ?>" class="loading"><?php echo $this->toggleClass->toggle($backendlistingid,(int) $row->field_backend_listing,'field') ?></span>
<?php } ?>
</td>
<td align="center">
<span id="<?php echo $publishedid ?>" class="loading"><?php echo $this->toggleClass->toggle($publishedid,(int) $row->field_published,'field') ?></span>
</td>
<td align="center">
<?php echo $this->toggleClass->display('activate',$row->field_core); ?>
</td>
<td width="1%" align="center">
<?php echo $row->field_id; ?>
</td>
</tr>
<?php
$k = 1-$k;
}
?>
</tbody>
</table>
<input type="hidden" name="option" value="<?php echo HIKASHOP_COMPONENT; ?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="ctrl" value="field" />
<input type="hidden" name="boxchecked" value="0" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>