summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/templatetags/package_extras.py15
-rw-r--r--templates/packages/details.html4
2 files changed, 16 insertions, 3 deletions
diff --git a/packages/templatetags/package_extras.py b/packages/templatetags/package_extras.py
index 67c7fbb..3eb7578 100644
--- a/packages/templatetags/package_extras.py
+++ b/packages/templatetags/package_extras.py
@@ -61,7 +61,7 @@ def multi_pkg_details(pkgs):
return ', '.join([pkg_details_link(pkg) for pkg in pkgs])
@register.simple_tag
-def userpkgs(user):
+def maintainer_link(user):
if user:
# TODO don't hardcode
title = escape('View packages maintained by ' + user.get_full_name())
@@ -73,6 +73,19 @@ def userpkgs(user):
return ''
@register.simple_tag
+def packager_link(user):
+ if user:
+ # TODO don't hardcode
+ title = escape('View packages packaged by ' + user.get_full_name())
+ return '<a href="/packages/?packager=%s" title="%s">%s</a>' % (
+ user.username,
+ title,
+ user.get_full_name(),
+ )
+ return ''
+
+
+@register.simple_tag
def scm_link(package, operation):
parts = (package.repo.svn_root, operation, package.pkgbase)
linkbase = (
diff --git a/templates/packages/details.html b/templates/packages/details.html
index a990801..ef6ee98 100644
--- a/templates/packages/details.html
+++ b/templates/packages/details.html
@@ -137,7 +137,7 @@
{% with pkg.maintainers as maints %}
<td>{% if maints %}
{% for m in maints %}
- {% userpkgs m %}<br/>
+ {% maintainer_link m %}<br/>
{% endfor %}
{% else %}Orphan{% endif %}
</td>
@@ -150,7 +150,7 @@
<td>{{ pkg.installed_size|filesizeformat }}</td>
</tr><tr>
<th>Last Packager:</th>
- <td>{% with pkg.packager as pkgr %}{% if pkgr %}{% userpkgs pkgr %}{% else %}{{ pkg.packager_str }}{% endif %}{% endwith %}</td>
+ <td>{% with pkg.packager as pkgr %}{% if pkgr %}{% packager_link pkgr %}{% else %}{{ pkg.packager_str }}{% endif %}{% endwith %}</td>
</tr><tr>
<th>Signed:</th>
<td>{{ pkg.is_signed|yesno|capfirst }}</td>