|
|
@@ -0,0 +1,82 @@
|
|
|
+<?php
|
|
|
+namespace App;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @var Ticket[] $tickets
|
|
|
+ * @var bool $editable
|
|
|
+ */
|
|
|
+
|
|
|
+$core = Core::getInstance();
|
|
|
+$user = $core->getUser();
|
|
|
+
|
|
|
+$editable = $editable ?? false;
|
|
|
+
|
|
|
+?>
|
|
|
+<table class="table table-bordered table-hover mb-3">
|
|
|
+ <colgroup>
|
|
|
+ <?php
|
|
|
+ if($editable) {
|
|
|
+ ?>
|
|
|
+ <col style="width: 1%;" />
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ <col style="width: 1%;" />
|
|
|
+ <col style="width: 30%;" />
|
|
|
+ <col style="width: 15%;" />
|
|
|
+ <col style="width: 15%;" />
|
|
|
+ <col style="width: 15%;" />
|
|
|
+ <col style="width: 15%;" />
|
|
|
+ </colgroup>
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <?php
|
|
|
+ if($editable) {
|
|
|
+ ?>
|
|
|
+ <th></th>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ <th><?=htmlspecialchars("#")?></th>
|
|
|
+ <th><?=htmlspecialchars(__("Subject / Location"))?></th>
|
|
|
+ <th><?=htmlspecialchars(__("Status"))?></th>
|
|
|
+ <th><?=htmlspecialchars(__("Assigned To"))?></th>
|
|
|
+ <th><?=htmlspecialchars(__("Created"))?></th>
|
|
|
+ <th><?=htmlspecialchars(__("Updated"))?></th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <?php
|
|
|
+ foreach($tickets as $ticket) {
|
|
|
+ $location = $ticket->getLocation();
|
|
|
+ ?>
|
|
|
+ <tr>
|
|
|
+ <?php
|
|
|
+ if($editable) {
|
|
|
+ ?>
|
|
|
+ <td>
|
|
|
+ <div class="form-check">
|
|
|
+ <label for="ticket-checkbox-<?=$ticket->id?>" class="form-check-label"></label>
|
|
|
+ <input class="form-check-input" type="checkbox" id="ticket-checkbox-<?=$ticket->id?>" name="ticket_ids[]" value="<?=$ticket->id?>" />
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ <td class="text-end"><?=$ticket->id?></td>
|
|
|
+ <td>
|
|
|
+ <strong>
|
|
|
+ <a href="/tickets/<?=$ticket->id?>"><?=htmlspecialchars($ticket->subject)?></a>
|
|
|
+ </strong><br />
|
|
|
+ <?=htmlspecialchars($location->name)?>
|
|
|
+ </td>
|
|
|
+ <td><?=htmlspecialchars($ticket->getDisplayStatus())?></td>
|
|
|
+ <td><?=htmlspecialchars($ticket->getDisplayAssignedTo())?></td>
|
|
|
+ <td><?=htmlspecialchars($user->formatDateTime($ticket->getDateTimeCreated()))?></td>
|
|
|
+ <td><?=htmlspecialchars($user->formatDateTime($ticket->getDateTimeUpdated()))?></td>
|
|
|
+ </tr>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ </tbody>
|
|
|
+</table>
|