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 += \ '