Dashboard: show a nice message if no dashboard...
...is available fixes #13027
This commit is contained in:
parent
fb74ac2b39
commit
58245108c4
|
@ -25,10 +25,6 @@ class DashboardController extends ActionController
|
|||
}
|
||||
}
|
||||
|
||||
if (empty($dashboards)) {
|
||||
throw new NotFoundError('Got no "%s" dashboard for you', $name);
|
||||
}
|
||||
|
||||
$this->view->dashboards = $dashboards;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
<p class="error"><?= $this->errorMessage ?></p>
|
||||
<?php endif ?>
|
||||
<?= $this->form ?>
|
||||
<?php if (empty($this->dashboards)): ?>
|
||||
<?= $this->translate('No dashboard available, you might have not enough permissions') ?>
|
||||
<?php endif ?>
|
||||
<?php foreach ($this->dashboards as $dashboard): ?>
|
||||
<h1><?= $this->escape($dashboard->getTitle()) ?></h1>
|
||||
<ul class="main-actions" data-base-target="_next">
|
||||
|
|
Loading…
Reference in New Issue