summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-01-31 18:50:34 +0100
committerDan McGee <dan@archlinux.org>2010-01-31 18:50:34 +0100
commite4f63d51b226b70342277a882b94fbc4770e93be (patch)
tree696386856f6135db654238f61ccf37deae233088
parente86ebd0ad23fa42fe7381a54f4e9f0dc71b42ad4 (diff)
downloadarchweb-e4f63d51b226b70342277a882b94fbc4770e93be.tar.gz
archweb-e4f63d51b226b70342277a882b94fbc4770e93be.tar.xz
Fix up the packages search page
* 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>
-rw-r--r--media/arch.css3
-rw-r--r--templates/packages/search.html25
2 files changed, 17 insertions, 11 deletions
diff --git a/media/arch.css b/media/arch.css
index bfe656d..ab9d0f6 100644
--- a/media/arch.css
+++ b/media/arch.css
@@ -159,6 +159,9 @@ div.listing {
background: #f6efe0;
border: 1px solid #eee4cb;
}
+#adoptbox {
+ text-align:center;
+}
.smalltext {
text-align: right;
font-size: x-small;
diff --git a/templates/packages/search.html b/templates/packages/search.html
index 93b18b2..67d61fb 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 %}