diff --git a/tailbone/templates/email-bounces/view.mako b/tailbone/templates/email-bounces/view.mako index 36eb0c12..d24f3a00 100644 --- a/tailbone/templates/email-bounces/view.mako +++ b/tailbone/templates/email-bounces/view.mako @@ -5,6 +5,7 @@ <%def name="extra_javascript()"> ${parent.extra_javascript()} + % if not use_buefy: + % endif %def> <%def name="extra_styles()"> ${parent.extra_styles()} + % if use_buefy: + + % else: + % endif +%def> + +<%def name="object_helpers()"> + ${parent.object_helpers()} + % if use_buefy: + + % endif %def> <%def name="context_menu_items()"> ${parent.context_menu_items()} + % if not use_buefy: % if not bounce.processed and request.has_perm('emailbounces.process'):
- ${message} + ${message}+ % endif %def> +<%def name="render_this_page()"> + ${parent.render_this_page()} + % if use_buefy: + + % endif +%def> ${parent.body()} diff --git a/tailbone/views/bouncer.py b/tailbone/views/bouncer.py index 314f0eb6..6bee7099 100644 --- a/tailbone/views/bouncer.py +++ b/tailbone/views/bouncer.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2018 Lance Edgar +# Copyright © 2010-2021 Lance Edgar # # This file is part of Rattail. # @@ -147,6 +147,7 @@ class EmailBounceView(MasterView): kwargs['message'] = "(file not found)" return kwargs + # TODO: should require POST here def process(self): """ View for marking a bounce as processed. @@ -155,8 +156,9 @@ class EmailBounceView(MasterView): bounce.processed = datetime.datetime.utcnow() bounce.processed_by = self.request.user self.request.session.flash("Email bounce has been marked processed.") - return self.redirect(self.request.route_url('emailbounces')) + return self.redirect(self.get_action_url('view', bounce)) + # TODO: should require POST here def unprocess(self): """ View for marking a bounce as *unprocessed*. @@ -165,7 +167,7 @@ class EmailBounceView(MasterView): bounce.processed = None bounce.processed_by = None self.request.session.flash("Email bounce has been marked UN-processed.") - return self.redirect(self.request.route_url('emailbounces')) + return self.redirect(self.get_action_url('view', bounce)) def download(self): """ @@ -207,9 +209,6 @@ class EmailBounceView(MasterView): cls._defaults(config) -# TODO: deprecate / remove this -EmailBouncesView = EmailBounceView - def includeme(config): EmailBounceView.defaults(config)