mirror of
https://github.com/searxng/searxng.git
synced 2025-12-30 15:40:03 +00:00
Merge pull request #485 from dalf/pref_query_in_title
[mod] new preference: query_in_title
This commit is contained in:
@@ -280,6 +280,17 @@
|
||||
{{ preferences_item_footer(image_proxy_info, image_proxy_label, rtl) }}
|
||||
{% endif %}
|
||||
|
||||
{% if 'query_in_title' not in locked_preferences %}
|
||||
{% set query_in_title_label = _('Query in the page\'s title') %}
|
||||
{% set query_in_title_info = _('When enabled, the result page\'s title contains your query. Your browser can record this title') %}
|
||||
{{ preferences_item_header(query_in_title_info, query_in_title_label, rtl, 'query_in_title') }}
|
||||
<select class="form-control {{ custom_select_class(rtl) }}" name="query_in_title" id="query_in_title">
|
||||
<option value="1" {% if query_in_title %}selected="selected"{% endif %}>{{ _('Enabled') }}</option>
|
||||
<option value="" {% if not query_in_title %}selected="selected"{% endif %}>{{ _('Disabled')}}</option>
|
||||
</select>
|
||||
{{ preferences_item_footer(query_in_title_info, query_in_title_label, rtl) }}
|
||||
{% endif %}
|
||||
|
||||
{{ plugin_of_category('privacy' )}}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
{%- endmacro %}
|
||||
{%- macro search_url() %}{{ url_for('search', _external=True) }}?q={{ q|urlencode }}{% if selected_categories %}&categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}{% if pageno > 1 %}&pageno={{ pageno }}{% endif %}{% if time_range %}&time_range={{ time_range }}{% endif %}{% if current_language != 'all' %}&language={{ current_language }}{% endif %}{% endmacro -%}
|
||||
|
||||
{% block title %}{{ q|e }} - {% endblock %}
|
||||
{% block title %}{% if query_in_title %}{{- q|e -}} - {% endif %}{% endblock %}
|
||||
{% block meta %}{{" "}}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ search_url() }}&format=rss">{% endblock %}
|
||||
{% block content %}
|
||||
{% include 'oscar/search.html' %}
|
||||
|
||||
@@ -256,6 +256,18 @@
|
||||
<div class="description">{{ _('Proxying image results through SearXNG') }}</div>
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
{% if 'query_in_title' not in locked_preferences %}
|
||||
<fieldset>
|
||||
<legend>{{ _('Query in the page\'s title') }}</legend>
|
||||
<p class="value">
|
||||
<select name='query_in_title'>
|
||||
<option value="1" {% if query_in_title %}selected="selected"{% endif %}>{{ _('Enabled') }}</option>
|
||||
<option value="" {% if not query_in_title %}selected="selected"{% endif %}>{{ _('Disabled') }}</option>
|
||||
</select>
|
||||
</p>
|
||||
<div class="description">{{ _('When enabled, the result page\'s title contains your query. Your browser can record this title.') }}</div>
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
{{ plugin_preferences('privacy') }}
|
||||
{{ tab_footer() }}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{%- endmacro %}
|
||||
{% block title %}{% if method == 'GET' %}{{- q|e -}} -{% endif %}{% endblock %}
|
||||
{% block title %}{% if query_in_title %}{{- q|e -}} - {% endif %}{% endblock %}
|
||||
{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ url_for('search', _external=True) }}?q={{ q|urlencode }}&categories={{ selected_categories|join(",") | replace(' ','+') }}&pageno={{ pageno }}&time_range={{ time_range }}&language={{ current_language }}&safesearch={{ safesearch }}&format=rss">{% endblock %}
|
||||
{% block content %}
|
||||
<nav id="linkto_preferences"><a href="{{ url_for('preferences') }}">{{ icon_big('menu-outline') }}</a></nav>
|
||||
|
||||
Reference in New Issue
Block a user