summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2014-10-18 19:21:26 -0500
committerDan McGee <dan@archlinux.org>2014-10-18 19:21:26 -0500
commit21b8ff5cf2b60f862e3fc3cfb43d8d8af0d6189f (patch)
treeee66fecb8f0d2d5d487d10f2e5528630fb7f8b08
parent15a27036a51d71f6f0bc4f15ae4e79b5b4de6637 (diff)
Tweak search results page a bit more
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--sitestatic/archweb.css4
-rw-r--r--templates/packages/search.html28
2 files changed, 18 insertions, 14 deletions
diff --git a/sitestatic/archweb.css b/sitestatic/archweb.css
index 53fa6274..edabcfb7 100644
--- a/sitestatic/archweb.css
+++ b/sitestatic/archweb.css
@@ -701,6 +701,10 @@ table.results {
color: red;
}
+ .results tr.empty td {
+ text-align: center;
+ }
+
/* pkglist: layout */
#pkglist-about {
margin-top: 1.5em;
diff --git a/templates/packages/search.html b/templates/packages/search.html
index ca95c3f0..d4a47b26 100644
--- a/templates/packages/search.html
+++ b/templates/packages/search.html
@@ -58,7 +58,8 @@
</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 @@
<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 @@
</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 @@
<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 @@
{% 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 %}