mirror of
https://github.com/postgres/pgweb.git
synced 2025-07-25 16:02:27 +00:00
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:
@ -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,
|
||||
|
@ -3,15 +3,28 @@
|
||||
{%block contents%}
|
||||
<h1>{{title}}s <i class="fas fa-th-list"></i></h1>
|
||||
<p>
|
||||
Objects in <span style="color:red; font-weight: bolder;">bright red</span> are awaiting moderator approval. Note that modifying a previously
|
||||
approved object <em>may</em> result in it being un-approved if the changes are
|
||||
extensive.
|
||||
Objects that are awaiting moderator approval are listed in their own category.
|
||||
Note that modifying anything that was previously approved might result in
|
||||
additional moderation based upon what has changed in the content.
|
||||
</p>
|
||||
|
||||
{% if objects.unapproved %}
|
||||
<h3>Awaiting Moderation</h3>
|
||||
<ul>
|
||||
{%for o in objects%}
|
||||
<li><a {%if not o.approved%} style="color:red;" {%endif%}href="/account/{{suburl}}/{{o.id}}/">{{o}}</a></li>
|
||||
{%endfor%}
|
||||
{%for o in objects.unapproved %}
|
||||
<li><a href="/account/{{suburl}}/{{o.id}}/">{{o}}</a></li>
|
||||
{%endfor%}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if objects.approved %}
|
||||
<h3>Approved</h3>
|
||||
<ul>
|
||||
{%for o in objects.approved %}
|
||||
<li><a href="/account/{{suburl}}/{{o.id}}/">{{o}}</a></li>
|
||||
{%endfor%}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{%if submit_header%}
|
||||
<p>{{submit_header|safe}}</p>
|
||||
|
Reference in New Issue
Block a user