show_keyword_search pref
This commit is contained in:
parent
7b3f6a31f6
commit
88ac0cba11
|
@ -93,6 +93,7 @@ class Sidebar(config_forms.WebCfgForm):
|
||||||
title = _("Sidebar")
|
title = _("Sidebar")
|
||||||
sidebar_show_zero = forms.CheckBox(_("Show zero hits"))
|
sidebar_show_zero = forms.CheckBox(_("Show zero hits"))
|
||||||
sidebar_show_trackers = forms.CheckBox(_("Show trackers"))
|
sidebar_show_trackers = forms.CheckBox(_("Show trackers"))
|
||||||
|
show_keyword_search = forms.CheckBox(_("Show keyword search"))
|
||||||
|
|
||||||
config_page.register('webui','template', Template)
|
config_page.register('webui','template', Template)
|
||||||
config_page.register('webui','server',Server)
|
config_page.register('webui','server',Server)
|
||||||
|
|
|
@ -6,19 +6,20 @@ $def with (filter_items)
|
||||||
<input type="hidden" name="filter_cat" value="keyword">
|
<input type="hidden" name="filter_cat" value="keyword">
|
||||||
<div id="organize_block">
|
<div id="organize_block">
|
||||||
<div id="organize_state">
|
<div id="organize_state">
|
||||||
<div class="title">$_('Keyword')</div>
|
|
||||||
<input type="text" name="filter_value" id="filter_value"
|
|
||||||
$if get('filter_cat') == "keyword":
|
|
||||||
value="$get('filter_value')"
|
|
||||||
style="width:100px;padding:0px" title="$_('Filter on a keyword')"/>
|
|
||||||
|
|
||||||
$if get('filter_cat') == "keyword":
|
$if get_config("show_keyword_search"):
|
||||||
$if get('filter_value'):
|
<div class="title">$_('Keyword')</div>
|
||||||
<img src="$base/static/images/tango/edit-clear.png" alt="$_('Clear')"
|
<input type="text" name="filter_value" id="filter_value"
|
||||||
onclick="el('keyword').value='';el('category_form').submit();"
|
$if get('filter_cat') == "keyword":
|
||||||
>
|
value="$get('filter_value')"
|
||||||
</form>
|
style="width:100px;padding:0px" title="$_('Filter on a keyword')"/>
|
||||||
<br /><br />
|
$if get('filter_cat') == "keyword":
|
||||||
|
$if get('filter_value'):
|
||||||
|
<img src="$base/static/images/tango/edit-clear.png" alt="$_('Clear')"
|
||||||
|
onclick="el('keyword').value='';el('category_form').submit();"
|
||||||
|
>
|
||||||
|
</form>
|
||||||
|
<br /><br />
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
$filter_items
|
$filter_items
|
||||||
|
|
|
@ -63,5 +63,6 @@ CONFIG_DEFAULTS = {
|
||||||
"disallow":{},
|
"disallow":{},
|
||||||
"sessions":[],
|
"sessions":[],
|
||||||
"sidebar_show_zero":False,
|
"sidebar_show_zero":False,
|
||||||
"sidebar_show_trackers":False
|
"sidebar_show_trackers":False,
|
||||||
|
"show_keyword_search":False
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue