2020-12-21 15:56:56 +01:00
|
|
|
{{define "title"}}Outbox - FakeSMS{{end}}
|
|
|
|
{{define "header_buttons"}}
|
|
|
|
<button
|
|
|
|
data-controller="restful"
|
|
|
|
data-restful-endpoint="/sms"
|
|
|
|
data-restful-method="DELETE"
|
|
|
|
class="button is-danger">
|
|
|
|
🗑️ Clear
|
|
|
|
</button>
|
|
|
|
{{end}}
|
|
|
|
{{define "body"}}
|
|
|
|
<section class="home is-fullheight section">
|
|
|
|
<div class="container is-fluid">
|
|
|
|
{{template "header" .}}
|
|
|
|
<div>
|
|
|
|
<table class="outbox table is-fullwidth is-striped is-hoverable">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2020-12-22 15:00:42 +01:00
|
|
|
<th class="sms-from">From</th>
|
|
|
|
<th class="sms-recipient">Recipient</th>
|
|
|
|
<th class="sms-sentat">Sent At</th>
|
2020-12-21 15:56:56 +01:00
|
|
|
<th class="sms-actions"></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{range .Messages}}
|
|
|
|
<tr data-controller="inbox-entry"
|
|
|
|
data-action="click->outbox-entry#onClick"
|
|
|
|
data-inbox-entry-link="./sms/{{ .ID }}">
|
2020-12-22 15:00:42 +01:00
|
|
|
<td class="sms-from">
|
|
|
|
<span class="is-size-7">{{ .From }}</span>
|
|
|
|
</td>
|
2020-12-21 15:56:56 +01:00
|
|
|
<td class="sms-recipient">
|
2020-12-22 15:00:42 +01:00
|
|
|
<span class="tag">{{ .Recipient }}</span>
|
2020-12-21 15:56:56 +01:00
|
|
|
</td>
|
|
|
|
<td class="sms-sentat">
|
|
|
|
<span class="is-size-7">{{ .SentAt.Format "02/01/2006 15:04:05"}}</span>
|
|
|
|
</td>
|
|
|
|
<td class="sms-actions">
|
|
|
|
<div class="buttons is-right">
|
|
|
|
<a href="./sms/{{ .ID }}" class="button is-small is-link">👁️ See</a>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{else}}
|
|
|
|
<tr>
|
|
|
|
<td colspan="5" class="has-text-centered">No SMS yet.</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
{{template "footer" .}}
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
{{end}}
|
|
|
|
{{template "base" .}}
|