summaryrefslogtreecommitdiffstats
path: root/application/views/scripts/announcements
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:39:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:39:39 +0000
commit8ca6cc32b2c789a3149861159ad258f2cb9491e3 (patch)
tree2492de6f1528dd44eaa169a5c1555026d9cb75ec /application/views/scripts/announcements
parentInitial commit. (diff)
downloadicingaweb2-8ca6cc32b2c789a3149861159ad258f2cb9491e3.tar.xz
icingaweb2-8ca6cc32b2c789a3149861159ad258f2cb9491e3.zip
Adding upstream version 2.11.4.upstream/2.11.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'application/views/scripts/announcements')
-rw-r--r--application/views/scripts/announcements/index.phtml71
1 files changed, 71 insertions, 0 deletions
diff --git a/application/views/scripts/announcements/index.phtml b/application/views/scripts/announcements/index.phtml
new file mode 100644
index 0000000..ff87c66
--- /dev/null
+++ b/application/views/scripts/announcements/index.phtml
@@ -0,0 +1,71 @@
+<?php if (! $this->compact): ?>
+<div class="controls">
+ <?= $this->tabs ?>
+ <?= $this->paginator ?>
+ <div class="sort-controls-container">
+ <?= $this->limiter ?>
+ <?= $this->sortBox ?>
+ </div>
+ <?= $this->filterEditor ?>
+</div>
+<?php endif ?>
+<div class="content">
+<?php if ($this->hasPermission('application/announcements')) {
+ echo $this->qlink(
+ $this->translate('Create a New Announcement') ,
+ 'announcements/new',
+ null,
+ array(
+ 'class' => 'button-link',
+ 'data-base-target' => '_next',
+ 'icon' => 'plus',
+ 'title' => $this->translate('Create a new announcement')
+ )
+ );
+} ?>
+<?php if (empty($this->announcements)): ?>
+ <p><?= $this->translate('No announcements found.') ?></p>
+</div>
+<?php return; endif ?>
+ <table data-base-target="_next" class="table-row-selectable common-table">
+ <thead>
+ <tr>
+ <th><?= $this->translate('Author') ?></th>
+ <th><?= $this->translate('Message') ?></th>
+ <th><?= $this->translate('Start') ?></th>
+ <th><?= $this->translate('End') ?></th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($this->announcements as $announcement): /** @var object $announcement */ ?>
+ <tr>
+ <td><?= $this->escape($announcement->author) ?></td>
+ <?php if ($this->hasPermission('application/announcements')): ?>
+ <td>
+ <a href="<?= $this->href('announcements/update', array('id' => $announcement->id)) ?>">
+ <?= $this->ellipsis($this->escape($announcement->message), 100) ?>
+ </a>
+ </td>
+ <?php else: ?>
+ <td><?= $this->ellipsis($this->escape($announcement->message), 100) ?></td>
+ <?php endif ?>
+ <td><?= $this->formatDateTime($announcement->start) ?></td>
+ <td><?= $this->formatDateTime($announcement->end) ?></td>
+ <?php if ($this->hasPermission('application/announcements')): ?>
+ <td class="icon-col"><?= $this->qlink(
+ null,
+ 'announcements/remove',
+ array('id' => $announcement->id),
+ array(
+ 'class' => 'action-link',
+ 'icon' => 'cancel',
+ 'title' => $this->translate('Remove this announcement')
+ )
+ ) ?></td>
+ <?php endif ?>
+ </tr>
+ <?php endforeach ?>
+ </tbody>
+ </table>
+</div>