Skip to content

Commit 653b049

Browse files
author
Richard Jones
committed
Generic class editor may now restore retired items (thanks Ralf Hemmecke)
1 parent 6d2dec9 commit 653b049

File tree

5 files changed

+13
-2
lines changed

5 files changed

+13
-2
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ are given with the most recent entry first.
33

44
2009-XX-XX 1.4.XX (rXXXX)
55

6+
Features:
7+
- Generic class editor may now restore retired items (thanks Ralf Hemmecke)
8+
69
Fixes:
710
- More SSL fixes. SSL wants the underlying socket non-blocking. So we
811
don't call socket.setdefaulttimeout in case of SSL. This apparently

doc/acknowledgements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Charles Groves,
5151
Engelbert Gruber,
5252
Bruce Guenter,
5353
Tamás Gulácsi,
54+
Ralf Hemmecke,
5455
Juergen Hermann,
5556
Tobias Herp,
5657
Uwe Hoffmann,

roundup/cgi/actions.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,11 @@ def handle(self):
320320
raise exceptions.Unauthorised, self._(
321321
'You do not have permission to create %(class)s'
322322
) % {'class': self.classname}
323+
elif cl.hasnode(itemid) and cl.is_retired(itemid):
324+
# If a CSV line just mentions an id and the corresponding
325+
# item is retired, then the item is restored.
326+
cl.restore(itemid)
327+
continue
323328
else:
324329
exists = 1
325330

share/roundup/templates/classic/html/_generic.index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939

4040
<p class="form-help">
4141
Remove entries by deleting their line. Add new entries by appending
42-
them to the table - put an X in the id column.
42+
them to the table - put an X in the id column. If you wish to restore a
43+
removed item and you know its id then just put that id in the id column.
4344
</p>
4445
</tal:block>
4546
<form onSubmit="return submit_once()" method="POST"

share/roundup/templates/minimal/html/_generic.index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939

4040
<p class="form-help">
4141
Remove entries by deleting their line. Add new entries by appending
42-
them to the table - put an X in the id column.
42+
them to the table - put an X in the id column. If you wish to restore a
43+
removed item and you know its id then just put that id in the id column.
4344
</p>
4445
</tal:block>
4546
<form onSubmit="return submit_once()" method="POST"

0 commit comments

Comments
 (0)