diff options
author | Ismael Carnales <icarnales@gmail.com> | 2009-10-31 16:25:44 -0200 |
---|---|---|
committer | Ismael Carnales <icarnales@gmail.com> | 2009-11-09 22:24:53 -0200 |
commit | bdaf336931125a4ed030459c33fd75cfee27b0a6 (patch) | |
tree | 42882917929d90432425c9e17e752beefa400f69 /templates | |
parent | 150dfd72982da506dde445e0d88ac4d270f3003e (diff) |
update packages detail template with code from pub
also added user restrictions
Diffstat (limited to 'templates')
-rw-r--r-- | templates/packages/details.html | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/templates/packages/details.html b/templates/packages/details.html index 30c8f6a4..39cba672 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -1,28 +1,35 @@ {% extends "base.html" %} {% load package_extras %} {% block title %}Pkg: {{ pkg.pkgname }} - Arch Linux Package Details{% endblock %} - {% block content %} <div class="box"> <h2 class="title">{{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }}</h2> <div style="float:right" class="listing"> <ul class="small"> <li><a href="{{ pkg.get_svn_link }}">View SVN Entries</a></li> + <li><a href="http://bugs.archlinux.org/?string={{ pkg.pkgname }}">Bug Reports</a></li> <!-- <li><a href="/packages/files/{{ pkg.id }}/">View File List</a></li> --> - {% if pkg.needupdate %} <li> + {% if pkg.needupdate %} <span style="font-size:x-small"><em>This package has been flagged out-of-date</em></span> + {% if user.is_authenticated %} <br /> <a href="/packages/unflag/{{ pkg.id }}/">Click here to unflag</a> - </li> + {% endif %} + {% else %} + <a href="/packages/flag/{{ pkg.id }}/">Flag Package Out-of-Date</a> + <a href="/packages/flaghelp/" onclick="return !window.open('/packages/flaghelp','FlagHelp','height=350,width=450,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no');"><span style="font-size:x-small">(?)</span></a> {% endif %} - <li> </li> - <li> - <form name="devaction" method="post" action="/packages/update/"> - <input type="hidden" name="pkgid" value="{{ pkg.id }}" /> - <input type="submit" style="background: #e1e3e6;" name="adopt" value="Adopt Package" /> - <input type="submit" style="background: #e1e3e6;" name="disown" value="Disown Package" /> - </form> </li> + {% if user.is_authenticated %} + <li> </li> + <li> + <form name="devaction" method="post" action="/packages/update/"> + <input type="hidden" name="pkgid" value="{{ pkg.id }}" /> + <input type="submit" style="background: #e1e3e6;" name="adopt" value="Adopt Package" /> + <input type="submit" style="background: #e1e3e6;" name="disown" value="Disown Package" /> + </form> + </li> + {% endif %} </ul> </div> <table class="listing"> @@ -45,7 +52,7 @@ <th>Maintainer:</th> <td>{% if pkg.maintainer %}{{ pkg.maintainer.get_full_name }}{% else %}None{% endif %}</td> </tr><tr> - <th>LastUpdated:</th> + <th>Last Updated:</th> <td>{{ pkg.last_update|date:"Y-m-d" }}</td> </tr> </table> @@ -54,7 +61,7 @@ <tr> <td valign="top" width="50%"> <div class="listing"> - <h4>Dependencies:</h4> + <h4>Dependencies ({{pkg.get_depends|length}}):</h4> <ul style="font-size:small;list-style:none"> {% for depend in pkg.get_depends %} {% ifequal depend.pkg None %} @@ -68,7 +75,7 @@ </td> <td valign="top"> <div class="listing"> - <h4>Required By:</h4> + <h4>Required By ({{pkg.get_requiredby|length}}):</h4> <ul style="font-size:small;list-style:none"> {% for req in pkg.get_requiredby %} <li><a href="{{req.get_absolute_url}}">{{ req.pkgname }}{% ifequal req.repo.name "Testing" %} (testing){% endifequal %}{% ifequal req.repo.name "Unstable" %} (unstable){% endifequal %}</a></li> |