summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/models.py6
-rw-r--r--templates/feeds/packages_title.html2
-rw-r--r--templates/packages/details.html8
-rw-r--r--templates/packages/differences.html4
-rw-r--r--templates/packages/files.html4
-rw-r--r--templates/packages/group_details.html4
-rw-r--r--templates/packages/search.html4
-rw-r--r--templates/packages/signoffs.html2
-rw-r--r--templates/public/index.html2
9 files changed, 21 insertions, 15 deletions
diff --git a/main/models.py b/main/models.py
index d0ccb12..727dc01 100644
--- a/main/models.py
+++ b/main/models.py
@@ -131,6 +131,12 @@ class Package(models.Model):
def __unicode__(self):
return self.pkgname
+ @property
+ def full_version(self):
+ if self.epoch > 0:
+ return u'%d:%s-%s' % (self.epoch, self.pkgver, self.pkgrel)
+ return u'%s-%s' % (self.pkgver, self.pkgrel)
+
def get_absolute_url(self):
return '/packages/%s/%s/%s/' % (self.repo.name.lower(),
self.arch.name, self.pkgname)
diff --git a/templates/feeds/packages_title.html b/templates/feeds/packages_title.html
index 910c620..5c54ba6 100644
--- a/templates/feeds/packages_title.html
+++ b/templates/feeds/packages_title.html
@@ -1 +1 @@
-{{ obj.pkgname }} {{ obj.pkgver }}-{{ obj.pkgrel }} {{ obj.arch.name }}
+{{ obj.pkgname }} {{ obj.full_version }} {{ obj.arch.name }}
diff --git a/templates/packages/details.html b/templates/packages/details.html
index f73e9d7..051726b 100644
--- a/templates/packages/details.html
+++ b/templates/packages/details.html
@@ -1,14 +1,14 @@
{% extends "base.html" %}
{% load cache %}
-{% block title %}Arch Linux - {{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }} - Package Details{% endblock %}
+{% block title %}Arch Linux - {{ pkg.pkgname }} {{ pkg.full_version }} - Package Details{% endblock %}
{% block navbarclass %}anb-packages{% endblock %}
{% load package_extras %}
{% block content %}
<div id="pkgdetails" class="box">
- <h2>Package Details: {{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }}</h2>
+ <h2>Package Details: {{ pkg.pkgname }} {{ pkg.full_version }}</h2>
<div id="detailslinks" class="listing">
@@ -23,7 +23,7 @@
{% with pkg.in_testing as tp %}{% if tp %}
<li><span class="flagged">Version
<a href="{{ tp.get_absolute_url }}"
- title="Testing package details for {{ tp.pkgname }}">{{ tp.pkgver }}-{{ tp.pkgrel }}</a>
+ title="Testing package details for {{ tp.pkgname }}">{{ tp.full_version }}</a>
in testing</span></li>
{% endif %}{% endwith %}
{% if perms.main.change_package %}
@@ -58,7 +58,7 @@
<ul>
{% for o in others %}
<li><a href="{{ o.get_absolute_url }}"
- title="Package details for {{ o.pkgname }}">{{ o.pkgname }} {{ o.pkgver }}-{{ o.pkgrel }} [{{ o.repo.name|lower }}] ({{ o.arch.name }})</a></li>
+ title="Package details for {{ o.pkgname }}">{{ o.pkgname }} {{ o.full_version }} [{{ o.repo.name|lower }}] ({{ o.arch.name }})</a></li>
{% endfor %}
</ul>
</div>
diff --git a/templates/packages/differences.html b/templates/packages/differences.html
index b2a1be0..dd1046b 100644
--- a/templates/packages/differences.html
+++ b/templates/packages/differences.html
@@ -45,12 +45,12 @@
{% if diff.pkg_a %}
<td><a href="{{ diff.pkg_a.get_absolute_url }}"
title="View package details for {{ diff.pkg_a.pkgname }}">
- <span{% if diff.pkg_a.flag_date %} class="flagged"{% endif %}>{{ diff.pkg_a.pkgver }}-{{ diff.pkg_a.pkgrel }}</span></a></td>
+ <span{% if diff.pkg_a.flag_date %} class="flagged"{% endif %}>{{ diff.pkg_a.full_version }}</span></a></td>
{% else %}<td>-</td>{% endif %}
{% if diff.pkg_b %}
<td><a href="{{ diff.pkg_b.get_absolute_url }}"
title="View package details for {{ diff.pkg_b.pkgname }}">
- <span{% if diff.pkg_b.flag_date %} class="flagged"{% endif %}>{{ diff.pkg_b.pkgver }}-{{ diff.pkg_b.pkgrel }}</span></a></td>
+ <span{% if diff.pkg_b.flag_date %} class="flagged"{% endif %}>{{ diff.pkg_b.full_version }}</span></a></td>
{% else %}<td>-</td>{% endif %}
</tr>
{% endfor %}
diff --git a/templates/packages/files.html b/templates/packages/files.html
index 5e0ceb0..362e62c 100644
--- a/templates/packages/files.html
+++ b/templates/packages/files.html
@@ -1,11 +1,11 @@
{% extends "base.html" %}
-{% block title %}Arch Linux - {{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }} - Package File List{% endblock %}
+{% block title %}Arch Linux - {{ pkg.pkgname }} {{ pkg.full_version }} - Package File List{% endblock %}
{% block navbarclass %}anb-packages{% endblock %}
{% block content %}
<div id="pkgdetails" class="box">
- <h2>Package File List: {{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }}</h2>
+ <h2>Package File List: {{ pkg.pkgname }} {{ pkg.full_version }}</h2>
<div id="metadata">
<p><a href="{{ pkg.get_absolute_url }}">Back to Package</a></p>
{% include "packages/files-list.html" %}
diff --git a/templates/packages/group_details.html b/templates/packages/group_details.html
index 9cfa7b7..b40c21d 100644
--- a/templates/packages/group_details.html
+++ b/templates/packages/group_details.html
@@ -24,9 +24,9 @@
<td><a href="{{ pkg.get_absolute_url }}"
title="Package details for {{ pkg.pkgname }}">{{ pkg.pkgname }}</a></td>
{% if pkg.flag_date %}
- <td><span class="flagged">{{ pkg.pkgver }}-{{ pkg.pkgrel }}</span></td>
+ <td><span class="flagged">{{ pkg.full_version }}</span></td>
{% else %}
- <td>{{ pkg.pkgver }}-{{ pkg.pkgrel }}</td>
+ <td>{{ pkg.full_version }}</td>
{% endif %}
<td class="wrap">{{ pkg.pkgdesc }}</td>
<td>{{ pkg.last_update|date }}</td>
diff --git a/templates/packages/search.html b/templates/packages/search.html
index 5d0de1f..8ea53b8 100644
--- a/templates/packages/search.html
+++ b/templates/packages/search.html
@@ -99,9 +99,9 @@
<td><a href="{{ pkg.get_absolute_url }}"
title="Package details for {{ pkg.pkgname }}">{{ pkg.pkgname }}</a></td>
{% if pkg.flag_date %}
- <td><span class="flagged">{{ pkg.pkgver }}-{{ pkg.pkgrel }}</span></td>
+ <td><span class="flagged">{{ pkg.full_version }}</span></td>
{% else %}
- <td>{{ pkg.pkgver }}-{{ pkg.pkgrel }}</td>
+ <td>{{ pkg.full_version }}</td>
{% endif %}
<td class="wrap">{{ pkg.pkgdesc }}</td>
<td>{{ pkg.last_update|date }}</td>
diff --git a/templates/packages/signoffs.html b/templates/packages/signoffs.html
index 0cb7679..b718403 100644
--- a/templates/packages/signoffs.html
+++ b/templates/packages/signoffs.html
@@ -26,7 +26,7 @@
<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.pkgver }}-{{ pkg.pkgrel }}</td>
+ <td>{{ pkg.full_version }}</td>
<td>{{ pkg.last_update }}</td>
<td>{{ target }}</td>
<td class="signoff-{{pkg.approved_for_signoff|yesno}}">
diff --git a/templates/public/index.html b/templates/public/index.html
index c903b23..91a8414 100644
--- a/templates/public/index.html
+++ b/templates/public/index.html
@@ -82,7 +82,7 @@
{% for update in pkg_updates %}
{% with update|first as fpkg %}
<tr>
- <td class="pkg-name"><span class="{{ fpkg.repo|lower }}">{{ fpkg.pkgname }} {{ fpkg.pkgver }}-{{ fpkg.pkgrel }}</span></td>
+ <td class="pkg-name"><span class="{{ fpkg.repo|lower }}">{{ fpkg.pkgname }} {{ fpkg.full_version }}</span></td>
<td class="pkg-arch">
{% for pkg in update %}<a href="{{ pkg.get_absolute_url }}"
title="Details for {{ pkg.pkgname }} [{{ pkg.repo|lower }}]">{{ pkg.arch }}</a>{% if not forloop.last %}/{% endif %}{% endfor %}