diff --git a/src/moin/apps/frontend/views.py b/src/moin/apps/frontend/views.py index 1a61527e5..1fff185d3 100644 --- a/src/moin/apps/frontend/views.py +++ b/src/moin/apps/frontend/views.py @@ -548,7 +548,7 @@ def search(): history=history, whoosh_query=q, flaskg=flaskg, - item_name=item_name, + subitem_target=item_name, is_ticket=is_ticket, ) else: @@ -560,12 +560,12 @@ def search(): history=history, whoosh_query=q, flaskg=flaskg, - item_name=item_name, + subitem_target=item_name, medium_search_form=search_form, ) flaskg.clock.stop("search render") else: - html = render_template("search.html", query=query, medium_search_form=search_form, item_name=item_name) + html = render_template("search.html", query=query, medium_search_form=search_form, subitem_target=item_name) return html diff --git a/src/moin/templates/blog/utils.html b/src/moin/templates/blog/utils.html index dd99b8c0f..c78968d25 100644 --- a/src/moin/templates/blog/utils.html +++ b/src/moin/templates/blog/utils.html @@ -61,7 +61,7 @@

+ onclick="$('#moin-searchform').attr('action', this.checked ? '{{ url_for('frontend.search', q='>'~blog_name) }}' : '{{ url_for('frontend.search') }}' );"> {{ _("only this blog") }} {{ gen.form.close() }} {% endmacro %} diff --git a/src/moin/templates/search.html b/src/moin/templates/search.html index 56363ac81..a8af39c11 100644 --- a/src/moin/templates/search.html +++ b/src/moin/templates/search.html @@ -19,10 +19,10 @@ {%- block content %}

{{ _("Search") }}

- {%- if item_name %} -

Search "{{ item_name }}" Subitems and Transclusions

+ {%- if subitem_target %} +

Search "{{ subitem_target }}" Subitems and Transclusions

{%- endif %} - {{ gen.form.open(medium_search_form, id='moin-long-searchform', method='get', action=url_for('frontend.search', item_name=item_name)) }} + {{ gen.form.open(medium_search_form, id='moin-long-searchform', method='get', action=url_for('frontend.search')) }}

{{ forms.render(medium_search_form['q']) }}

diff --git a/src/moin/themes/basic/templates/layout.html b/src/moin/themes/basic/templates/layout.html index 7677b4bae..d78da3bea 100644 --- a/src/moin/themes/basic/templates/layout.html +++ b/src/moin/themes/basic/templates/layout.html @@ -14,7 +14,7 @@ {% set user_actions, item_navigation, item_actions = theme_supp.get_local_panel(fqname) %} {% set current_url = request.url %} {% set current_path = request.path %} -{% set current_url_showview = url_for_item(endpoint='frontend.show_item', item_name=item_name) %} +{% set current_url_showview = url_for_item(item_name) if item_name else '' %} {% set login_url = theme_supp.login_url() %} {# Helper macro to generate the local panel #}