Commit 229b7de3 authored by fred's avatar fred

give staff members access to all emissions

parent 0adda5e4
......@@ -416,6 +416,7 @@ div.two-columns > div > ul {
overflow-y: auto;
}
[class^="icon-"]:after, [class*=" icon-"]:after,
[class^="icon-"]:before, [class*=" icon-"]:before {
font-family: FontAwesome;
font-weight: normal;
......@@ -440,3 +441,5 @@ a [class^="icon-"], a [class*=" icon-"] {
.icon-circle-arrow-right:before { content: "\f0a9"; }
.icon-music:before { content: "\f001"; }
.icon-th:before { content: "\f00a"; }
.icon-circle-arrow-down:after { content: "  \f0ab"; }
......@@ -44,6 +44,17 @@ Aucune actu.
{% endfor %}
{% if all_emissions %}
<h2 class="icon-circle-arrow-down" id="other-emissions">Autres émissions</h2>
<ul class="emission-list" id="other-emissions-list" style="display: none;">
{% for emission in all_emissions %}
<li><a href="{% url 'emission-view' slug=emission.slug %}">{{emission.title}}</a></li>
{% endfor %}
</ul>
{% endif %}
{% for news_category in news_categories %}
<h2>{{ news_category.title }}</h2>
......@@ -62,3 +73,14 @@ Aucune actu.
{% endfor %}
{% endblock %}
{% block page-end %}
<script>
$(document).ready(function() {
$('#other-emissions').click(function() {
$('#other-emissions-list').toggle('blind');
});
});
</script>
{% endblock %}
......@@ -10,6 +10,10 @@ class Home(TemplateView):
context = super(Home, self).get_context_data(**kwargs)
context['emissions'] = self.request.user.emissions.all().order_by('title')
context['news_categories'] = self.request.user.news_categories.all().order_by('title')
if self.request.user.is_staff:
context['all_emissions'] = Emission.objects.all().order_by('title')
return context
home = login_required(Home.as_view())
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment