summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/models.py11
-rw-r--r--sitestatic/archweb.css5
-rw-r--r--templates/packages/details.html5
3 files changed, 21 insertions, 0 deletions
diff --git a/main/models.py b/main/models.py
index d72f2c0..15a9266 100644
--- a/main/models.py
+++ b/main/models.py
@@ -312,6 +312,17 @@ class Package(models.Model):
repo__testing=self.repo.testing, repo__staging=self.repo.staging,
pkgbase=self.pkgbase).exclude(id=self.id)
+ def flag_request(self):
+ if not self.flag_date:
+ return None
+ from packages.models import FlagRequest
+ try:
+ request = FlagRequest.objects.filter(pkgbase=self.pkgbase,
+ repo=self.repo).latest()
+ return request
+ except FlagRequest.DoesNotExist:
+ return None
+
def is_same_version(self, other):
'is this package similar, name and version-wise, to another'
return self.pkgname == other.pkgname \
diff --git a/sitestatic/archweb.css b/sitestatic/archweb.css
index 46fd784..d653d98 100644
--- a/sitestatic/archweb.css
+++ b/sitestatic/archweb.css
@@ -728,6 +728,11 @@ div#pkglist-about {
padding: 0.25em 0 0.25em 1.5em;
}
+ #pkgdetails #pkginfo .userdata {
+ font-size: 0.85em;
+ padding: 0.5em;
+ }
+
/* pkgdetails: flag package */
form#flag-pkg-form label {
width: 10em;
diff --git a/templates/packages/details.html b/templates/packages/details.html
index f68aefa..fd7bea4 100644
--- a/templates/packages/details.html
+++ b/templates/packages/details.html
@@ -161,6 +161,11 @@
<th>Last Updated:</th>
<td>{{ pkg.last_update|date }}</td>
</tr>
+ {% if user.is_authenticated %}{% with pkg.flag_request as flag_request %}{% if flag_request %}<tr>
+ <th>Last Flag Request:</th>
+ <td>From {{ flag_request.who }} on {{ flag_request.created|date }}:<br/>
+ <div class="userdata">{{ flag_request.message|linebreaksbr|default:"{no message}" }}</div></td>
+ </tr>{% endif %}{% endwith %}{% endif %}
</table>
<div id="metadata">