summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-08-09 23:16:00 -0500
committerDan McGee <dan@archlinux.org>2011-08-09 23:16:00 -0500
commit156b91eb5935df4afdb8f0f0311d36537808c2f5 (patch)
tree2909539c99d6f71c547d8e501f9fa1ba9c424618 /templates
parent21461e78608bb687d7101dd55e72d44cbebf2ff6 (diff)
Use new package details link tag in templates
This replaces a lot of boilerplate we had everywhere, and makes sure things like the title are consistent across all links. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates')
-rw-r--r--templates/devel/index.html7
-rw-r--r--templates/devel/packages.html4
-rw-r--r--templates/packages/details.html17
-rw-r--r--templates/packages/flag.html4
-rw-r--r--templates/packages/flag_confirmed.html8
-rw-r--r--templates/packages/flagged.html7
-rw-r--r--templates/packages/packages_list.html5
-rw-r--r--templates/packages/search.html3
-rw-r--r--templates/packages/signoffs.html5
-rw-r--r--templates/todolists/public_list.html4
-rw-r--r--templates/todolists/view.html5
11 files changed, 32 insertions, 37 deletions
diff --git a/templates/devel/index.html b/templates/devel/index.html
index ad101145..0c818d36 100644
--- a/templates/devel/index.html
+++ b/templates/devel/index.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load cache %}
+{% load package_extras %}
{% block title %}Arch Linux - Developer Dashboard{% endblock %}
@@ -24,8 +25,7 @@
<tbody>
{% for pkg in flagged %}
<tr class="{% cycle 'odd' 'even' %}">
- <td><a href="{{ pkg.get_absolute_url }}"
- title="View package details for {{ pkg.pkgname }}">{{ pkg.pkgname }}</a></td>
+ <td>{% pkg_details_link pkg %}</td>
<td>{{ pkg.repo.name }}</td>
<td>{{ pkg.full_version }}</td>
<td>{{ pkg.arch.name }}</td>
@@ -55,8 +55,7 @@
<tr class="{% cycle 'odd' 'even' %}">
<td><a href="{{ todopkg.list.get_absolute_url }}"
title="View todo list: {{ todopkg.list.name }}">{{ todopkg.list.name }}</a></td>
- <td><a href="{{ todopkg.pkg.get_absolute_url }}"
- title="View package details for {{ todopkg.pkg.pkgname }}">{{ todopkg.pkg.pkgname }}</a></td>
+ <td>{% pkg_details_link todopkg.pkg %}</td>
<td>{{ todopkg.pkg.repo.name }}</td>
<td>{{ todopkg.pkg.arch.name }}</td>
<td>{{ todopkg.pkg.maintainers|join:', ' }}</td>
diff --git a/templates/devel/packages.html b/templates/devel/packages.html
index a9553d70..9f01167c 100644
--- a/templates/devel/packages.html
+++ b/templates/devel/packages.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load attributes %}
+{% load package_extras %}
{% block title %}Arch Linux - {{ title }}{% endblock %}
@@ -32,8 +33,7 @@
<tr class="{% cycle pkgr2,pkgr1 %}">
<td>{{ pkg.arch.name }}</td>
<td>{{ pkg.repo.name|capfirst }}</td>
- <td><a href="{{ pkg.get_absolute_url }}"
- title="Package details for {{ pkg.pkgname }}">{{ pkg.pkgname }}</a></td>
+ <td>{% pkg_details_link pkg %}</td>
{% if pkg.flag_date %}
<td><span class="flagged">{{ pkg.full_version }}</span></td>
{% else %}
diff --git a/templates/packages/details.html b/templates/packages/details.html
index 7972b9ab..8e3c0022 100644
--- a/templates/packages/details.html
+++ b/templates/packages/details.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load cache %}
+{% load package_extras %}
{% block title %}Arch Linux - {{ pkg.pkgname }} {{ pkg.full_version }} - Package Details{% endblock %}
{% block navbarclass %}anb-packages{% endblock %}
@@ -82,20 +83,14 @@
{% with pkg.split_packages as splits %}{% if splits %}
<tr>
<th>Split Packages:</th>
- <td>
- {% for s in splits %}
- <a href="{{ s.get_absolute_url }}"
- title="Package details for {{ s.pkgname }}">{{ s.pkgname }}</a><br/>
- {% endfor %}
- </td>
+ <td>{% for s in splits %}{% pkg_details_link s %}<br/>{% endfor %}</td>
</tr>
{% endif %}{% endwith %}
{% else %}
<tr>
<th>Base Package:</th>
{% if pkg.base_package %}
- <td><a href="{{ pkg.base_package.get_absolute_url }}"
- title="Package details for {{ pkg.base_package.pkgname }}">{{ pkg.pkgbase }}</a></td>
+ <td>{% pkg_details_link pkg.base_package %}</td>
{% else %}
<td><a href="../{{ pkg.pkgbase }}/"
title="Split package details for {{ pkg.pkgbase }}">{{ pkg.pkgbase }}</a></td>
@@ -165,8 +160,7 @@
{% ifequal depend.pkg None %}
<li>{{ depend.dep.depname }} <span class="virtual-dep">(virtual)</span></li>
{% else %}
- <li><a href="{{ depend.pkg.get_absolute_url }}"
- title="View package details for {{ depend.dep.depname }}">{{ depend.dep.depname }}</a>{{ depend.dep.depvcmp|default:"" }}
+ <li>{% pkg_details_link depend.pkg %}{{ depend.dep.depvcmp|default:"" }}
{% if depend.pkg.repo.testing %}<span class="testing-dep">(testing)</span>{% endif %}
{% if depend.dep.optional %}<span class="opt-dep">(optional)</span>{% endif %}
{% if depend.dep.description %}- <span class="dep-desc">{{ depend.dep.description }}</span>{% endif %}
@@ -188,8 +182,7 @@
{% if rqdby %}
<ul>
{% for req in rqdby %}
- <li><a href="{{ req.pkg.get_absolute_url }}"
- title="View package details for {{ req.pkg.pkgname }}">{{ req.pkg.pkgname }}</a>
+ <li>{% pkg_details_link req.pkg %}
{% if req.pkg.repo.testing %}<span class="testing-dep">(testing)</span>{% endif %}
{% if req.optional %}<span class="opt-dep">(optional)</span>{% endif %}
</li>
diff --git a/templates/packages/flag.html b/templates/packages/flag.html
index 4a3c6966..261d6066 100644
--- a/templates/packages/flag.html
+++ b/templates/packages/flag.html
@@ -1,4 +1,6 @@
{% extends "base.html" %}
+{% load package_extras %}
+
{% block title %}Arch Linux - Flag Package - {{ package.pkgname }}{% endblock %}
{% block navbarclass %}anb-packages{% endblock %}
@@ -13,7 +15,7 @@
<p>Note that all of the following packages will be marked out of date:</p>
<ul>
{% for pkg in packages %}
- <li>{{ pkg.pkgname }} {{ pkg.full_version }} [{{ pkg.repo.name|lower }}] ({{ pkg.arch.name }})</li>
+ <li>{% pkg_details_link pkg %} {{ pkg.full_version }} [{{ pkg.repo.name|lower }}] ({{ pkg.arch.name }})</li>
{% endfor %}
</ul>
diff --git a/templates/packages/flag_confirmed.html b/templates/packages/flag_confirmed.html
index 9ef316cb..398212f8 100644
--- a/templates/packages/flag_confirmed.html
+++ b/templates/packages/flag_confirmed.html
@@ -1,4 +1,6 @@
{% extends "base.html" %}
+{% load package_extras %}
+
{% block title %}Arch Linux - Package Flagged - {{ package.pkgname }}{% endblock %}
{% block navbarclass %}anb-packages{% endblock %}
@@ -9,12 +11,10 @@
<p>Thank you, the maintainers have been notified the following packages are out-of-date:</p>
<ul>
{% for pkg in packages %}
- <li><a href="{{ pkg.get_absolute_url }}"
- title="Package details for {{package.pkgname}}">{{ pkg.pkgname }} {{ pkg.full_version }}</a> [{{ pkg.repo.name|lower }}] ({{ pkg.arch.name }})</li>
+ <li>{% pkg_details_link pkg %} {{ pkg.full_version }} [{{ pkg.repo.name|lower }}] ({{ pkg.arch.name }})</li>
{% endfor %}
</ul>
- <p>You can return to the package details page for
- <a href="{{ package.get_absolute_url }}" title="Package details for {{package.pkgname}}">{{package.pkgname}}</a>.</p>
+ <p>You can return to the package details page for {% pkg_details_link package %}.</p>
</div>
{% endblock %}
diff --git a/templates/packages/flagged.html b/templates/packages/flagged.html
index 3a39d178..a99a6924 100644
--- a/templates/packages/flagged.html
+++ b/templates/packages/flagged.html
@@ -1,16 +1,15 @@
{% extends "base.html" %}
+{% load package_extras %}
+
{% block title %}Arch Linux - Flag Package - {{ pkg.pkgname }}{% endblock %}
{% block navbarclass %}anb-packages{% endblock %}
{% block content %}
<div id="pkg-flagged-error" class="box">
-
<h2>Error: Package already flagged</h2>
<p><strong>{{pkg.pkgname}}</strong> has already been flagged out-of-date.</p>
- <p>You can return to the package details page for
- <a href="{{ pkg.get_absolute_url }}" title="Package details for {{pkg.pkgname}}">{{pkg.pkgname}}</a>.</p>
-
+ <p>You can return to the package details page for {% pkg_details_link pkg %}.</p>
</div>
{% endblock %}
diff --git a/templates/packages/packages_list.html b/templates/packages/packages_list.html
index ccc091d8..942e1073 100644
--- a/templates/packages/packages_list.html
+++ b/templates/packages/packages_list.html
@@ -1,4 +1,6 @@
{% extends "base.html" %}
+{% load package_extras %}
+
{% block title %}Arch Linux - {{ name }} ({{ arch.name }}) - {{ list_title }}{% endblock %}
{% block navbarclass %}anb-packages{% endblock %}
@@ -23,8 +25,7 @@
<tr class="{% cycle 'odd' 'even' %}">
<td>{{ pkg.arch.name }}</td>
<td>{{ pkg.repo.name|capfirst }}</td>
- <td><a href="{{ pkg.get_absolute_url }}"
- title="Package details for {{ pkg.pkgname }}">{{ pkg.pkgname }}</a></td>
+ <td>{% pkg_details_link pkg %}</td>
{% if pkg.flag_date %}
<td><span class="flagged">{{ pkg.full_version }}</span></td>
{% else %}
diff --git a/templates/packages/search.html b/templates/packages/search.html
index 381ebb01..eb4aceca 100644
--- a/templates/packages/search.html
+++ b/templates/packages/search.html
@@ -104,8 +104,7 @@
{% endif %}
<td>{{ pkg.arch.name }}</td>
<td>{{ pkg.repo.name|capfirst }}</td>
- <td><a href="{{ pkg.get_absolute_url }}"
- title="Package details for {{ pkg.pkgname }}">{{ pkg.pkgname }}</a></td>
+ <td>{% pkg_details_link pkg %}</td>
{% if pkg.flag_date %}
<td><span class="flagged">{{ pkg.full_version }}</span></td>
{% else %}
diff --git a/templates/packages/signoffs.html b/templates/packages/signoffs.html
index 6014396c..baf85338 100644
--- a/templates/packages/signoffs.html
+++ b/templates/packages/signoffs.html
@@ -1,4 +1,6 @@
{% extends "base.html" %}
+{% load package_extras %}
+
{% block title %}Arch Linux - Package Signoffs{% endblock %}
{% block navbarclass %}anb-packages{% endblock %}
@@ -28,8 +30,7 @@
{% with group.package as pkg %}
<tr class="{% cycle 'odd' 'even' %}">
<td>{{ pkg.arch.name }}</td>
- <td><a href="{{ pkg.get_absolute_url }}"
- title="View package details for {{ pkg.pkgname }}">{{ pkg.pkgname }}</a></td>
+ <td>{% pkg_details_link pkg %}</td>
<td>{{ group.packages|length }}</td>
<td>{{ pkg.full_version }}</td>
<td>{{ pkg.last_update|date }}</td>
diff --git a/templates/todolists/public_list.html b/templates/todolists/public_list.html
index 0d14250d..c3054863 100644
--- a/templates/todolists/public_list.html
+++ b/templates/todolists/public_list.html
@@ -1,4 +1,5 @@
{% extends "base.html" %}
+{% load package_extras %}
{% block title %}Arch Linux - Todo Lists{% endblock %}
@@ -43,8 +44,7 @@
<tbody>
{% for pkg in list.packages %}
<tr class="{% cycle 'odd' 'even' %}">
- <td><a href="{{ pkg.pkg.get_absolute_url }}"
- title="View package details for {{ pkg.pkg.pkgname }}">{{ pkg.pkg.pkgname }}</a></td>
+ <td>{% pkg_details_link pkg.pkg %}</td>
<td>{{ pkg.pkg.arch.name }}</td>
<td>{{ pkg.pkg.repo.name|capfirst }}</td>
<td>{{ pkg.pkg.maintainers|join:', ' }}</td>
diff --git a/templates/todolists/view.html b/templates/todolists/view.html
index 9a6e3c0f..8f515c9b 100644
--- a/templates/todolists/view.html
+++ b/templates/todolists/view.html
@@ -1,4 +1,6 @@
{% extends "base.html" %}
+{% load package_extras %}
+
{% block title %}Arch Linux - Todo: {{ list.name }}{% endblock %}
{% block content %}
@@ -34,8 +36,7 @@
<tbody>
{% for pkg in list.packages %}
<tr class="{% cycle 'odd' 'even' %}">
- <td><a href="{{ pkg.pkg.get_absolute_url }}"
- title="View package details for {{ pkg.pkg.pkgname }}">{{ pkg.pkg.pkgname }}</a></td>
+ <td>{% pkg_details_link pkg.pkg %}</td>
<td>{{ pkg.pkg.arch.name }}</td>
<td>{{ pkg.pkg.repo.name|capfirst }}</td>
<td>{{ pkg.pkg.maintainers|join:', ' }}</td>