* [FIX] Fixed wrong behavior when clearing event log. Thanks to @vmario89 for the notice. Closes #1026

* [MOD] Moved 3rd party resources (CSS, JS, etc) to vendor directory
* [MOD] Code refactoring
This commit is contained in:
nuxsmin
2018-08-28 01:22:09 +02:00
parent 7e0785a03e
commit 377bf6f366

View File

@@ -0,0 +1,21 @@
<?php
/**
* @var $data SP\Html\DataGrid\DataGridTab
* @var $this \SP\Mvc\View\Template
*/
?>
<!-- Rows -->
<?php if ($data->getData()->getDataCount() > 0):
foreach ($data->getData()->getData() as $dataIndex => $dataItem):
if ($dataIndex === 'count'): continue; endif; ?>
<tr data-item-id="<?php echo $dataItem->{$data->getData()->getDataRowSourceId()}; ?>">
<?php foreach ($data->getData()->getDataRowSources() as $rowSrc): ?>
<?php $value = $rowSrc['isMethod'] === true && method_exists($dataItem, $rowSrc['name']) ? $dataItem->{$rowSrc['name']}() : $dataItem->{$rowSrc['name']}; ?>
<?php $value = $rowSrc['filter'] !== null && $rowSrc['filter'] ? $rowSrc['filter']($value) : $value; ?>
<td class="cell-data"><?php echo $value !== '' ? $value : '&nbsp;'; // Fix height ?></td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
<?php endif; ?>