mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
Dashlet: allow to hide regardless of permissions
This commit is contained in:
parent
a6962dc326
commit
24bb170889
@ -21,6 +21,7 @@ if ($description !== null): ?>
|
|||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<ul class="main-actions" data-base-target="_next">
|
<ul class="main-actions" data-base-target="_next">
|
||||||
<?php foreach ($dashboard->dashlets() as $dashlet): ?>
|
<?php foreach ($dashboard->dashlets() as $dashlet): ?>
|
||||||
|
<?php if (! $dashlet->shouldBeShown()) { continue; } ?>
|
||||||
<li>
|
<li>
|
||||||
<?= $dashlet->render() ?>
|
<?= $dashlet->render() ?>
|
||||||
</li>
|
</li>
|
||||||
|
@ -151,6 +151,11 @@ abstract class Dashlet
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function shouldBeShown()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public function getSummary()
|
public function getSummary()
|
||||||
{
|
{
|
||||||
$result = '';
|
$result = '';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user