tp_dhu b2764a0f58 - refactored TicketController into protected functions
- added custom fields to TicketController
- attachment view
2025-02-16 22:11:20 +00:00

49 lines
2.0 KiB
HTML

<div class="box">
<div class="content">
<h2 class="title">Attachments</h2>
<div class="block">
<check if="isset( {{@attachments }})">
<table class="table is-fullwidth is-narrow is-striped is-hoverable">
<thead>
<tr>
<th class="th-icon"></th>
<th>File Name</th>
<th>Uploaded By</th>
<th>Created At</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<repeat group="{{ @attachments }}" value="{{ @attach }}">
<tr>
<td>
<span class="icon"><i class="fas fa-file"></i></span>
</td>
<td><a href="/attachment/{{@attach.id}}/download">{{ @attach.file_name }}</a></td>
<td>{{ @attach.username }}</td>
<td>{{ @attach.created_at }}</td>
<td>{{ @attach.version_number }}</td>
</tr>
</repeat>
</tbody>
</table>
</check>
<div class="block">
<h3 class="title">Upload attachment</h3>
<form action="/ticket/{{@ticket_id}}/attachments/upload" method="POST" enctype="multipart/form-data">
<div class="field has-addons">
<div class="control has-icons-left"><!-- is-expanded -->
<input class="input" type="file" name="attachment" required>
<span class="icon is-small is-left">
<i class="fas fa-file"></i>
</span>
</div>
<div class="control">
<button class="button" type="submit">Upload</button>
</div>
</div>
</form>
</div>
</div>
</div>