summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-12-22 20:08:58 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-12-22 20:08:58 -0500
commitd3c35bc608b6eaf299e66146e1aab76d43b69211 (patch)
tree8247379f7a68391a4a5db7f8f7a80756ee7b9f87 /packages
parentb2b6c78e3179cef66cd4e9dcea7f9003f409ce8b (diff)
parent9adc2e53124daa6d13090166830396ffff9013d3 (diff)
Merge tag 'release_2013-11-30' into archweb-generic
End of month release, perf fixes
Diffstat (limited to 'packages')
-rw-r--r--packages/admin.py12
-rw-r--r--packages/templatetags/package_extras.py7
2 files changed, 9 insertions, 10 deletions
diff --git a/packages/admin.py b/packages/admin.py
index 4680c755..5df0043a 100644
--- a/packages/admin.py
+++ b/packages/admin.py
@@ -15,10 +15,9 @@ class PackageRelationAdmin(admin.ModelAdmin):
class FlagRequestAdmin(admin.ModelAdmin):
list_display = ('pkgbase', 'full_version', 'repo', 'created', 'who',
'is_spam', 'is_legitimate', 'message')
- list_filter = ('is_spam', 'is_legitimate', 'repo')
+ list_filter = ('is_spam', 'is_legitimate', 'repo', 'created')
search_fields = ('pkgbase', 'user_email', 'message')
ordering = ('-created',)
- date_hierarchy = 'created'
def get_queryset(self, request):
qs = super(FlagRequestAdmin, self).queryset(request)
@@ -28,19 +27,17 @@ class FlagRequestAdmin(admin.ModelAdmin):
class SignoffAdmin(admin.ModelAdmin):
list_display = ('pkgbase', 'full_version', 'arch', 'repo',
'user', 'created', 'revoked')
- list_filter = ('arch', 'repo', 'user')
+ list_filter = ('arch', 'repo', 'user', 'created')
search_fields = ('pkgbase', 'user__username')
ordering = ('-created',)
- date_hierarchy = 'created'
class SignoffSpecificationAdmin(admin.ModelAdmin):
list_display = ('pkgbase', 'full_version', 'arch', 'repo',
'user', 'created', 'comments')
- list_filter = ('arch', 'repo', 'user')
+ list_filter = ('arch', 'repo', 'user', 'created')
search_fields = ('pkgbase', 'user__username')
ordering = ('-created',)
- date_hierarchy = 'created'
def get_queryset(self, request):
qs = super(SignoffSpecificationAdmin, self).queryset(request)
@@ -50,10 +47,9 @@ class SignoffSpecificationAdmin(admin.ModelAdmin):
class UpdateAdmin(admin.ModelAdmin):
list_display = ('pkgname', 'repo', 'arch', 'action_flag',
'old_version', 'new_version', 'created')
- list_filter = ('action_flag', 'repo', 'arch')
+ list_filter = ('action_flag', 'repo', 'arch', 'created')
search_fields = ('pkgname',)
ordering = ('-created',)
- date_hierarchy = 'created'
raw_id_fields = ('package',)
diff --git a/packages/templatetags/package_extras.py b/packages/templatetags/package_extras.py
index f7392a96..3ce64748 100644
--- a/packages/templatetags/package_extras.py
+++ b/packages/templatetags/package_extras.py
@@ -67,13 +67,16 @@ def do_buildsortqs(parser, token):
@register.simple_tag
-def pkg_details_link(pkg, link_title=None):
+def pkg_details_link(pkg, link_title=None, honor_flagged=False):
if not pkg:
return link_title or ''
if link_title is None:
link_title = pkg.pkgname
+ link_content = link_title
+ if honor_flagged and pkg.flag_date:
+ link_content = '<span class="flagged">%s</span>' % link_title
link = '<a href="%s" title="View package details for %s">%s</a>'
- return link % (pkg.get_absolute_url(), pkg.pkgname, link_title)
+ return link % (pkg.get_absolute_url(), pkg.pkgname, link_content)
@register.simple_tag