view gpp/templates/core/admin_dashboard.html @ 145:71cb4208dc98

Tweak to #30, admin dashboard. Because of a bug in Django (9568), my dashboard appears on the login page. To get around this, pass in the user to the templatetag, so it can do a 'if user.is_staff' check. Also tweaked the HTML and CSS to show non-zero pending items in red. Shortened the pending item titles for readability.
author Brian Neal <bgneal@gmail.com>
date Wed, 09 Dec 2009 00:03:10 +0000
parents 861f7d5f1b23
children 023132c90021
line wrap: on
line source
{% if user.is_staff %}
<ul id="dashboard-list">
<li><a href="/admin/forums/flaggedpost/">Posts</a>: 
<span {% if flagged_posts %}class="alert"{% endif %}>{{ flagged_posts }}</span></li>
<li><a href="/admin/comments/commentflag/">Comments</a>:
<span {% if flagged_comments %}class="alert"{% endif %}>{{ flagged_comments }}</span></li>
<li><a href="/admin/bio/userprofileflag/">Profiles</a>:
<span {% if flagged_profiles %}class="alert"{% endif %}>{{ flagged_profiles }}</span></li>
<li><a href="/admin/gcalendar/event/">Calendar</a>:
<span {% if event_requests %}class="alert"{% endif %}>{{ event_requests }}</span></li>
<li><a href="/admin/news/pendingstory/">News</a>:
<span {% if new_stories %}class="alert"{% endif %}>{{ new_stories }}</span></li>
<li><a href="/admin/downloads/download/">Downloads</a>:
<span {% if new_downloads %}class="alert"{% endif %}>{{ new_downloads }}</span></li>
<li><a href="/admin/weblinks/link/">Links</a>:
<span {% if new_links %}class="alert"{% endif %}>{{ new_links }}</span></li>
</ul>
{% endif %}