-
Notifications
You must be signed in to change notification settings - Fork 169
/
history.tt
58 lines (51 loc) · 1.43 KB
/
history.tt
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
[%# admin/importer/history.tt
Admin page for a user's entire importer history
Authors:
Afuna <coder.dw@afunamatata.com>
Copyright (c) 2015 by Dreamwidth Studios, LLC.
This program is free software; you may redistribute it and/or modify it under
the same terms as Perl itself. For a copy of the license, please reference
'perldoc perlartistic' or 'perldoc perlgpl'.
%]
[%- sections.title = '.title' | ml -%]
[%- dw.need_res( 'stc/simple-form.css') -%]
[%- USE date -%]
<form method="GET" class="simple-form">
<fieldset>
[%- form.textbox(
label = dw.ml( "Username" )
id = "user"
name = "user"
) -%]
</fieldset>
<fieldset class="submit">
[% form.submit(
value = dw.ml( ".form.submit" )
) -%]
</fieldset>
</form>
[%- IF import_items.size > 0 -%]
<table>
<thead><tr>
<th>Import #</th>
<th>Item</th>
<th>Status</th>
<th>Created</th>
<th>Last Touch</th>
</tr></thead>
<tbody>
[%- FOREACH import_id = import_items.keys.nsort -%]
[% SET parity = loop.count % 2 ? 'even' : 'odd' %]
[%- FOREACH item = import_items.$import_id.pairs -%]
<tr class='[% parity %]'>
<td>[% import_id %]</td>
<td>[% item.key %]</td>
<td>[% item.value.status %]</td>
<td>[% date.format( item.value.created ) %]</td>
<td>[% item.value.last_touch ? date.format( item.value.last_touch ) : "-" %]</td>
</tr>
[%- END -%]
[%- END %]
</tbody>
</table>
[%- END -%]