summaryrefslogtreecommitdiff
path: root/templates/packages/search.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/packages/search.html')
-rw-r--r--templates/packages/search.html68
1 files changed, 49 insertions, 19 deletions
diff --git a/templates/packages/search.html b/templates/packages/search.html
index 29dddeb3..41e36193 100644
--- a/templates/packages/search.html
+++ b/templates/packages/search.html
@@ -2,7 +2,7 @@
{% load cycle from future %}
{% load package_extras %}
-{% block title %}{{ BRANDING_DISTRONAME }} - Package Database{% endblock %}
+{% block title %}{{ BRANDING_DISTRONAME }} - Package Search{% endblock %}
{% block navbarclass %}anb-packages{% endblock %}
{% block head %}
@@ -12,10 +12,7 @@
{% block content %}
<div id="pkglist-search" class="box filter-criteria">
-
- <h2>Package Database</h2>
-
- <h3>Package Search</h3>
+ <h2>Package Search</h2>
<form id="pkg-search" method="get" action="/packages/">
<p>{{ search_form.sort }}</p>
@@ -41,14 +38,49 @@
type="submit" value="Search" /></div>
</fieldset>
</form>
+</div>
-</div><!-- #pkglist-search -->
+{% if not is_paginated or page_obj.number == 1 %}{% with search_form.exact_matches as exact_matches %}{% if exact_matches %}
+<div id="exact-matches" class="box">
+ <div class="pkglist-stats">
+ <p>{{ exact_matches|length }} exact match{{ exact_matches|pluralize:"es" }} found.</p>
+ </div>
+ <table class="results">
+ <thead>
+ <tr>
+ <th>Arch</th>
+ <th>Repo</th>
+ <th>Name</th>
+ <th>Version</th>
+ <th>Description</th>
+ <th>Last Updated</th>
+ <th>Flag Date</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% 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>
+ {% if pkg.flag_date %}
+ <td><span class="flagged">{{ pkg.full_version }}</span></td>
+ {% else %}
+ <td>{{ pkg.full_version }}</td>
+ {% endif %}
+ <td class="wrap">{{ pkg.pkgdesc }}</td>
+ <td>{{ pkg.last_update|date }}</td>
+ <td>{{ pkg.flag_date|date }}</td>
+ </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 %}
-
<table class="results">
<thead>
<tr>
@@ -70,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 %}
@@ -85,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" %}
@@ -96,18 +132,12 @@
<input title="Orphan selected packages" type="submit" id="disown-btn"
name="disown" value="Disown Packages" /></p>
{% endif %}
-
</form>
-
-</div><!-- #pkglist-results -->
-{% else %}
-<div class="box">
- <p>We couldn't find any packages matching your query. Try searching again
- using different criteria.</p>
</div>
-{% endif %}
-
<div id="pkglist-about" class="box">
+ <p>Can't find what you are looking for? Try searching again
+ using different criteria.</p>
+
<p>You are browsing the {{ BRANDING_DISTRONAME }} package database. From here you can find
detailed information about packages located in the official supported repositories.
If you need the sourceball from where a package is built, you can look at our <a