From 73550aea681bad4dd00e2f7901fc98ba1e633097 Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 2 Dec 2009 23:49:57 +0000 Subject: [PATCH] Generic class editor may now restore retired items (thanks Ralf Hemmecke) git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4397 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 3 +++ doc/acknowledgements.txt | 1 + roundup/cgi/actions.py | 5 +++++ share/roundup/templates/classic/html/_generic.index.html | 3 ++- share/roundup/templates/minimal/html/_generic.index.html | 3 ++- 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index d219cdd..cfe434a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,9 @@ are given with the most recent entry first. 2009-XX-XX 1.4.XX (rXXXX) +Features: +- Generic class editor may now restore retired items (thanks Ralf Hemmecke) + Fixes: - More SSL fixes. SSL wants the underlying socket non-blocking. So we don't call socket.setdefaulttimeout in case of SSL. This apparently diff --git a/doc/acknowledgements.txt b/doc/acknowledgements.txt index 5eb7ff4..f287c44 100644 --- a/doc/acknowledgements.txt +++ b/doc/acknowledgements.txt @@ -51,6 +51,7 @@ Charles Groves, Engelbert Gruber, Bruce Guenter, Tamás Gulácsi, +Ralf Hemmecke, Juergen Hermann, Tobias Herp, Uwe Hoffmann, diff --git a/roundup/cgi/actions.py b/roundup/cgi/actions.py index eaf4c28..54af469 100755 --- a/roundup/cgi/actions.py +++ b/roundup/cgi/actions.py @@ -320,6 +320,11 @@ class EditCSVAction(Action): raise exceptions.Unauthorised, self._( 'You do not have permission to create %(class)s' ) % {'class': self.classname} + elif cl.hasnode(itemid) and cl.is_retired(itemid): + # If a CSV line just mentions an id and the corresponding + # item is retired, then the item is restored. + cl.restore(itemid) + continue else: exists = 1 diff --git a/share/roundup/templates/classic/html/_generic.index.html b/share/roundup/templates/classic/html/_generic.index.html index a41ab0a..3dd34a0 100644 --- a/share/roundup/templates/classic/html/_generic.index.html +++ b/share/roundup/templates/classic/html/_generic.index.html @@ -39,7 +39,8 @@

Remove entries by deleting their line. Add new entries by appending - them to the table - put an X in the id column. + them to the table - put an X in the id column. If you wish to restore a + removed item and you know its id then just put that id in the id column.

Remove entries by deleting their line. Add new entries by appending - them to the table - put an X in the id column. + them to the table - put an X in the id column. If you wish to restore a + removed item and you know its id then just put that id in the id column.