51 lines
2.3 KiB
HTML
51 lines
2.3 KiB
HTML
<div class="box">
|
|
<div class="content">
|
|
<h2 class="title">Attachments</h2>
|
|
<div class="block">
|
|
<check if="isset( {{@attachments }})">
|
|
<check if="count({{@attachments}}) > 0">
|
|
<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>
|
|
</check>
|
|
<div class="block">
|
|
<h3 class="title">Upload attachment</h3>
|
|
<form action="/ticket/{{@PARAMS.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>
|
|
</div> |