summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.BRANDING1
-rw-r--r--main/templatetags/bugs.py6
-rw-r--r--templates/mirrors/mirror_details.html2
3 files changed, 8 insertions, 1 deletions
diff --git a/README.BRANDING b/README.BRANDING
index a3855f77..e75eaeb9 100644
--- a/README.BRANDING
+++ b/README.BRANDING
@@ -9,6 +9,7 @@ Files used to configure branding/url stuff
* `settings.py`
* `templates/templatetags/package_extras.py`
* `main/templatetags/wiki.py`
+ * `main/templatetags/bugs.py`
Files with minor Arch stuff that's just easier to patch
-------------------------------------------------------
diff --git a/main/templatetags/bugs.py b/main/templatetags/bugs.py
new file mode 100644
index 00000000..d5764435
--- /dev/null
+++ b/main/templatetags/bugs.py
@@ -0,0 +1,6 @@
+from django import template
+register = template.Library()
+
+@register.simple_tag
+def bug_link(bugid):
+ return "<a href=\"https://bugs.archlinux.org/task/"+bugid+"\">FS#"+bugid+"</a>"
diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html
index a6abcb5e..09e24925 100644
--- a/templates/mirrors/mirror_details.html
+++ b/templates/mirrors/mirror_details.html
@@ -55,7 +55,7 @@
</tr>
<tr>
<th>Flyspray Issue:</th>
- <td>{% if mirror.bug %}<a href="https://bugs.archlinux.org/task/{{ mirror.bug }}">FS#{{ mirror.bug }}</a>{% endif %}</td>
+ <td>{% if mirror.bug %}{% bug_link mirror.bug %}{% endif %}</td>
</tr>
<tr>
<th>Notes:</th>