From 390e4aa70b967aa74f4e3d6b5d81ec25255abd86 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 3 Jun 2022 22:13:57 +0100 Subject: [PATCH] Remove back button --- webapp_person_options.py | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/webapp_person_options.py b/webapp_person_options.py index 7a3e86f11..ac2fe7c18 100644 --- a/webapp_person_options.py +++ b/webapp_person_options.py @@ -142,8 +142,17 @@ def html_person_options(default_timeline: str, # show banner banner_file, _ = \ get_banner_file(base_dir, nickname, domain, theme) + back_path = '/' + if nickname: + back_path = '/users/' + nickname + '/' + default_timeline + if 'moderation' in back_to_path: + back_path = '/users/' + nickname + '/moderation' + if authorized and origin_path_str == '/users/' + nickname: + banner_link = back_path + else: + banner_link = origin_path_str options_str += \ - '
\n\n' @@ -390,23 +399,6 @@ def html_person_options(default_timeline: str, options_str += checkbox_str options_str += options_link_str - back_path = '/' - if nickname: - back_path = '/users/' + nickname + '/' + default_timeline - if 'moderation' in back_to_path: - back_path = '/users/' + nickname + '/moderation' - if authorized and origin_path_str == '/users/' + nickname: - options_str += \ - ' \n' - else: - options_str += \ - ' \n' if authorized: options_str += \ '