bugfix.
[Plinn.git] / skins / custom_generic / undo_form.pt
1 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
2 lang="en"
3 metal:use-macro="here/main_template/macros/master"
4 i18n:domain="cmf_default">
5
6 <head>
7 <meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
8 </head>
9 <body>
10
11 <div metal:fill-slot="main_no_tabs"
12 tal:define="transactions python:container.portal_undo.listUndoableTransactionsFor(here);
13 Batch python:modules['Products.Plinn'].Batch;
14 DateTime python:modules['DateTime'].DateTime;
15 b_start python:request.get('b_start',0)">
16
17 <form name="undo_form"
18 action="undo"
19 method="post"
20 tal:condition="transactions"
21 tal:define="batch python:Batch(transactions, 15, int(b_start), orphan=1)">
22
23 <input type="hidden" name="came_from" value="" tal:attributes="value request/HTTP_REFERER" />
24
25 <h1 i18n:translate="">Undo Transactions</h1>
26
27 <p i18n:translate="">
28 This application's transactional feature allows you to
29 easily undo changes made to the application's settings or data. You can
30 revert the application to a &quot;snapshot&quot; of its state
31 at a previous point in time.
32 </p>
33
34 <p i18n:translate="">
35 Select one or more transactions below and then click on the &quot;Undo&quot;
36 button to undo the transactions. Note that even though a transaction
37 is shown below, you will not be able to undo it if later transactions
38 modified objects that were modified by the transaction.
39 </p>
40
41 <!-- Navigation -->
42 <div metal:use-macro="here/batch_macros/macros/navigation" />
43
44 <table class="listing"
45 summary="Undo history"
46 cellpadding="0"
47 cellspacing="0">
48
49 <thead>
50 <tr>
51 <th i18n:translate="">Undo</th>
52 <th i18n:translate="">Action performed</th>
53 <th i18n:translate="">Affected Item</th>
54 <th i18n:translate="">By</th>
55 <th i18n:translate="">Date</th>
56 </tr>
57 </thead>
58
59 <tbody>
60 <metal:block tal:repeat="trx batch">
61 <tr class="even"
62 tal:define="oddrow repeat/trx/odd;
63 descriptions python:trx.get('description').split('\n');"
64 tal:attributes="class python:test(oddrow, 'even', 'odd')" >
65
66 <td>
67 <input type="checkbox"
68 class="noborder"
69 name="transaction_info:list" value=""
70 tabindex=""
71 tal:attributes="value python:trx['id'];
72 tabindex tabindex/next;" />
73 </td>
74
75 <td tal:define="has_description python:len(descriptions)>1">
76
77 <span tal:condition="has_description"
78 tal:replace="python:' '.join(descriptions[1:])">Title</span>
79 <span tal:condition="not:has_description">&nbsp;</span>
80
81 </td>
82
83 <td tal:content="python:descriptions[0]">
84 Action performed
85 </td>
86
87 <td tal:content="python:mtool.getMemberFullNameById(trx['user_name'].split(' ', 1)[1], nameBefore=0)">
88 username
89 </td>
90
91 <td tal:content="python:trx['time'].strftime(locale_date_fmt)">
92 date/time
93 </td>
94 </tr>
95 </metal:block>
96 </tbody>
97 </table>
98
99 <input class="context"
100 type="submit"
101 name="undo:method"
102 value="Undo"
103 tabindex=""
104 i18n:attributes="value"
105 tal:attributes="tabindex tabindex/next;"
106 />
107
108 <!-- Navigation -->
109 <div metal:use-macro="here/batch_macros/macros/navigation" />
110
111 </form>
112
113 </div>
114
115 </body>
116 </html>