mirror of
https://github.com/searxng/searxng.git
synced 2025-02-17 02:40:03 +00:00
Merge pull request #1059 from kvch/preferences-support-intuitive
preferences: make supported/not supported labels
This commit is contained in:
commit
1adc8d6e26
BIN
searx/static/themes/oscar/css/logicodev.min.css
vendored
BIN
searx/static/themes/oscar/css/logicodev.min.css
vendored
Binary file not shown.
BIN
searx/static/themes/oscar/css/pointhi.min.css
vendored
BIN
searx/static/themes/oscar/css/pointhi.min.css
vendored
Binary file not shown.
BIN
searx/static/themes/oscar/js/searx.min.js
vendored
BIN
searx/static/themes/oscar/js/searx.min.js
vendored
Binary file not shown.
@ -19,3 +19,5 @@
|
|||||||
@import "cursor.less";
|
@import "cursor.less";
|
||||||
|
|
||||||
@import "code.less";
|
@import "code.less";
|
||||||
|
|
||||||
|
@import "preferences.less";
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
.table > tbody > tr > td, .table > tbody > tr > th {
|
||||||
|
vertical-align: middle !important;
|
||||||
|
}
|
@ -17,3 +17,5 @@
|
|||||||
@import "code.less";
|
@import "code.less";
|
||||||
|
|
||||||
@import "navbar.less";
|
@import "navbar.less";
|
||||||
|
|
||||||
|
@import "preferences.less";
|
||||||
|
3
searx/static/themes/oscar/less/pointhi/preferences.less
Normal file
3
searx/static/themes/oscar/less/pointhi/preferences.less
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.table > tbody > tr > td, .table > tbody > tr > th {
|
||||||
|
vertical-align: middle !important;
|
||||||
|
}
|
@ -85,3 +85,15 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
|
{% macro support_toggle(supports) -%}
|
||||||
|
{% if supports %}
|
||||||
|
<span class="label label-success">
|
||||||
|
{{ _("supported") }}
|
||||||
|
</span>
|
||||||
|
{% else %}
|
||||||
|
<span class="label label-danger">
|
||||||
|
{{ _("not supported") }}
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
{%- endmacro %}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
{% from 'oscar/macros.html' import preferences_item_header, preferences_item_header_rtl, preferences_item_footer, preferences_item_footer_rtl, checkbox_toggle %}
|
{% from 'oscar/macros.html' import preferences_item_header, preferences_item_header_rtl, preferences_item_footer, preferences_item_footer_rtl, checkbox_toggle, support_toggle %}
|
||||||
{% extends "oscar/base.html" %}
|
{% extends "oscar/base.html" %}
|
||||||
{% block title %}{{ _('preferences') }} - {% endblock %}
|
{% block title %}{{ _('preferences') }} - {% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<h1>{{ _('Preferences') }}</h1>
|
<h1>{{ _('Preferences') }}</h1>
|
||||||
@ -148,7 +149,7 @@
|
|||||||
<th>{{ _("Allow") }}</th>
|
<th>{{ _("Allow") }}</th>
|
||||||
<th>{{ _("Engine name") }}</th>
|
<th>{{ _("Engine name") }}</th>
|
||||||
<th>{{ _("Shortcut") }}</th>
|
<th>{{ _("Shortcut") }}</th>
|
||||||
<th>{{ _("Supports selected language") }}</th>
|
<th>{{ _("Selected language") }}</th>
|
||||||
<th>{{ _("SafeSearch") }}</th>
|
<th>{{ _("SafeSearch") }}</th>
|
||||||
<th>{{ _("Time range") }}</th>
|
<th>{{ _("Time range") }}</th>
|
||||||
<th>{{ _("Avg. time") }}</th>
|
<th>{{ _("Avg. time") }}</th>
|
||||||
@ -156,8 +157,9 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<th>{{ _("Max time") }}</th>
|
<th>{{ _("Max time") }}</th>
|
||||||
<th>{{ _("Avg. time") }}</th>
|
<th>{{ _("Avg. time") }}</th>
|
||||||
|
<th>{{ _("Time range") }}</th>
|
||||||
<th>{{ _("SafeSearch") }}</th>
|
<th>{{ _("SafeSearch") }}</th>
|
||||||
<th>{{ _("Supports selected language") }}</th>
|
<th>{{ _("Selected language") }}</th>
|
||||||
<th>{{ _("Shortcut") }}</th>
|
<th>{{ _("Shortcut") }}</th>
|
||||||
<th>{{ _("Engine name") }}</th>
|
<th>{{ _("Engine name") }}</th>
|
||||||
<th>{{ _("Allow") }}</th>
|
<th>{{ _("Allow") }}</th>
|
||||||
@ -172,16 +174,17 @@
|
|||||||
</td>
|
</td>
|
||||||
<th>{{ search_engine.name }}</th>
|
<th>{{ search_engine.name }}</th>
|
||||||
<td class="name">{{ shortcuts[search_engine.name] }}</td>
|
<td class="name">{{ shortcuts[search_engine.name] }}</td>
|
||||||
<td><input type="checkbox" {{ "checked" if current_language == 'all' or current_language in search_engine.supported_languages or current_language.split('-')[0] in search_engine.supported_languages else ""}} readonly="readonly" disabled="disabled"></td>
|
<td>{{ support_toggle(current_language == 'all' or current_language in search_engine.supported_languages or current_language.split('-')[0] in search_engine.supported_languages) }}</td>
|
||||||
<td><input type="checkbox" {{ "checked" if search_engine.safesearch==True else ""}} readonly="readonly" disabled="disabled"></td>
|
<td>{{ support_toggle(search_engine.safesearch==True) }}</td>
|
||||||
<td><input type="checkbox" {{ "checked" if search_engine.time_range_support==True else ""}} readonly="readonly" disabled="disabled"></td>
|
<td>{{ support_toggle(search_engine.time_range_support==True) }}</td>
|
||||||
<td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
|
<td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
|
||||||
<td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>
|
<td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>
|
<td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>
|
||||||
<td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
|
<td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
|
||||||
<td><input type="checkbox" {{ "checked" if search_engine.safesearch==True else ""}} readonly="readonly" disabled="disabled"></td>
|
<td>{{ support_toggle(search_engine.time_range_support==True) }}</td>
|
||||||
<td><input type="checkbox" {{ "checked" if current_language == 'all' or current_language in search_engine.supported_languages or current_language.split('-')[0] in search_engine.supported_languages else ""}} readonly="readonly" disabled="disabled"></td>
|
<td>{{ support_toggle(search_engine.safesearch==True) }}</td>
|
||||||
|
<td>{{ support_toggle(current_language == 'all' or current_language in search_engine.supported_languages or current_language.split('-')[0] in search_engine.supported_languages) }}</td>
|
||||||
<td>{{ shortcuts[search_engine.name] }}</td>
|
<td>{{ shortcuts[search_engine.name] }}</td>
|
||||||
<th>{{ search_engine.name }}</th>
|
<th>{{ search_engine.name }}</th>
|
||||||
<td class="onoff-checkbox">
|
<td class="onoff-checkbox">
|
||||||
|
Loading…
Reference in New Issue
Block a user