From 0df3567ae25bb2856bc62951844d9dab5ea97990 Mon Sep 17 00:00:00 2001 From: Sergej Pupykin Date: Sat, 13 Aug 2011 00:23:36 +0400 Subject: add "search wiki" link to package details page Dan: fix usage of urlencode() function. Signed-off-by: Dan McGee --- packages/templatetags/package_extras.py | 8 ++++++++ templates/packages/details.html | 1 + 2 files changed, 9 insertions(+) diff --git a/packages/templatetags/package_extras.py b/packages/templatetags/package_extras.py index 7bc868de..e4c7a010 100644 --- a/packages/templatetags/package_extras.py +++ b/packages/templatetags/package_extras.py @@ -72,6 +72,14 @@ def svn_arch(package): def svn_trunk(package): return svn_link(package, "trunk") +@register.simple_tag +def get_wiki_link(package): + data = { + 'search': package.pkgname, + } + return "https://wiki.archlinux.org/index.php/Special:Search?%s" % \ + urlencode(data) + @register.simple_tag def bugs_list(package): data = { diff --git a/templates/packages/details.html b/templates/packages/details.html index a3f2cef4..bec4bdff 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -18,6 +18,7 @@

Package Actions