<table class="listing" width="100%">
<tbody>
{% for media in course.media.all|from_course_type:type|from_period:period %}
- {% if media.is_published or user.is_staff and course_view %}
+ {% if media.is_published or user.is_staff and not list_view %}
{% if media.type == 'webm' %}
<tr>
<td {% if forloop.first %}class="border-top"{% endif %} width="230px" style="vertical-align:middle">
context['room'] = get_room(name=course.title, content_type=content_type,
id=course.id)
context['doc_types'] = DocumentType.objects.all()
- context['course_view'] = True
return context
@method_decorator(login_required)
context['room'] = get_room(name='site')
context['doc_types'] = DocumentType.objects.all()
context['all_courses'] = sorted(self.all_courses, key=lambda k: k['number'])
- context['period'] = get_periods(self.request.user)[0]
return context
@method_decorator(login_required)
def get_context_data(self, **kwargs):
context = super(PeriodListView, self).get_context_data(**kwargs)
context['period'] = self.period
+ context['list_view'] = True
return context