add maintainer column to search results
This commit is contained in:
parent
d241ae78ee
commit
b579f98acf
@ -47,6 +47,7 @@ def details(request, pkgid=0, name='', repo=''):
|
||||
pkg = get_object_or_404(Package, id=pkgid)
|
||||
return render_response(request, 'packages/details.html', {'pkg': pkg})
|
||||
|
||||
# @TODO: replace search form with a newform
|
||||
def search(request, query=''):
|
||||
if request.GET.has_key('q'):
|
||||
# take the q GET var over the one passed on the URL
|
||||
@ -65,9 +66,11 @@ def search(request, query=''):
|
||||
# build the form lists
|
||||
repos = Repo.objects.all()
|
||||
arches = Arch.objects.all()
|
||||
users = User.objects.all()
|
||||
# copy GET data over and add the lists
|
||||
c = request.GET.copy()
|
||||
c['repos'], c['arches'] = repos, arches
|
||||
c['users'] = users
|
||||
c['limit'], c['skip'] = limit, skip
|
||||
c['lastupdate'] = lastupdate
|
||||
c['sort'] = sort
|
||||
|
@ -20,6 +20,7 @@ <h4 style="text-align: right">Search Criteria</h4>
|
||||
<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>
|
||||
@ -39,6 +40,14 @@ <h4 style="text-align: right">Search Criteria</h4>
|
||||
</select>
|
||||
</td><td>
|
||||
<input type="text" name="q" value="{{ query|escape }}" size="30" maxlength="200" />
|
||||
</td><td>
|
||||
<select name="maint">
|
||||
<option value="all">All</option>
|
||||
{% for u in users %}
|
||||
<option value="{{u.id}}" {% ifequal maint u.id
|
||||
%}selected=selected {%
|
||||
%endifequal%}>{{u.username}}</option>
|
||||
{% endfor %}
|
||||
</td><td>
|
||||
<input type="text" name="lastupdate" value="{{ lastupdate|escape }}" size="10" maxlength="10" id="f_lastupdate" /> <button type="reset" id="f_trigger">...</button>
|
||||
<script type="text/javascript">
|
||||
@ -78,6 +87,7 @@ <h4 style="text-align: right">Search Criteria</h4>
|
||||
<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 %}
|
||||
@ -92,6 +102,7 @@ <h4 style="text-align: right">Search Criteria</h4>
|
||||
<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 %}
|
||||
|
Loading…
Reference in New Issue
Block a user