Commit c919e337 authored by Dan McGee's avatar Dan McGee
Browse files

Break out search paginator into template



Signed-off-by: default avatarDan McGee <dan@archlinux.org>
parent 1cc2b42f
......@@ -645,8 +645,7 @@ div#pkglist-about {
}
/* pkglist: results navigation */
#pkglist-stats-top,
#pkglist-stats-bottom {
.pkglist-stats {
font-size: 0.85em;
}
......
......@@ -52,31 +52,7 @@ <h3>Package Search</h3>
{% if package_list %}
<div id="pkglist-results" class="box">
{% if paginator %}
<div id="pkglist-stats-top">
<p>{{paginator.count}} packages found.
Page {{page_obj.number}} of {{paginator.num_pages}}.</p>
<p class="pkglist-nav">
{% if page_obj.has_previous %}
<a class="prev" href="/packages/{{page_obj.previous_page_number}}/?{{current_query}}"
title="Go to previous page">&lt; Prev</a>
{% else %}
<span class="prev">&lt; Prev</span>
{% endif %}
{% if page_obj.has_next %}
<a class="next" href="/packages/{{page_obj.next_page_number}}/?{{current_query}}"
title="Go to next page">Next &gt;</a>
{% else %}
<span class="next">Next &gt;</span>
{% endif %}
</p>
</div>
{% endif %}
{% include "packages/search_paginator.html" %}
<form id="pkglist-results-form" method="post" action="/packages/update/">{% csrf_token %}
<table class="results">
......@@ -120,29 +96,7 @@ <h3>Package Search</h3>
{% endfor %}
</tbody>
</table>
{% if paginator %}
<div id="pkglist-stats-bottom">
<p>{{paginator.count}} packages found. Page {{page_obj.number}} of {{paginator.num_pages}}.</p>
<p class="pkglist-nav">
{% if page_obj.has_previous %}
<a class="prev" href="/packages/{{page_obj.previous_page_number}}/?{{current_query}}"
title="Go to previous page">&lt; Prev</a>
{% else %}
<span class="prev">&lt; Prev</span>
{% endif %}
{% if page_obj.has_next %}
<a class="next" href="/packages/{{page_obj.next_page_number}}/?{{current_query}}"
title="Go to next page">Next &gt;</a>
{% else %}
<span class="next">Next &gt;</span>
{% endif %}
</p>
</div>
{% endif %}
{% include "packages/search_paginator.html" %}
{% if perms.main.change_package %}
<p><input title="Adopt selected packages" type="submit" id="adopt-btn"
......
<div class="pkglist-stats">
{% if is_paginated %}
<p>{{paginator.count}} packages found.
Page {{page_obj.number}} of {{paginator.num_pages}}.</p>
<div class="pkglist-nav">
<span class="prev">
{% if page_obj.has_previous %}
<a href="/packages/{{page_obj.previous_page_number}}/?{{current_query}}"
title="Go to previous page">&lt; Prev</a>
{% else %}
&lt; Prev
{% endif %}
</span>
<span class="next">
{% if page_obj.has_next %}
<a href="/packages/{{page_obj.next_page_number}}/?{{current_query}}"
title="Go to next page">Next &gt;</a>
{% else %}
Next &gt;
{% endif %}
</span>
</div>
{% else %}
<p>{{ package_list.count }} packages found.</p>
{% endif %}
</div>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment