summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-12-03 19:50:55 +0100
committerDan McGee <dan@archlinux.org>2011-12-03 19:50:55 +0100
commitff371bd37628ab6f66cf4add79bb67c276e49035 (patch)
tree908054f7a59123410e3e44a16597251f5610f170 /packages
parent7911fd4ef7a0aece6f0b1963e6513d741382cd0d (diff)
downloadarchweb-ff371bd37628ab6f66cf4add79bb67c276e49035.tar.gz
archweb-ff371bd37628ab6f66cf4add79bb67c276e49035.tar.xz
Convert packager link to search by packager
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages')
-rw-r--r--packages/templatetags/package_extras.py15
1 files changed, 14 insertions, 1 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 = (