<tr>
<td {% if forloop.first %}class="border-top"{% endif %} width="230px" style="vertical-align:middle">
<a href="{% url 'teleforma-media-video' seminar.id media.id %}" title="{% trans "Play" %}">
- {% with media.item.related.all|preview as related %}
- {% if related %}
+ {% if im.poster_file %}
{% thumbnail related.file "168x98" as im %}
- <div style="background: no-repeat url('{{ im.url }}') 0 1px; background-size: 100%; background-color: #dfdfdf;">
+ <div style="background: no-repeat url('{{ im.poster_file }}') 0 1px; background-size: 100%; background-color: #dfdfdf;">
<img src="{{ STATIC_URL }}teleforma/images/play_168.png" width="100%" alt="{% trans 'Click here' %}" />
</div>
{% endthumbnail %}
{% else %}
{% trans 'Click here' %}
{% endif %}
- {% endwith %}
- </a>
+ </a>
</td>
<td {% if forloop.first %}class="border-top"{% endif %} width="60%" style="padding-left: 1em;">
<div>
{% if media.description %}
<dt>{% trans "Description" %}</dt><dd>{{ media.description }}</dd>
{% endif %}
- <dt>{% trans "Duration" %}</dt><dd>{{ media.item.approx_duration|fancy_duration }}</dd>
+ <dt>{% trans "Duration" %}</dt><dd>{{ media.approx_duration|fancy_duration }}</dd>
</dl>
</div>
</td>
context['courses'] = courses
context['all_courses'] = all_courses
context['notes'] = course.notes.all().filter(author=self.request.user)
- content_type = ContentType.objects.get(app_label="teleforma", model="course")
- if settings.TELEFORMA_GLOBAL_TWEETER:
- context['room'] = get_room(name='site')
- else:
- context['room'] = get_room(name=course.title, content_type=content_type,
- id=course.id)
context['doc_types'] = DocumentType.objects.all()
context['periods'] = get_periods(self.request.user)
return context
context['course'] = media.course
context['type'] = media.course_type
context['notes'] = media.notes.all().filter(author=self.request.user)
- content_type = ContentType.objects.get(app_label="teleforma", model="media")
- if settings.TELEFORMA_GLOBAL_TWEETER:
- context['room'] = get_room(name='site')
- else:
- context['room'] = get_room(name=media.item.title, content_type=content_type,
- id=media.id)
context['periods'] = get_periods(self.request.user)
return context
document = self.get_object()
context['course'] = document.course
context['notes'] = document.notes.all().filter(author=self.request.user)
- content_type = ContentType.objects.get(app_label="teleforma", model="document")
- if settings.TELEFORMA_GLOBAL_TWEETER:
- context['room'] = get_room(name='site')
- else:
- context['room'] = get_room(name=document.title, content_type=content_type,
- id=document.id)
access = get_seminar_doc_access(document, seminars)
if not access:
context['access_error'] = access_error
conference.set_as_read(self.request.user)
else:
- content_type = ContentType.objects.get(app_label="teleforma", model="conference")
context['livestreams'] = conference.livestream.all()
context['host'] = get_host(self.request)
all_courses = get_courses(self.request.user)
context['course'] = conference.course
context['periods'] = get_periods(self.request.user)
context['conferences'] = all_conferences(self.request)
- if settings.TELEFORMA_GLOBAL_TWEETER:
- context['room'] = get_room(name='site')
- else:
- context['room'] = get_room(name=conference.course.title, content_type=content_type,
- id=conference.id)
return context
@jsonrpc_method('teleforma.stop_conference')