| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <?php /** @noinspection PhpUnhandledExceptionInspection */
- namespace App;
- use App\Enums\DocumentTypes;
- /**
- * @var Document[] $documents
- */
- ?>
- <div class="row mb-3">
- <div class="col">
- <h3><?=htmlspecialchars(__("ARUs"))?></h3>
- </div>
- <div class="col-auto">
- <a class="btn btn-success" data-bs-toggle="modal" data-bs-target="#new-document-modal" data-type="<?=DocumentTypes::ADVANCE_REPLACEMENT_UNIT?>">
- <i class="fa fa-fw fa-plus"></i>
- <?=htmlspecialchars(__("Add"))?>
- </a>
- </div>
- </div>
- <?php
- if(empty($documents)) {
- ?>
- <div class="alert alert-info">
- <i class="fa fa-fw fa-info-circle"></i>
- <?=htmlspecialchars(__("No ARU documents to display."))?>
- </div>
- <?php
- }
- else {
- ?>
- <table class="table table-bordered table-hover">
- <thead>
- <tr>
- <th><?=htmlspecialchars(__("Number"))?></th>
- <th><?=htmlspecialchars(__("Location"))?></th>
- <th><?=htmlspecialchars(__("Items"))?></th>
- <th><?=htmlspecialchars(__("Actions"))?></th>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach($documents as $document) {
- $location = $document->getLocation();
- ?>
- <tr>
- <td class="text-right">
- <?=htmlspecialchars($document->number)?>
- </td>
- <td>
- <a href="<?=htmlspecialchars($location->getUrl())?>">
- <?=htmlspecialchars($location->getDisplayName())?>
- </a>
- </td>
- <td>
- Items
- </td>
- <td class="p-1">
- <a class="btn btn-sm btn-primary" href="<?=htmlspecialchars($document->getUrl())?>">
- <?=htmlspecialchars(__("View"))?>
- </a>
- </td>
- </tr>
- <?php
- }
- ?>
- </tbody>
- </table>
- <?php
- }
|