summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/models.py9
-rw-r--r--templates/packages/details.html2
2 files changed, 10 insertions, 1 deletions
diff --git a/main/models.py b/main/models.py
index 336f0ecf..8d5da3bc 100644
--- a/main/models.py
+++ b/main/models.py
@@ -260,6 +260,15 @@ class Package(models.Model):
root = 'packages'
return linkbase % (root, dirname, repo, self.arch.name)
+ def get_bugs_link(self):
+ repo = self.repo.name.lower()
+ if repo.startswith('community'):
+ project = 5
+ else:
+ project = 1
+ return "http://bugs.archlinux.org/?project=%d&string=%s" % \
+ (project, self.pkgname)
+
class Signoff(models.Model):
pkg = models.ForeignKey(Package)
diff --git a/templates/packages/details.html b/templates/packages/details.html
index 39cba672..90bef992 100644
--- a/templates/packages/details.html
+++ b/templates/packages/details.html
@@ -7,7 +7,7 @@
<div style="float:right" class="listing">
<ul class="small">
<li><a href="{{ pkg.get_svn_link }}">View SVN Entries</a></li>
- <li><a href="http://bugs.archlinux.org/?string={{ pkg.pkgname }}">Bug Reports</a></li>
+ <li><a href="{{ pkg.get_bugs_link }}">Bug Reports</a></li>
<!-- <li><a href="/packages/files/{{ pkg.id }}/">View File List</a></li> -->
<li>
{% if pkg.needupdate %}