Skip to content

Commit

Permalink
mod_admin: use search query 'admin_overview_query' for the overview p…
Browse files Browse the repository at this point in the history
…age if it is defined.
  • Loading branch information
mworrell committed Apr 14, 2015
1 parent 0c46a5c commit bb18923
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions modules/mod_admin/templates/admin_overview.tpl
Expand Up @@ -72,9 +72,15 @@
<a class="btn btn-default" href="{% url admin_media %}">{_ All media _}</a>
</div>

{% with m.search.paged[{query authoritative=1 cat=q.qcat text=q.qs page=q.page pagelen=qpagelen sort=q.qsort|default:"-modified"}] as result %}
{% catinclude "_admin_overview_list.tpl" m.category[q.qcat].is_a result=result %}
{% pager result=result dispatch="admin_overview_rsc" qargs hide_single_page %}
{% with m.rsc.admin_overview_query.is_visible|
if:{query query_id=`admin_overview_query` cat=q.qcat text=q.qs page=q.page pagelen=qpagelen sort=q.qsort|default:"-modified"}
:{query authoritative=1 cat=q.qcat text=q.qs page=q.page pagelen=qpagelen sort=q.qsort|default:"-modified"}
as query
%}
{% with m.search.paged[query] as result %}
{% catinclude "_admin_overview_list.tpl" m.category[q.qcat].is_a result=result %}
{% pager result=result dispatch="admin_overview_rsc" qargs hide_single_page %}
{% endwith %}
{% endwith %}
{% endwith %}
{% endwith %}
Expand Down

0 comments on commit bb18923

Please sign in to comment.