summaryrefslogtreecommitdiff
path: root/templates/packages
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-01-31 11:50:34 -0600
committerDan McGee <dan@archlinux.org>2010-01-31 11:50:34 -0600
commite4f63d51b226b70342277a882b94fbc4770e93be (patch)
tree696386856f6135db654238f61ccf37deae233088 /templates/packages
parente86ebd0ad23fa42fe7381a54f4e9f0dc71b42ad4 (diff)
Fix up the packages search pagerelease_2010-01-31
* Don't show checkboxes for non-authenticated users * Fix up the adopt buttons to not be a table row * Fix the form which didn't have a closing tag Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/packages')
-rw-r--r--templates/packages/search.html25
1 files changed, 14 insertions, 11 deletions
diff --git a/templates/packages/search.html b/templates/packages/search.html
index 93b18b28..67d61fbb 100644
--- a/templates/packages/search.html
+++ b/templates/packages/search.html
@@ -39,10 +39,11 @@
{% if package_list %}
<div class="greybox">
+ <form method="post" action="/packages/update/">
<table class="results" width="100%">
{% if paginator %}
<tr>
- <td colspan="6">
+ <td colspan="{% if user.is_authenticated %}6{% else %}5{% endif %}">
{{paginator.count}} packages found.
Page {{page_obj.number}} of {{paginator.num_pages}}.
</td>
@@ -67,8 +68,9 @@
</tr>
{% endif %}
<tr>
- <form method="post" action="/packages/update/">
+ {% if user.is_authenticated %}
<th>&nbsp;</th>
+ {% endif %}
<th><a href="/packages/{% buildsortqs "arch" %}">Arch</a></th>
<th><a href="/packages/{% buildsortqs "repo" %}">Repo</a></th>
<th><a href="/packages/{% buildsortqs "pkgname" %}">Name</a></th>
@@ -80,7 +82,9 @@
</tr>
{% for pkg in package_list %}
<tr class="{% cycle pkgr2,pkgr1 %}">
+ {% if user.is_authenticated %}
<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 }}">{{ pkg.pkgname }}</a></td>
@@ -96,7 +100,7 @@
{% endfor %}
{% if paginator %}
<tr>
- <td colspan="6">
+ <td colspan="{% if user.is_authenticated %}6{% else %}5{% endif %}">
{{paginator.count}} packages found.
Page {{page_obj.number}} of {{paginator.num_pages}}.
</td>
@@ -120,15 +124,14 @@
</td>
</tr>
{% endif %}
- {% if user.is_authenticated %}
- <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>
- {% endif %}
</table>
+ {% if user.is_authenticated %}
+ <div id="adoptbox">
+ <input type="submit" name="adopt" value="Adopt Packages">
+ <input type="submit" name="disown" value="Disown Packages">
+ </div>
+ {% endif %}
+ </form>
</div>
{% endif %}
{% endblock %}