From 9c026c1dd93cc7cc8f96cbb8230d1c0b07f52c98 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 2 Jan 2021 18:48:45 -0600 Subject: [PATCH] Show node title in header for Login, About pages --- tailbone/views/auth.py | 5 ++++- tailbone/views/common.py | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tailbone/views/auth.py b/tailbone/views/auth.py index ef041f99..2924c821 100644 --- a/tailbone/views/auth.py +++ b/tailbone/views/auth.py @@ -124,13 +124,16 @@ class AuthenticationView(View): 'tailbone', 'main_image_url', default=self.request.static_url('tailbone:static/img/home_logo.png')) - return { + context = { 'form': form, 'referrer': referrer, 'image_url': image_url, 'use_buefy': use_buefy, 'help_url': global_help_url(self.rattail_config), } + if use_buefy: + context['index_title'] = self.rattail_config.node_title() + return context def authenticate_user(self, username, password): return authenticate_user(Session(), username, password) diff --git a/tailbone/views/common.py b/tailbone/views/common.py index 2535f1d7..05ac8e5a 100644 --- a/tailbone/views/common.py +++ b/tailbone/views/common.py @@ -112,12 +112,16 @@ class CommonView(View): """ Generic view to show "about project" info page. """ - return { + use_buefy = self.get_use_buefy() + context = { 'project_title': self.project_title, 'project_version': self.project_version, 'packages': self.get_packages(), - 'use_buefy': self.get_use_buefy(), + 'use_buefy': use_buefy, } + if use_buefy: + context['index_title'] = self.rattail_config.node_title() + return context def get_packages(self): """