diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-12-22 21:57:02 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-12-22 21:57:02 -0500 |
commit | f545de301a3188eefffb79de018d5fda2f03946d (patch) | |
tree | c30c10c3cef88d84a6e38a43b63ddf5c4f83d2f5 /packages | |
parent | 2e634dc457a35d06ec83409da3d6006107495569 (diff) | |
parent | 2bfec5b17ca3ee3ea3b347c029b9d8dad3c5b4d0 (diff) |
Merge branch 'archweb-generic' into master-nomake
Conflicts:
README.md
Diffstat (limited to 'packages')
-rw-r--r-- | packages/admin.py | 12 | ||||
-rw-r--r-- | packages/templatetags/package_extras.py | 7 |
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 20c127c1..70456985 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 |