summaryrefslogtreecommitdiff
path: root/packages/templatetags/jinja2.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/templatetags/jinja2.py')
-rw-r--r--packages/templatetags/jinja2.py46
1 files changed, 33 insertions, 13 deletions
diff --git a/packages/templatetags/jinja2.py b/packages/templatetags/jinja2.py
index 88b59a96..f0b42a09 100644
--- a/packages/templatetags/jinja2.py
+++ b/packages/templatetags/jinja2.py
@@ -31,40 +31,60 @@ def pgp_key_link(key_id, link_text=None):
@library.global_function
def scm_link(package, operation):
- parts = (package.repo.svn_root, operation, package.pkgbase)
+ parts = ("abslibre", operation, package.repo.name.lower(), package.pkgbase)
linkbase = (
- "https://projects.archlinux.org/svntogit/%s.git/%s/trunk?"
- "h=packages/%s")
+ "https://projects.parabola.nu/%s.git/%s/%s/%s")
return linkbase % tuple(urlquote(part.encode('utf-8')) for part in parts)
@library.global_function
def wiki_link(package):
- url = "https://wiki.archlinux.org/index.php/Special:Search"
+ url = "https://wiki.parabola.nu/index.php"
data = {
+ 'title': "Special:Search",
'search': package.pkgname,
}
return link_encode(url, data)
-
@library.global_function
def bugs_list(package):
- url = "https://bugs.archlinux.org/"
+ if package.arch.name == 'mips64el':
+ project = "mips64el"
+ else:
+ project = "issue-tracker"
+ url = "https://labs.parabola.nu/projects/%s/search" % project
data = {
- 'project': package.repo.bugs_project,
- 'cat[]': package.repo.bugs_category,
- 'string': package.pkgname,
+ 'titles_only': '1',
+ 'issues': '1',
+ 'q': package.pkgname,
}
return link_encode(url, data)
@library.global_function
def bug_report(package):
- url = "https://bugs.archlinux.org/newtask"
+ url = "https://labs.parabola.nu/projects/"
+ if package.arch.name == 'mips64el':
+ url = url + "mips64el/issues/new"
+ else:
+ url = url + "issue-tracker/issues/new"
+ data = {
+ 'issue[subject]': '[%s] PLEASE ENTER SUMMARY' % package.pkgname,
+ }
+ return link_encode(url, data)
+
+@library.global_function
+def flag_unfree(package):
+ url = "https://labs.parabola.nu/projects/"
+ if package.arch.name == 'mips64el':
+ url = url + "mips64el/issues/new"
+ else:
+ url = url + "issue-tracker/issues/new"
data = {
- 'project': package.repo.bugs_project,
- 'product_category': package.repo.bugs_category,
- 'item_summary': '[%s] PLEASE ENTER SUMMARY' % package.pkgname,
+ 'issue[tracker_id]': '4', # "freedom issue"
+ 'issue[priority_id]': '1', # "freedom issue"
+ 'issue[watcher_user_ids][]': '62', # "dev-list"
+ 'issue[subject]': '[%s] Please put your reasons here (register first if you haven\'t)' % package.pkgname,
}
return link_encode(url, data)