Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/moin/apps/frontend/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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


Expand Down
2 changes: 1 addition & 1 deletion src/moin/templates/blog/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h1><a href="{{ url_for('frontend.show_item', item_name=entry_item.name) }}"
{{ forms.render_errors(form) }}
<br>
<input type="checkbox" id="moin-blog-search-this"
onclick="$('#moin-searchform').attr('action', this.checked ? '{{ url_for('frontend.search', item_name=blog_name) }}' : '{{ url_for('frontend.search') }}' );">
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 %}
6 changes: 3 additions & 3 deletions src/moin/templates/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@

{%- block content %}
<h1>{{ _("Search") }}</h1>
{%- if item_name %}
<h2>Search "{{ item_name }}" Subitems and Transclusions</h2>
{%- if subitem_target %}
<h2>Search "{{ subitem_target }}" Subitems and Transclusions</h2>
{%- 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')) }}
<p>
{{ forms.render(medium_search_form['q']) }}
</p>
Expand Down
2 changes: 1 addition & 1 deletion src/moin/themes/basic/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 #}
Expand Down