summaryrefslogtreecommitdiff
path: root/templates/packages/search.html
blob: ae9e55f24ad0ec7fcd1ef2fd71e020373a129f63 (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
{% extends "base.html" %}
{% load package_extras %}
{% block title %}Parabola - Package Database{% endblock %}
{% block navbarclass %}anb-packages{% endblock %}

{% block head %}
<link rel="stylesheet" type="text/css" href="/media/admin_media/css/widgets.css" />
{% endblock %}

{% block content %}
<div id="pkglist-search" class="box filter-criteria">

    <h2>Package Database</h2>

    <h3>Package Search</h3>

    <form id="pkg-search" method="get" action="/packages/">
        <p><input type="hidden" name="sort" value='{{sort}}' /></p>
        {{ search_form.non_field_errors }}
        <fieldset>
            <legend>Enter search criteria</legend>
            <div>{{ search_form.arch.errors }}
                <label for="id_arch" title="Limit results a specific CPU architecture">
                    Arch</label>{{ search_form.arch }}</div>
            <div>{{ search_form.repo.errors }}
                <label for="id_repo" title="Limit results to a specific respository">
                    Repository</label>{{ search_form.repo }}</div>
            <div>{{ search_form.q.errors }}
                <label for="id_q" title="Enter keywords as desired">
                    Keywords</label>{{ search_form.q }}</div>
            <div>{{ search_form.maintainer.errors }}
                <label for="id_maintainer" title="Limit results to a specific maintainer">
                    Maintainer</label>{{ search_form.maintainer}}</div>
            <div>{{ search_form.last_update.errors }}
                <label for="id_last_update" title="Limit results to a date after the date entered">
                    Last Updated After</label>{{ search_form.last_update }}</div>
            <div>{{ search_form.flagged.errors }}
                <label for="id_flagged" title="Limit results based on out-of-date status">
                    Flagged</label>{{ search_form.flagged }}</div>
            <div>{{ search_form.limit.errors }}
                <label for="id_limit" title="Select the number of results to display per page">
                    Per Page</label>{{ search_form.limit }}</div>
            <div ><label>&nbsp;</label><input title="Search for packages using this criteria"
                type="submit" value="Search" /></div>
        </fieldset>
    </form>

</div><!-- #pkglist-search -->

{% 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 %}

    <form id="pkglist-results-form" method="post" action="/packages/update/">{% csrf_token %}

        <table class="results">
            <thead>
                <tr>
                    {% if perms.main.change_package %}
                    <th>&nbsp;</th>
                    {% endif %}
                    <th><a href="/packages/?{% buildsortqs "arch" %}"
                            title="Sort packages by architecture">Arch</a></th>
                    <th><a href="/packages/?{% buildsortqs "repo" %}"
                            title="Sort packages by repository">Repo</a></th>
                    <th><a href="/packages/?{% buildsortqs "pkgname" %}"
                            title="Sort packages by package name">Name</a></th>
                    <th>Version</th>
                    <th>Description</th>
                    <th><a href="/packages/?{% buildsortqs "-last_update" %}"
                            title="Sort packages by last update">Last Updated</a></th>
                    <th><a href="/packages/?{% buildsortqs "-flag_date" %}"
                            title="Sort packages by when marked-out of-date">Flag Date</a></th>
                </tr>
            </thead>
            <tbody>
            {% 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 %}
                    <td>{{ pkg.arch.name }}</td>
                    <td>{{ pkg.repo.name|capfirst }}</td>
                    <td><a href="{{ pkg.get_absolute_url }}"
                            title="Package details for {{ pkg.pkgname }}">{{ pkg.pkgname }}</a></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>

        {% 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 %}

        {% if perms.main.change_package %}
        <p><input title="Adopt selected packages" type="submit" id="adopt-btn"
        name="adopt" value="Adopt Packages" />
        <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>You are browsing the Parabola 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
        href='http://repo.parabolagnulinux.org/sources/packages'
        title='Sourceballed packages'>sources repo</a>.</p> </div>

<script type="text/javascript" src="/jsi18n/"></script>
{% load adminmedia %}<script type="text/javascript" src="{% admin_media_prefix %}js/core.js"></script>
<script type="text/javascript">window.__admin_media_prefix__ = "{% filter escapejs %}{% admin_media_prefix %}{% endfilter %}";</script>
{{search_form.media}}
{% endblock %}