# HG changeset patch # User Sylvain Thénault # Date 1295607787 -3600 # Node ID 51d7868264b14aeab93c39c0ff04446add80e6d4 # Parent 89ecbae8f9bef9b240d72ebc3c328b4543c5e436 [after edition ui] closes #1381425: Wrong message : 'entity edited (click here to see created entity)' diff -r 89ecbae8f9be -r 51d7868264b1 i18n/de.po --- a/i18n/de.po Fri Jan 21 12:02:36 2011 +0100 +++ b/i18n/de.po Fri Jan 21 12:03:07 2011 +0100 @@ -1360,6 +1360,9 @@ msgid "click here to see created entity" msgstr "Hier klicken, um die angelegte Entität anzusehen" +msgid "click here to see edited entity" +msgstr "" + msgid "click on the box to cancel the deletion" msgstr "Klicken Sie die Box an, um das Löschen rückgängig zu machen." diff -r 89ecbae8f9be -r 51d7868264b1 i18n/en.po --- a/i18n/en.po Fri Jan 21 12:02:36 2011 +0100 +++ b/i18n/en.po Fri Jan 21 12:03:07 2011 +0100 @@ -1312,6 +1312,9 @@ msgid "click here to see created entity" msgstr "" +msgid "click here to see edited entity" +msgstr "" + msgid "click on the box to cancel the deletion" msgstr "" diff -r 89ecbae8f9be -r 51d7868264b1 i18n/es.po --- a/i18n/es.po Fri Jan 21 12:02:36 2011 +0100 +++ b/i18n/es.po Fri Jan 21 12:03:07 2011 +0100 @@ -1360,6 +1360,9 @@ msgid "click here to see created entity" msgstr "Ver la entidad creada" +msgid "click here to see edited entity" +msgstr "" + msgid "click on the box to cancel the deletion" msgstr "Seleccione la zona de edición para cancelar la eliminación" diff -r 89ecbae8f9be -r 51d7868264b1 i18n/fr.po --- a/i18n/fr.po Fri Jan 21 12:02:36 2011 +0100 +++ b/i18n/fr.po Fri Jan 21 12:03:07 2011 +0100 @@ -1362,6 +1362,9 @@ msgid "click here to see created entity" msgstr "cliquez ici pour voir l'entité créée" +msgid "click here to see edited entity" +msgstr "cliquez ici pour voir l'entité modifiée" + msgid "click on the box to cancel the deletion" msgstr "cliquez dans la zone d'édition pour annuler la suppression" diff -r 89ecbae8f9be -r 51d7868264b1 web/controller.py --- a/web/controller.py Fri Jan 21 12:02:36 2011 +0100 +++ b/web/controller.py Fri Jan 21 12:03:07 2011 +0100 @@ -148,10 +148,13 @@ path = self._cw.form['__redirectpath'] if (self._edited_entity and path != self._edited_entity.rest_path() and '_cwmsgid' in newparams): - # XXX may be here on modification? - msg = u'(%s)' % ( - xml_escape(self._edited_entity.absolute_url()), - self._cw._('click here to see created entity')) + # are we here on creation or modification? + if any(eid == self._edited_entity.eid + for eid in self._cw.data.get('eidmap', {}).values()): + msg = self._cw._('click here to see created entity') + else: + msg = self._cw._('click here to see edited entity') + msg = u'(%s)' % (xml_escape(self._edited_entity.absolute_url()), msg) self._cw.append_to_redirect_message(msg) elif self._after_deletion_path: # else it should have been set during form processing