summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergej Pupykin <sergej@home.sergej.pp.ru>2011-08-13 00:23:36 +0400
committerDan McGee <dan@archlinux.org>2011-08-16 15:02:04 -0500
commit0df3567ae25bb2856bc62951844d9dab5ea97990 (patch)
treec3696fc4dbb673906698a25d86e12785d7f1b271
parentf7626c05719ebb4362836d2ba7e1d297bd8a92a6 (diff)
add "search wiki" link to package details page
Dan: fix usage of urlencode() function. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--packages/templatetags/package_extras.py8
-rw-r--r--templates/packages/details.html1
2 files changed, 9 insertions, 0 deletions
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
@@ -73,6 +73,14 @@ 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 = {
'project': package.repo.bugs_project,
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 @@
<ul class="small">
<li><a href="{% svn_arch pkg %}" title="View SVN entries in the {{pkg.repo|lower}}-{{pkg.arch}} branch">SVN Entries ({{pkg.repo|lower}}-{{pkg.arch}})</a></li>
<li><a href="{% svn_trunk pkg %}" title="View SVN entries on trunk">SVN Entries (trunk)</a></li>
+ <li><a href="{% get_wiki_link pkg %}" title="Search wiki for {{ pkg.pkgname }}">Search Wiki</a></li>
<li><a href="{% bugs_list pkg %}" title="View existing bug tickets for {{ pkg.pkgname }}">Bug Reports</a></li>
<li><a href="{% bug_report pkg %}" title="Report bug for {{ pkg.pkgname }}">Report a Bug</a></li>
{% if pkg.flag_date %}