diff --git a/frappe/utils/help.py b/frappe/utils/help.py index a481d67f35..b6325effd9 100644 --- a/frappe/utils/help.py +++ b/frappe/utils/help.py @@ -33,6 +33,23 @@ def get_help(text): def get_help_content(path): return HelpDatabase().get_content(path) +def get_improve_page_html(app_name, target): + docs_config = frappe.get_module(app_name + ".config.docs") + source_link = docs_config.source_link + branch = getattr(docs_config, "branch", "develop") + html = '''
+
+ +
+
'''.format(source_link=source_link, app_name=app_name, target=target, branch=branch) + return html + + class HelpDatabase(object): def __init__(self): self.global_help_setup = frappe.conf.get('global_help_setup') @@ -166,17 +183,8 @@ class HelpDatabase(object): target = path.split('/', 3)[-1] app_name = path.split('/', 3)[2] - html += ''' -
-
- -
-
'''.format(app_name=app_name, target=target) + html += get_improve_page_html(app_name, target) + soup = BeautifulSoup(html, 'html.parser')