<img src="{% url telemeta-images "search_red.png" %}" alt="search-results" style="vertical-align:middle" /> {% trans "Search Results" %}
{% endblock %}
+{% block title_buttons %}
+ {% ifequal type 'items' %}
+ <a href="{% url telemeta-search-items %}?{{criteria|with_no_sound|build_query_string}}" class="component_icon button icon_filter">{% trans "All" %}</a>
+ <a href="{% url telemeta-search-items %}?{{criteria|with_sound|build_query_string}}" class="component_icon button icon_filter">{% trans "Sounds" %}</a>
+ {% else %}
+ <a href="{% url telemeta-search-collections %}?{{criteria|with_no_sound|build_query_string}}" class="component_icon button icon_filter">{% trans "All" %}</a>
+ <a href="{% url telemeta-search-collections %}?{{criteria|with_sound|build_query_string}}" class="component_icon button icon_filter">{% trans "Sounds" %}</a>
+ {% endifequal %}
+{% endblock %}
+
{% block content %}
{% if criteria %}
<ul>
{% endifnotequal %}
</li>
{% endif %}
+ {% if criteria.sound %}
+ <li><b>{% trans "Sound" %}:</b> {{criteria.sound}}</li>
+ {% endif %}
</ul>
{% endif %}
return "&".join(args)
return ''
+@register.filter
+def with_no_sound(vars):
+ _vars = vars.copy()
+ if type(_vars) == dict:
+ if u'sound' in _vars:
+ del _vars[u'sound']
+ return _vars
+
+@register.filter
+def with_sound(vars):
+ _vars = vars.copy()
+ if type(_vars) == dict:
+ if not 'sound' in _vars:
+ _vars['sound'] = True
+ return _vars
+
@register.filter
def code_or_id(resource):
if resource.code: