summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngel Velásquez <angvp@archlinux.org>2017-07-24 09:56:13 -0400
committerGitHub <noreply@github.com>2017-07-24 09:56:13 -0400
commit1047d6ee351680c33148246378bebaed35d0a501 (patch)
tree3162b685eee098be369307cd714a29b01ac5ad73
parentb92abb9b80cdbb0df625a8a781920f5277025c21 (diff)
parent0db6504cdc7d1fd9ac68257b1c8d308e7a6adaef (diff)
downloadarchweb-1047d6ee351680c33148246378bebaed35d0a501.tar.gz
archweb-1047d6ee351680c33148246378bebaed35d0a501.zip
Merge pull request #53 from jelly/security_issue_linkrelease_2017-08-12
Add a security link to package details
-rw-r--r--main/templatetags/details_link.py4
-rw-r--r--templates/packages/package_details.html1
2 files changed, 5 insertions, 0 deletions
diff --git a/main/templatetags/details_link.py b/main/templatetags/details_link.py
index b94f8487..07fbe108 100644
--- a/main/templatetags/details_link.py
+++ b/main/templatetags/details_link.py
@@ -57,6 +57,10 @@ def wiki_link(package):
}
return link_encode(url, data)
+@register.simple_tag
+def sec_link(package):
+ url = "https://security.archlinux.org/package/{}"
+ return url.format(package.pkgname)
@register.simple_tag
def pgp_key_link(key_id, link_text=None):
diff --git a/templates/packages/package_details.html b/templates/packages/package_details.html
index 3516005b..25fa99da 100644
--- a/templates/packages/package_details.html
+++ b/templates/packages/package_details.html
@@ -15,6 +15,7 @@
<a href="{% bug_report pkg %}" title="Report new bug for {{ pkg.pkgname }}">Add New Bug</a>
</li>
<li><a href="{% wiki_link pkg %}" title="Search wiki for {{ pkg.pkgname }}">Search Wiki</a></li>
+ <li><a href="{% sec_link pkg %}" title="View security issues for {{ pkg.pkgname }}">Security Issues</a></li>
{% if pkg.flag_date %}
<li><span class="flagged">Flagged out-of-date on {{ pkg.flag_date|date }}</span></li>
{% with tp=pkg.in_testing %}{% if tp %}