diff options
author | Dan McGee <dan@archlinux.org> | 2010-01-31 18:50:34 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-01-31 18:50:34 +0100 |
commit | e4f63d51b226b70342277a882b94fbc4770e93be (patch) | |
tree | 696386856f6135db654238f61ccf37deae233088 | |
parent | e86ebd0ad23fa42fe7381a54f4e9f0dc71b42ad4 (diff) | |
download | archweb-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.css | 3 | ||||
-rw-r--r-- | templates/packages/search.html | 25 |
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> </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"> </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"> </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 %} |