mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-25 10:57:41 +02:00
QuickTable: render only columns with titles
This commit is contained in:
parent
4a5c425056
commit
7e84b564f6
@ -13,15 +13,14 @@ abstract class QuickTable
|
|||||||
|
|
||||||
protected $connection;
|
protected $connection;
|
||||||
|
|
||||||
protected function renderRow($row, $actionColumn = false)
|
protected function renderRow($row)
|
||||||
{
|
{
|
||||||
$htm = " <tr>\n";
|
$htm = " <tr>\n";
|
||||||
$idKey = key($row);
|
|
||||||
$firstRow = true;
|
$firstRow = true;
|
||||||
|
|
||||||
foreach ($row as $key => $val) {
|
foreach ($this->getTitles() as $key => $title) {
|
||||||
|
$val = $row->$key;
|
||||||
$value = null;
|
$value = null;
|
||||||
if ($key === $idKey) continue;
|
|
||||||
|
|
||||||
if ($firstRow) {
|
if ($firstRow) {
|
||||||
if ($val !== null && $url = $this->getActionUrl($row)) {
|
if ($val !== null && $url = $this->getActionUrl($row)) {
|
||||||
@ -44,6 +43,8 @@ abstract class QuickTable
|
|||||||
return $htm . " </tr>\n";
|
return $htm . " </tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
abstract protected function getTitles();
|
||||||
|
|
||||||
protected function getActionUrl($row)
|
protected function getActionUrl($row)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user