Tweak search results page a bit more

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2014-10-18 19:21:26 -05:00
parent 15a27036a5
commit 21b8ff5cf2
2 changed files with 18 additions and 14 deletions

View File

@ -701,6 +701,10 @@ table.results {
color: red;
}
.results tr.empty td {
text-align: center;
}
/* pkglist: layout */
#pkglist-about {
margin-top: 1.5em;

View File

@ -58,7 +58,8 @@ <h2>Package Search</h2>
</tr>
</thead>
<tbody>
{% for pkg in exact_matches %}<tr class="{% cycle 'odd' 'even' %}">
{% for pkg in exact_matches %}
<tr class="{% cycle 'odd' 'even' %}">
<td>{{ pkg.arch.name }}</td>
<td>{{ pkg.repo.name|capfirst }}</td>
<td>{% pkg_details_link pkg %}</td>
@ -70,13 +71,13 @@ <h2>Package Search</h2>
<td class="wrap">{{ pkg.pkgdesc }}</td>
<td>{{ pkg.last_update|date }}</td>
<td>{{ pkg.flag_date|date }}</td>
</tr>{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}{% endwith %}{% endif %}
{% if package_list %}
<div id="pkglist-results" class="box">
{% include "packages/search_paginator.html" %}
<form id="pkglist-results-form" method="post" action="/packages/update/">{% csrf_token %}
@ -101,7 +102,8 @@ <h2>Package Search</h2>
</tr>
</thead>
<tbody>
{% for pkg in package_list %}<tr class="{% cycle 'odd' 'even' %}">
{% for pkg in package_list %}
<tr class="{% cycle 'odd' 'even' %}">
{% if perms.main.change_package %}
<td><input type="checkbox" name="pkgid" value="{{ pkg.id }}" /></td>
{% endif %}
@ -116,7 +118,10 @@ <h2>Package Search</h2>
<td class="wrap">{{ pkg.pkgdesc }}</td>
<td>{{ pkg.last_update|date }}</td>
<td>{{ pkg.flag_date|date }}</td>
</tr>{% endfor %}
</tr>
{% empty %}
<tr class="empty"><td colspan="{% if perms.main.change_package %}9{% else %}8{% endif %}"><em>No matching packages found</em></td></tr>
{% endfor %}
</tbody>
</table>
{% include "packages/search_paginator.html" %}
@ -129,21 +134,16 @@ <h2>Package Search</h2>
{% endif %}
</form>
</div>
{% else %}
<div class="box">
<p>We couldn't find any packages matching your query. Try searching again
<div id="pkglist-about" class="box">
<p>Can't find what you are looking for? Try searching again
using different criteria, or try
{% if search_form.q.data %}
<a href="https://aur.archlinux.org/packages.php?K={{ search_form.q.data|urlencode }}">searching the AUR</a>
{% else %}searching the <a href="https://aur.archlinux.org/">AUR</a>{% endif %}
to see if the package can be found there.</p>
</div>
{% endif %}
<div id="pkglist-about" class="box">
<p>You are browsing the Arch Linux package database. From here you can find
detailed information about packages located in the official supported repositories.
For unsupported packages, browse the <a href="https://aur.archlinux.org/"
title="AUR package database">Arch User Repository (AUR).</a></p>
detailed information about packages located in the official supported repositories.</p>
</div>
{% endblock %}