summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/templatetags/package_extras.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/packages/templatetags/package_extras.py b/packages/templatetags/package_extras.py
index c8c88ca7..011e9cea 100644
--- a/packages/templatetags/package_extras.py
+++ b/packages/templatetags/package_extras.py
@@ -73,6 +73,18 @@ def userpkgs(user):
return ''
@register.simple_tag
+def get_download_link(package):
+ parts = {
+ "repo": package.repo.name.lower(),
+ "arch": package.arch.name,
+ "pkgfile": package.filename
+ }
+ if parts["arch"] == "any":
+ parts["arch"] = "i686"
+ linkbase = "//repo.parabolagnulinux.org/%(repo)s/os/%(arch)s/%(pkgfile)s"
+ return linkbase % parts
+
+@register.simple_tag
def get_wiki_link(package):
url = "//wiki.parabolagnulinux.org/index.php"
data = {
@@ -92,7 +104,7 @@ def svn_trunk(package):
@register.simple_tag
def bugs_list(package):
- url = "//bugs.parabolagnulinux.org/bugs/issue?"
+ url = "//bugs.parabolagnulinux.org/bugs/issue"
data = {
'@action': 'search',
'title': package.pkgname,
@@ -101,7 +113,7 @@ def bugs_list(package):
@register.simple_tag
def bug_report(package):
- url = "//bugs.parabolagnulinux.org/bugs/issue?"
+ url = "//bugs.parabolagnulinux.org/bugs/issue"
data = {
'@template': 'item',
'keyword': 'packages',