66 строки
2.5 KiB
HTML
66 строки
2.5 KiB
HTML
{% set search_form = SearchForm(request) %}
|
|
{% set show_advanced = search_form.advanced.data == 'on' %}
|
|
<div class="search-form expanded-search-form {% if show_advanced %}expanded{% endif %}">
|
|
<form method="get" id="search-form" action="{{ url('search.search') }}">
|
|
<div class="basic" id="search-query">
|
|
<input id="query" type="text" title="search" name="q"
|
|
{% if not search_form.q.data %}class="placeholder"{% endif %}
|
|
value="{{ search_form.q.data or '' }}"
|
|
placeholder="{{ _('search for add-ons') }}">
|
|
<label for="cat">{{ _('within') }}</label>
|
|
<select name="cat" id="cat">
|
|
{% for value, title in search_form.fields['cat'].choices -%}
|
|
{% if value in search_form.top_level_cat %}
|
|
{% set class = 'cat-all' %}
|
|
{% else %}
|
|
{% set class = '' %}
|
|
{% endif %}
|
|
<option class="{{ class }}" value="{{ value }}"
|
|
{% if value in (search_form.cat.data, search_cat) %}selected{% endif %}>
|
|
{{ title }}</option>
|
|
{%- endfor %}
|
|
</select>
|
|
<button type="submit">
|
|
<img src="{{ MEDIA_URL}}img/amo2009/blank.gif">
|
|
</button>
|
|
</div> {# search-query #}
|
|
<div id="advanced-link" title="{{ _('Toggle advanced search mode') }}">
|
|
<a class="asopen" href="?advanced=on">{{ _('Advanced') }}</a>
|
|
</div>
|
|
<div id="advanced-search" class="advanced">
|
|
<fieldset class="important">
|
|
<div class="container">
|
|
{{ search_form.lver.label_tag()|safe }}
|
|
{{ search_form.lver|safe }}
|
|
</div>
|
|
</fieldset>
|
|
<fieldset class="subsidiary">
|
|
<div class="container">
|
|
{{ search_form.atype.label_tag()|safe }}
|
|
{{ search_form.atype|safe }}
|
|
</div>
|
|
<div class="container">
|
|
{{ search_form.sort.label_tag()|safe }}
|
|
{{ search_form.sort|safe }}
|
|
</div>
|
|
<div class="container">
|
|
{{ search_form.pid.label_tag()|safe }}
|
|
{{ search_form.pid|safe }}
|
|
</div>
|
|
<div class="container">
|
|
{{ search_form.pp.label_tag()|safe }}
|
|
{{ search_form.pp|safe }}
|
|
</div>
|
|
<div class="container">
|
|
{{ search_form.lup.label_tag()|safe }}
|
|
{{ search_form.lup|safe }}
|
|
</div>
|
|
</fieldset>
|
|
<span id="search-data"
|
|
data-version="{{ request.REQUEST.get('lver', 'any') }}">
|
|
</span>
|
|
{{ search_form.advanced|safe }}
|
|
</div> {# advanced-search #}
|
|
</form>
|
|
</div>
|