comparison 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
comparison
equal deleted inserted replaced
144:49b713bca29d 145:71cb4208dc98
1 {% if user.is_staff %}
1 <ul id="dashboard-list"> 2 <ul id="dashboard-list">
2 <li><a href="/admin/forums/flaggedpost/">Flagged Posts</a>: {{ flagged_posts }}</li> 3 <li><a href="/admin/forums/flaggedpost/">Posts</a>:
3 <li><a href="/admin/comments/commentflag/">Flagged Comments</a>: {{ flagged_comments }}</li> 4 <span {% if flagged_posts %}class="alert"{% endif %}>{{ flagged_posts }}</span></li>
4 <li><a href="/admin/bio/userprofileflag/">Flagged Profiles</a>: {{ flagged_profiles }}</li> 5 <li><a href="/admin/comments/commentflag/">Comments</a>:
5 <li><a href="/admin/gcalendar/event/">Calendar Requests</a>: {{ event_requests }}</li> 6 <span {% if flagged_comments %}class="alert"{% endif %}>{{ flagged_comments }}</span></li>
6 <li><a href="/admin/news/pendingstory/">New Stories</a>: {{ new_stories }}</li> 7 <li><a href="/admin/bio/userprofileflag/">Profiles</a>:
7 <li><a href="/admin/downloads/download/">New Downloads</a>: {{ new_downloads }}</li> 8 <span {% if flagged_profiles %}class="alert"{% endif %}>{{ flagged_profiles }}</span></li>
8 <li><a href="/admin/weblinks/link/">New Links</a>: {{ new_links }}</li> 9 <li><a href="/admin/gcalendar/event/">Calendar</a>:
10 <span {% if event_requests %}class="alert"{% endif %}>{{ event_requests }}</span></li>
11 <li><a href="/admin/news/pendingstory/">News</a>:
12 <span {% if new_stories %}class="alert"{% endif %}>{{ new_stories }}</span></li>
13 <li><a href="/admin/downloads/download/">Downloads</a>:
14 <span {% if new_downloads %}class="alert"{% endif %}>{{ new_downloads }}</span></li>
15 <li><a href="/admin/weblinks/link/">Links</a>:
16 <span {% if new_links %}class="alert"{% endif %}>{{ new_links }}</span></li>
9 </ul> 17 </ul>
18 {% endif %}