Ignore:
Timestamp:
20 Oct 2016, 21:13:17 (8 years ago)
Author:
Henrik Bettermann
Message:

Count mandates on configuration page and provide 'Purge' button.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba/browser
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/browser/pages.py

    r14183 r14221  
    939939    grok.require('waeup.managePortalConfiguration')
    940940    grok.name('index')
     941    grok.template('configurationmanagepage')
    941942    grok.context(IConfigurationContainer)
    942943    pnav = 0
     
    962963        grok.getSite().updatePlugins()
    963964        self.flash(_('Plugins were updated. See log file for details.'))
     965        return
     966
     967    @action(_('Purge mandates'),
     968              tooltip=_('For experts only!'),
     969              validator=NullValidator)
     970    def purgeMandates(self, **data):
     971        num = grok.getSite()['mandates'].removeExpired()
     972        self.flash(_('${a} mandate(s) were purged.', mapping = {'a': num}))
    964973        return
    965974
Note: See TracChangeset for help on using the changeset viewer.