Skip to content

Commit

Permalink
add moderator variable to toolbar context and make publish button hid…
Browse files Browse the repository at this point in the history
…den when moderator is False
  • Loading branch information
hedberg committed Jan 9, 2011
1 parent edf7acb commit 9bcea67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions cms/middleware/toolbar.py
Expand Up @@ -121,6 +121,7 @@ def render_toolbar(self, request):
'auth_error':not auth and 'cms_username' in request.POST,
'placeholder_data':data,
'edit':edit,
'moderator': cms_settings.CMS_MODERATOR,
'CMS_MEDIA_URL': cms_settings.CMS_MEDIA_URL,
})
#from django.core.context_processors import csrf
Expand Down
2 changes: 1 addition & 1 deletion cms/templates/cms/toolbar/toolbar.html
Expand Up @@ -157,7 +157,7 @@
</div>
<div id="cms_toolbar_col2">
{% if edit and page %}
{% if auth %}
{% if auth and moderator %}
{% if moderator_should_approve and has_moderate_permission %}
<a id="cms_toolbar_approvebutton" href="{% url admin:cms_page_approve_page page.pk %}" class="button green" title="{% trans 'Approve directly' %}">
<span class="state">{{ page_moderator_state.label }}</span>
Expand Down

0 comments on commit 9bcea67

Please sign in to comment.