Example #1
0
?>
            </td>
        </tr>
    </table>

	<table class="table table-striped table-bordered">
		<thead>
            <tr>
                <th style="width: 5px;">
                	<?php 
echo JText::_('COM_CITRUSCART_NUM');
?>
                </th>
                <th style="width: 20px;">
                	<?php 
echo JHtmlGrid::checkall($name = 'cid', $tip = 'JGLOBAL_CHECK_ALL', $action = 'Joomla.checkAll(this)');
?>
                </th>
                <th style="width: 50px;">
                    <?php 
echo CitruscartGrid::sort('COM_CITRUSCART_ID', "tbl.zone_id", $state->direction, $state->order);
?>
                </th>
                <th style="text-align: left;">
                    <?php 
echo CitruscartGrid::sort('COM_CITRUSCART_NAME', "tbl.zone_name", $state->direction, $state->order);
?>
                </th>
                <th>
	                <?php 
echo JText::_('COM_CITRUSCART_STATUS');
Example #2
0
<?php

// No direct access to this file
defined('_JEXEC') or die('Restricted Access');
function generateRow($index, $container_type)
{
    return XmlTagHelper::formatTableRow(array(XmlTagHelper::formatTableCell(JHtmlGrid::id($index, $container_type->id)), XmlTagHelper::formatTableCell(JText::_($container_type->container_name)), XmlTagHelper::formatTableCell($container_type->liters)));
}
function generateTableData($container_types)
{
    $tableData = array();
    foreach ($container_types as $index => $container_type) {
        $tableData[] = generateRow($index, $container_type);
    }
    return $tableData;
}
$xmlTag = new XmlTag();
if (isset($this->container_types)) {
    $tableContent = generateTableData($this->container_types);
    $xmlTag->FORM(array('action' => 'index.php?option=com_reomi&view=container_types', 'id' => 'adminForm', 'method' => 'post', 'name' => 'adminForm'), $xmlTag()->TABLE(array('class' => 'table table-striped table-hover'), $xmlTag()->THEAD($xmlTag()->TR($xmlTag()->TH(JHtmlGrid::checkall())->TH(JText::_('COM_ROEMI_ADMIN_VIEW_CONTAINER_TYPES_TABLE_HEADER_CONTAINER'))->TH(JText::_('COM_ROEMI_ADMIN_VIEW_CONTAINER_TYPES_TABLE_HEADER_LITERS'))))->TBODY($xmlTag()->__fromArray($tableContent)))->INPUT(array('type' => 'hidden', 'name' => 'task', 'value' => ''))->INPUT(array('type' => 'hidden', 'name' => 'boxchecked', 'value' => '0'))->_(JHtmlForm::token()));
} else {
    $xmlTag->P(JText::_('COM_ROEMI_ADMIN_VIEW_CONTAINER_TYPES_EMPTY_TABLE_MSG'));
}
echo $xmlTag;