Show node title in header for Login, About pages

This commit is contained in:
Lance Edgar 2021-01-02 18:48:45 -06:00
parent 6a0bcdaa82
commit 9c026c1dd9
2 changed files with 10 additions and 3 deletions

View file

@ -124,13 +124,16 @@ class AuthenticationView(View):
'tailbone', 'main_image_url', 'tailbone', 'main_image_url',
default=self.request.static_url('tailbone:static/img/home_logo.png')) default=self.request.static_url('tailbone:static/img/home_logo.png'))
return { context = {
'form': form, 'form': form,
'referrer': referrer, 'referrer': referrer,
'image_url': image_url, 'image_url': image_url,
'use_buefy': use_buefy, 'use_buefy': use_buefy,
'help_url': global_help_url(self.rattail_config), '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): def authenticate_user(self, username, password):
return authenticate_user(Session(), username, password) return authenticate_user(Session(), username, password)

View file

@ -112,12 +112,16 @@ class CommonView(View):
""" """
Generic view to show "about project" info page. Generic view to show "about project" info page.
""" """
return { use_buefy = self.get_use_buefy()
context = {
'project_title': self.project_title, 'project_title': self.project_title,
'project_version': self.project_version, 'project_version': self.project_version,
'packages': self.get_packages(), '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): def get_packages(self):
""" """