Sujet du mail de réinitialisation de mot de passé plus user-friendly.
[Plinn.git] / skins / control / restore_revision.py
1 ##parameters=key, ajax=''
2 from Products.Plinn.utils import getAdapterByInterface, translate
3 def _(message) : return translate(message, context).encode('utf-8')
4 req = context.REQUEST
5
6 history = getAdapterByInterface(context, 'Products.Plinn.interfaces.IContentHistory')
7 history.restore(key)
8
9 req.other['portal_status_message'] = _("%(type)s restored.") % {'type':context.getPortalTypeName()}
10 context.setRedirect(context, 'object/view', ajax=ajax, syncFragments = ['Breadcrumbs'])