<?php
/**
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 *
 * @category   BL
 * @package    BL_CustomGrid
 * @copyright  Copyright (c) 2013 Benoît Leulliette <benoit.leulliette@gmail.com>
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */
?>
<?php
    $_itemValues = $this->getValue()->getItemValues();
    $_rowsHtml   = $this->getValue()->getRowsHtml();
?>
<table class="data-table order-tables" cellspacing="0">
    <thead>
        <?php if (!$this->getValue()->getHideHeader()): ?>
            <tr class="headings">
            <?php foreach ($_itemValues as $_itemValue): ?>
                <th<?php if ($_cssClasses = $this->getItemValueCssClasses($_itemValue, 'header_align')): ?> class="<?php echo $_cssClasses ?>"<?php endif ?>><?php echo $this->htmlEscape($_itemValue['name']) ?></th>
            <?php endforeach ?>
            </tr>
        <?php endif ?>
    </thead>
    <?php $_i=0; foreach ($_rowsHtml as $_rowHtml):?>
        <tbody class="<?php echo (++$_i%2 ? 'even' : 'odd') ?>"><?php echo $_rowHtml ?></tbody>
    <?php endforeach ?>
</table>