list.pt
3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<div metal:use-macro="load: ../layout-menu.pt">
<div metal:fill-slot="head">
<link href="/static/grid.css" rel="stylesheet"/>
</div>
<div metal:fill-slot="content">
<h1>Pesan</h1>
<div tal:content="structure form"/>
<div tal:condition="request.GET.get('lihat')">
<div tal:condition="not count">
<div class="alert alert-danger">Tidak ada hasil.</div>
</div>
<div tal:condition="count">
<div class="alert alert-success">Ada ${count} hasil.</div>
<table class="table table-striped table-hover">
<thead>
<tr>
<th>ID</th>
<th>Waktu Catat &<br/>Operator</th>
<th>Pengirim &<br/>Penerima</th>
<th>Pesan &<br/>Jawaban</th>
<th>Status</th>
<th>Parser</th>
</tr>
</thead>
<tbody>
<tr tal:repeat="row rows">
<td>${row.id}</td>
<td>
${row.tgl.strftime('%-d %B %Y %H:%M:%S')}<br/>
${row.tgl_operator and row.tgl_operator.strftime('%-d %B %Y %H:%M:%S')}
</td>
<td>
<span tal:condition="row.pengirim" tal:replace="row.pengirim"/>
<span tal:condition="not row.pengirim">
Tidak ada pengirim
</span>
<br/>
<span tal:condition="row.penerima" tal:replace="row.penerima"/>
<span tal:condition="not row.penerima">
USSD
</span>
</td>
<td>
${row.pesan}<br/>
<i>${row.jawaban}</i>
</td>
<td tal:condition="row.kirim">
<span tal:condition="row.status == 0">Terkirim</span>
<span tal:condition="row.status > 0 and row.status != 4">Sedang dikirim</span>
<span tal:condition="row.status < 0">Gagal terkirim</span>
<span tal:condition="row.status == 4">Sudah dikirim ulang</span>
<br/>
<a tal:condition="row.status not in [0, 4]"
href="/message/${row.id}/resend?from_url=${from_url}">
Kirim ulang
</a>
</td>
<td tal:condition="not row.kirim">Pesan masuk</td>
<td>${row.parser}</td>
</tr>
</tbody>
</table>
<center
tal:content="structure
rows.pager(format='$link_previous ~4~ $link_next')"/>
</div><!-- condition count -->
</div><!-- condition lihat -->
</div>
</div>