aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-10-26 16:05:49 +0200
committerWojtek Kosior <koszko@koszko.org>2022-10-26 16:05:49 +0200
commitf78ae614702a79d43a6083f3d8880ac9cb026f05 (patch)
treef8f426bcb6ceb5e69f765c7d8d274b3b65944d2e /src/hydrilla/proxy/web_ui
parent01834fe901117809490fbf59b104833bdd88ea20 (diff)
downloadhaketilo-hydrilla-f78ae614702a79d43a6083f3d8880ac9cb026f05.tar.gz
haketilo-hydrilla-f78ae614702a79d43a6083f3d8880ac9cb026f05.zip
[proxy] Make some improvements to the URL patterns doc page internationalization and make it accessible from items import page
Diffstat (limited to 'src/hydrilla/proxy/web_ui')
-rw-r--r--src/hydrilla/proxy/web_ui/templates/hkt_mitm_it_base.html.jinja5
-rw-r--r--src/hydrilla/proxy/web_ui/templates/import.html.jinja4
2 files changed, 8 insertions, 1 deletions
diff --git a/src/hydrilla/proxy/web_ui/templates/hkt_mitm_it_base.html.jinja b/src/hydrilla/proxy/web_ui/templates/hkt_mitm_it_base.html.jinja
index a83d3e8..79d85df 100644
--- a/src/hydrilla/proxy/web_ui/templates/hkt_mitm_it_base.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/hkt_mitm_it_base.html.jinja
@@ -114,3 +114,8 @@ code in a proprietary work, I am not going to enforce this in court.
{{ super() }}
{% endblock body %}
+
+{% macro hkt_doc_link(page_name) %}
+ {% set doc_url = url_for('home.home_doc', page=page_name) %}
+ {{ doc_link(doc_url) }}
+{% endmacro %}
diff --git a/src/hydrilla/proxy/web_ui/templates/import.html.jinja b/src/hydrilla/proxy/web_ui/templates/import.html.jinja
index 7f3be50..afeb5a2 100644
--- a/src/hydrilla/proxy/web_ui/templates/import.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/import.html.jinja
@@ -99,7 +99,9 @@ code in a proprietary work, I am not going to enforce this in court.
{{ label(_('web_ui.import.description_field_label'), 'description') }}
{{ form_field('description', required=false, height=3) }}
- {{ label(_('web_ui.import.patterns_field_label'), 'patterns') }}
+ {% call label(_('web_ui.import.patterns_field_label'), 'patterns') %}
+ {{ hkt_doc_link('url_patterns') }}
+ {% endcall %}
{% if invalid_ad_hoc_patterns is defined %}
{{ error_note(_('web_ui.err.invalid_ad_hoc_patterns')) }}
{% endif %}