{% endblock %}\r
\r
{% block sidebar %}\r
- {% if user.is_superuser %}\r
+ {% if hide_navigation %}\r
+\r
+ {% else %}\r
<div class="boxC">\r
<a href="{% url admin_switch_interface %}?to=djstyle">{% trans "Switch to django style interface" %}</a>\r
<h3 class="subtitle">{% trans "Administration menu" %}</h3>\r
{% block pagename %}{% endblock %} -
{% block description %}{% endblock %}
</div>
- <div id="content" class="{% if hide_menu %}flex{% else %}colMS{% endif %}">
+ <div id="content" class="{% if hide_navigation %}flex{% else %}colMS{% endif %}">
<div id="content-main">
{% autoescape off %}
{% for message in user_messages %}
{% endautoescape %}
{% block admincontent %}{% endblock %}
</div>
- {% if not hide_menu %}
+ {% if hide_navigation %}
+
+ {% else %}
<div id="content-related">
{% if unsaved %}
<div id="changes-box" class="module">
context['tools'] = [(name, fn.label) for name, fn in TOOLS.items()]
+ # Show the navigation only to moderators and super users
+ if not context.has_key("hide_navigation"):
+ context['hide_navigation'] = not request.user.is_superuser
+
unsaved = request.session.get('previewing_settings', {})
context['unsaved'] = set([getattr(settings, s).set.name for s in unsaved.keys() if hasattr(settings, s)])
'state_types': state_types,
'authors': authors,
'tags': tags,
- 'hide_menu': True
+ 'hide_navigation': True
}))
@csrf_exempt