summaryrefslogtreecommitdiff
path: root/templates/packages/search.html
blob: a181801b89aefdb139d68b001e909b04d449526f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{% extends "base.html" %}
{% load package_extras %}
{% block title %}Arch Linux - Package Search{% endblock %}
{% block head %}
<script type="text/javascript" src="/admin/jsi18n/"></script>
<script type="text/javascript" src="/media/admin_media/js/core.js"></script>
{{search_form.media}}
{% endblock %}

{% block content %}
    <div class="greybox">
        <h4 style="text-align: right">Search Criteria</h4>
        <form method="get">
            <table width="100%">
                <tr>
                    <td><span class="smalltext">Arch</span></td>
                    <td><span class="smalltext">Repository</span></td>
                    <td><span class="smalltext">Keywords</span></td>
                    <td><span class="smalltext">Maintainer</span></td>
                    <td><span class="smalltext">Last Update</span></td>
                    <td><span class="smalltext">Per Page</span></td>
                </tr>
                <tr>
                    {% td_input search_form.arch %}
                    {% td_input search_form.repo %}
                    {% td_input search_form.keywords %}
                    {% td_input search_form.maintainer%}
                    {% td_input search_form.last_update %}
                    {% td_input search_form.limit %}
                    <td><input type="submit" value="Search" />
                </tr>
            </table>
        </form>
    </div>
    <br /><br />

    {% if results %}
    <div class="greybox">
        <table class="results" width="100%">
            <tr>
                <form method="post" action="/packages/update/">
                <th>&nbsp;</th>
                <th><a href="{% buildsortqs "arch" %}">Arch</a></th>
                <th><a href="{% buildsortqs "repo" %}">Repo</a></th>
                <th><a href="{% buildsortqs "pkgname" %}">Name</a></th>
                <th>Version</th>
                <th>Description</th>
                <th><a href="{% buildsortqs "maintainer" %}">Maintainer</a></th>
                <th><a href="{% buildsortqs "-last_update" %}">Last Updated</a></th>
            </tr>
        {% for pkg in results %}
        <tr class="{% cycle pkgr2,pkgr1 %}">
                <td><input type="checkbox" name="pkgid" value="{{ pkg.id }}" /></td>
                <td>{{ pkg.arch.name }}</td>
                <td>{{ pkg.repo.name|capfirst }}</td>
                <td><a href="{{ pkg.get_absolute_url }}">{{ pkg.pkgname }}</a></td>
            {% if pkg.needupdate %}
                <td><span style="color:red">{{ pkg.pkgver }}-{{ pkg.pkgrel }}</span></td>
            {% else %}
                <td>{{ pkg.pkgver }}-{{ pkg.pkgrel }}</td>
            {% endif %}
                <td>{{ pkg.pkgdesc }}</td>
                <td>{{ pkg.maintainer|default:"Orphan" }}</td>
                <td>{{ pkg.last_update|date:"Y-m-d" }}</td>
            </tr>
        {% endfor %}
            <tr>
                <td colspan="2" style="font-size:x-small">{% if prevpage %}<br /><a href="{{ prevpage }}">&lt;&lt;&lt; Prev</a>{% endif %}</td>
                <td colspan="2">&nbsp;</td>
                <td colspan="2" style="font-size:x-small;text-align:right">{% if nextpage %}<br /><a href="{{ nextpage }}">Next &gt;&gt;&gt;</a>{% endif %}</td>
            </tr>
            <tr>
                <td colspan="3">&nbsp;</td>
                <td colspan="2" style="text-align:center"><input type="submit" name="adopt" value="Adopt Packages"></td>
                <td colspan="1" style="text-align:center"><input type="submit" name="disown" value="Disown Packages"></td>
                <td colspan="1">&nbsp;</td>
            </tr>
            </form>
        </table>
    </div>
    {% endif %}
{% endblock %}