Break up "Awaiting Moderation" and "Approved" articles/events/etc.

This was becoming illegible and also hard to maintain based on how
we changed up the look/feel of the entire site. That way, we have
two distinct categories for both types of objects, which makes it
easier for the user to understand what is what.

Also reworded the explanation for what is going on, both based on
the structural change and because it read like a literal interpretation
of the code.
This commit is contained in:
Jonathan S. Katz
2018-11-04 09:39:30 -05:00
parent 67d7af8bed
commit 5ba39f457f
2 changed files with 23 additions and 7 deletions

View File

@ -202,7 +202,10 @@ def listobjects(request, objtype):
o = objtypes[objtype]
return render_pgweb(request, 'account', 'account/objectlist.html', {
'objects': o['objects'](request.user),
'objects': {
'approved': o['objects'](request.user).filter(approved=True),
'unapproved': o['objects'](request.user).filter(approved=False),
},
'title': o['title'],
'submit_header': o.has_key('submit_header') and o['submit_header'] or None,
'suburl': objtype,