diff options
author | Dan McGee <dan@archlinux.org> | 2010-08-04 07:00:41 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-08-04 07:00:41 -0500 |
commit | d993e1f1a85973d759dd2eb4b1418c583fbbafa1 (patch) | |
tree | 7f39af8155686cd24f4bd0ed48bfea153303fada | |
parent | 97322236b05c6988eccda2ddc9d48a2d1308c4a0 (diff) |
Add a title to the userpkgs link
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | packages/templatetags/package_extras.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/templatetags/package_extras.py b/packages/templatetags/package_extras.py index 66ba31a7..3cd2b91b 100644 --- a/packages/templatetags/package_extras.py +++ b/packages/templatetags/package_extras.py @@ -1,5 +1,6 @@ import cgi, urllib from django import template +from django.utils.html import escape register = template.Library() @@ -47,8 +48,12 @@ class UserPkgsNode(template.Node): try: real_user = self.user.resolve(context) # TODO don't hardcode - return '<a href="/packages/search/?maintainer=%s">%s</a>' % ( - real_user.username, real_user.get_full_name()) + title = escape('View packages maintained by ' + real_user.get_full_name()) + return '<a href="/packages/search/?maintainer=%s" title="%s">%s</a>' % ( + real_user.username, + title, + real_user.get_full_name(), + ) except template.VariableDoesNotExist: return '' pass |