diff options
-rw-r--r-- | packages/templatetags/package_extras.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/templatetags/package_extras.py b/packages/templatetags/package_extras.py index e089b723..14a519d4 100644 --- a/packages/templatetags/package_extras.py +++ b/packages/templatetags/package_extras.py @@ -37,6 +37,11 @@ def do_buildsortqs(parser, token): return BuildQueryStringNode(sortfield[1:-1]) @register.simple_tag +def pkg_details_link(pkg): + template = '<a href="%s" title="View package details for %s">%s</a>' + return template % (pkg.get_absolute_url(), pkg.pkgname, pkg.pkgname) + +@register.simple_tag def userpkgs(user): if user: # TODO don't hardcode @@ -48,7 +53,6 @@ def userpkgs(user): ) return '' - def svn_link(package, svnpath): '''Helper function for the two real SVN link methods.''' parts = (package.repo.svn_root, package.pkgbase, svnpath) |