2014-11-18 09:50:10 +01:00
|
|
|
<div class="controls">
|
|
|
|
<?= $this->tabs ?>
|
|
|
|
</div>
|
|
|
|
<div class="content">
|
|
|
|
<h1><?= t('Dashboard Settings'); ?></h1>
|
|
|
|
|
2014-11-20 12:45:23 +01:00
|
|
|
<table class="avp action" data-base-target="_next">
|
2014-11-18 09:50:10 +01:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2014-11-20 12:45:23 +01:00
|
|
|
<th style="width: 18em;">
|
2014-11-20 11:36:04 +01:00
|
|
|
<strong><?= t('Dashlet Name') ?></strong>
|
2014-11-18 09:50:10 +01:00
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
<strong><?= t('Url') ?></strong>
|
|
|
|
</th>
|
2014-11-20 12:45:23 +01:00
|
|
|
<th style="width: 1.4em;"> </th>
|
2014-11-18 09:50:10 +01:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php foreach ($this->dashboard->getPanes() as $pane): ?>
|
2016-04-13 12:27:25 +02:00
|
|
|
<?php if ($pane->getDisabled()) continue; ?>
|
2019-08-12 11:17:12 +02:00
|
|
|
<tr>
|
2014-11-18 09:50:10 +01:00
|
|
|
<th colspan="2" style="text-align: left; padding: 0.5em;">
|
2018-04-06 11:10:42 +02:00
|
|
|
<?php if ($pane->isUserWidget()): ?>
|
|
|
|
<?= $this->qlink(
|
|
|
|
$pane->getName(),
|
|
|
|
'dashboard/rename-pane',
|
|
|
|
array('pane' => $pane->getName()),
|
|
|
|
array('title' => sprintf($this->translate('Edit pane %s'), $pane->getName()))
|
|
|
|
) ?>
|
|
|
|
<?php else: ?>
|
2016-02-23 14:00:07 +01:00
|
|
|
<?= $this->escape($pane->getName()) ?>
|
2018-04-06 11:10:42 +02:00
|
|
|
<?php endif ?>
|
2014-11-18 09:50:10 +01:00
|
|
|
</th>
|
2014-11-18 16:28:04 +01:00
|
|
|
<th>
|
2015-02-16 11:02:09 +01:00
|
|
|
<?= $this->qlink(
|
2015-02-24 11:35:25 +01:00
|
|
|
'',
|
2015-02-16 11:02:09 +01:00
|
|
|
'dashboard/remove-pane',
|
|
|
|
array('pane' => $pane->getName()),
|
2015-02-24 11:35:25 +01:00
|
|
|
array(
|
2015-02-27 14:47:46 +01:00
|
|
|
'icon' => 'trash',
|
2015-02-24 11:35:25 +01:00
|
|
|
'title' => sprintf($this->translate('Remove pane %s'), $pane->getName())
|
|
|
|
)
|
2015-02-16 11:02:09 +01:00
|
|
|
); ?>
|
2014-11-18 16:28:04 +01:00
|
|
|
</th>
|
2014-11-18 09:50:10 +01:00
|
|
|
</tr>
|
2014-11-20 12:08:50 +01:00
|
|
|
<?php $dashlets = $pane->getDashlets(); ?>
|
|
|
|
<?php if(empty($dashlets)): ?>
|
2014-11-18 09:50:10 +01:00
|
|
|
<tr>
|
2014-11-18 12:51:28 +01:00
|
|
|
<td colspan="3">
|
2014-11-20 11:36:04 +01:00
|
|
|
<?= $this->translate('No dashlets added to dashboard') ?>.
|
2014-11-18 09:50:10 +01:00
|
|
|
</td>
|
|
|
|
</tr>
|
2014-11-18 12:51:28 +01:00
|
|
|
<?php else: ?>
|
2014-11-20 12:08:50 +01:00
|
|
|
<?php foreach ($dashlets as $dashlet): ?>
|
2016-04-13 12:27:25 +02:00
|
|
|
<?php if ($dashlet->getDisabled()) continue; ?>
|
2014-11-18 12:51:28 +01:00
|
|
|
<tr>
|
|
|
|
<td>
|
2015-02-23 17:20:26 +01:00
|
|
|
<?= $this->qlink(
|
|
|
|
$dashlet->getTitle(),
|
|
|
|
'dashboard/update-dashlet',
|
2019-06-26 15:46:06 +02:00
|
|
|
array('pane' => $pane->getName(), 'dashlet' => $dashlet->getName()),
|
2015-02-23 17:20:26 +01:00
|
|
|
array('title' => sprintf($this->translate('Edit dashlet %s'), $dashlet->getTitle()))
|
|
|
|
); ?>
|
2014-11-18 12:51:28 +01:00
|
|
|
</td>
|
2014-11-20 12:45:23 +01:00
|
|
|
<td style="table-layout: fixed; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
|
2015-02-23 17:20:26 +01:00
|
|
|
<?= $this->qlink(
|
2015-04-07 13:05:12 +02:00
|
|
|
$dashlet->getUrl()->getRelativeUrl(),
|
|
|
|
$dashlet->getUrl()->getRelativeUrl(),
|
2015-02-23 17:20:26 +01:00
|
|
|
null,
|
|
|
|
array('title' => sprintf($this->translate('Show dashlet %s'), $dashlet->getTitle()))
|
|
|
|
); ?>
|
2014-11-18 12:51:28 +01:00
|
|
|
</td>
|
|
|
|
<td>
|
2015-02-16 11:02:09 +01:00
|
|
|
<?= $this->qlink(
|
2015-02-24 11:35:25 +01:00
|
|
|
'',
|
2015-02-16 11:02:09 +01:00
|
|
|
'dashboard/remove-dashlet',
|
2019-06-26 15:46:06 +02:00
|
|
|
array('pane' => $pane->getName(), 'dashlet' => $dashlet->getName()),
|
2015-02-24 11:35:25 +01:00
|
|
|
array(
|
2015-02-27 14:47:46 +01:00
|
|
|
'icon' => 'trash',
|
2019-06-26 15:46:06 +02:00
|
|
|
'title' => sprintf($this->translate('Remove dashlet %s from pane %s'), $dashlet->getTitle(), $pane->getTitle())
|
2015-02-24 11:35:25 +01:00
|
|
|
)
|
2015-02-16 11:02:09 +01:00
|
|
|
); ?>
|
2014-11-18 12:51:28 +01:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<?php endif; ?>
|
2014-11-18 09:50:10 +01:00
|
|
|
<?php endforeach; ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2015-04-07 13:05:12 +02:00
|
|
|
</div>
|