![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/fooman/pdfcore-m2/src/view/base/templates/pdf/ |
<?php /** * @copyright Copyright (c) 2015 Fooman Limited (http://www.fooman.co.nz) * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * @var \Fooman\PdfCore\Block\Pdf\Table $block */ ?> <?php $numColumns = count($block->getColumns()); ?> <?php $lineH = '4mm' ?> <?php if ($numColumns): ?> <table width="100%" border="0" cellspacing="0" style="<?= /* @noEscape@ */ $block->getTableStyle() ?>"> <?php if ($numColumns && $block->shouldPrintHeader()): ?> <thead> <tr nobr="true"> <?php $i = 1; ?> <?php foreach ($block->getColumns() as $column): ?> <?php $isFirst = $i == 1; ?> <?php $isLast = $i == $numColumns; ?> <th style="<?= /* @noEscape@ */ $block->getHeaderStyle($isFirst, $isLast) ?>" align="<?= /* @noEscape@ */ $column->getAlignment() ? $column->getAlignment() : $block->getAlign($isFirst, $isLast) ?>" width="<?= /* @noEscape@ */ $block->getColumnWidthByIndex($column->getIndex()) ?>%" ><strong><?= /* @noEscape@ */ $column->getTitle() ?></strong></th> <?php $i++; ?> <?php endforeach; ?> </tr> </thead> <?php endif; ?> <?php $collection = $block->getCollection() ?> <?php if ($collection): ?> <?php $numItems = count($collection); ?> <?php $j = 1; ?> <?php foreach ($collection as $item): ?> <?php $hasExtras = $block->hasExtras($item); ?> <?php $rowBgColor = $block->getRowBg($item, $j) ?> <?php $isFirstItem = $j == 1; ?> <?php $isLastItem = $j == $numItems && !$hasExtras; ?> <?php if ($item->getFoomanRowLabel()): ?> <tr nobr="true" style="padding-top: <?= /* @noEscape@ */ $lineH ?>" bgcolor="<?= /* @noEscape@ */ $rowBgColor?>"> <td style="<?= /* @noEscape@ */ $block->getRowStyle(false, false) ?>" colspan="<?= (int)$numColumns ?>"><?= /* @noEscape@ */ $item->getFoomanRowLabel() ?></td> </tr> <?php endif; ?> <tr nobr="true" style="padding-top: <?= /* @noEscape@ */ $lineH ?>; <?php if (!$hasExtras): ?>padding-bottom: <?= /* @noEscape@ */ $lineH ?>;<?php endif; ?>" bgcolor="<?= /* @noEscape */$rowBgColor ?>"> <?php $i = 1; ?> <?php foreach ($block->getColumns() as $column): ?> <?php $isFirst = $i == 1; ?> <?php $isLast = $i == $numColumns; ?> <td style="<?= /* @noEscape@ */ $block->getRowStyle($isFirstItem, !$hasExtras) ?>" align="<?= /* @noEscape@ */ $column->getAlignment() ? $column->getAlignment() : $block->getAlign($isFirst, $isLast) ?>" width="<?= /* @noEscape@ */ $block->getColumnWidthByIndex($column->getIndex()) ?>%" ><?= /* @noEscape@ */ $column->getRowField($item) ?></td> <?php $i++; ?> <?php endforeach; ?> </tr> <?php if ($hasExtras): ?> <tr style="padding-bottom: <?= /* @noEscape@ */ $block->isNested() ? '0' : $lineH ?>" bgcolor="<?= /* @noEscape@ */ $rowBgColor?>"> <td style="<?= /* @noEscape@ */ $block->getRowStyle(false, true) ?>" colspan="<?= (int)$numColumns ?>"><?= /* @noEscape@ */$block->getExtras($item) ?></td> </tr> <?php endif; ?> <?php $j++; ?> <?php endforeach; ?> <?php else: ?> <tr> <td style="<?= /* @noEscape@ */ $block->getRowStyle(true, true) ?>" colspan="<?= (int)$numColumns ?>"><?= $block->escapeHtml(__('No Items')) ?></td> </tr> <?php endif; ?> </table> <?php endif; ?> <?php if (!$block->isNested()):?> <br/> <?php endif;?>