From c389ebabd00ac5917a5802c6f3533249c1a9b3af Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 25 Dec 2022 15:13:59 -0600 Subject: [PATCH] Show *correct* system title when upgrading may not be the same as primary app title --- tailbone/templates/upgrades/view.mako | 4 ++-- tailbone/views/upgrades.py | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tailbone/templates/upgrades/view.mako b/tailbone/templates/upgrades/view.mako index a5b6445e..61bb2264 100644 --- a/tailbone/templates/upgrades/view.mako +++ b/tailbone/templates/upgrades/view.mako @@ -66,7 +66,7 @@

- Upgrading ${app_title} (please wait) ... + Upgrading ${system_title} (please wait) ... {{ executeUpgradeComplete ? "DONE!" : "" }}

{ this.adjustTextoutHeight() }) diff --git a/tailbone/views/upgrades.py b/tailbone/views/upgrades.py index 0b5e4b87..73b4461b 100644 --- a/tailbone/views/upgrades.py +++ b/tailbone/views/upgrades.py @@ -149,8 +149,15 @@ class UpgradeView(MasterView): return 'notice' def template_kwargs_view(self, **kwargs): + kwargs = super(UpgradeView, self).template_kwargs_view(**kwargs) upgrade = kwargs['instance'] + kwargs['system_title'] = self.rattail_config.app_title() + if upgrade.system: + system = self.upgrade_handler.get_system(upgrade.system) + if system: + kwargs['system_title'] = system['label'] + kwargs['show_prev_next'] = True kwargs['prev_url'] = None kwargs['next_url'] = None