{% block extra_javascript %}
-<script type="text/javascript">
-$(document).ready(function(){
- InitChatWindow("{% url jqchat_ajax room.id %}", null);
- });
-</script>
{% endblock extra_javascript %}
<a href="{% url teleforma-conference-record %}" class="component_icon button" id="action_red">{% trans "New conference" %}</a>
</div>
{% endif %}
+
+{% if user.is_staff %}
+<div class="module_action">
+<a href="{% url teleforma-desk-period-pending period.id %}" class="component_icon button" id="action_red">{% trans "Pending" %}</a>
+</div>
+{% endif %}
+
{% endblock module-action %}
{% block notes %}
--- /dev/null
+{% extends "teleforma/courses.html" %}
+{% load teleforma_tags %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block module-action %}
+{% endblock module-action %}
+
+{% block course %}
+<div class="desk_center">
+
+ {% for c in courses %}
+ {% with c.course as course %}
+ {% for type in c.types %}
+ <div class="course">
+ <div class="course_title">
+ <a href="{% url teleforma-desk-period-course period.id course.id %}">{{ course.title }} - {{ type }}{% if course.description %} - {{ course.description }}{% endif %}</a>
+ </div>
+
+ {% block media %}
+ {% include "teleforma/inc/media_list_pending.html" %}
+ {% endblock %}
+
+ </div>
+ {% endfor %}
+ {% endwith %}
+ {% endfor %}
+</div>
+{% endblock course %}
--- /dev/null
+{% load teleforma_tags %}
+{% load thumbnail %}
+{% load i18n %}
+
+{% if course.media.all|from_course_type:type|from_period:period %}
+<div class="course_content">
+<div class="course_subtitle">
+ <h3><img src="{{ STATIC_URL }}telemeta/images/item_title.png" width="10px" alt="" /> {% trans "Passed conferences"%}</h3>
+</div>
+ <table class="listing" width="100%">
+ <tbody>
+ {% for media in course.media.all|from_course_type:type|from_period:period %}
+ {% if not media.is_published and user.is_staff %}
+ {% if media.type == 'webm' %}
+ <tr>
+ <td {% if forloop.first %}class="border-top"{% endif %} width="230px" style="vertical-align:middle">
+ <a href="{% url teleforma-media-detail period.id media.id %}" title="{% trans "Play" %}">
+ {% if media.item.related.all %}
+ {% for related in media.item.related.all %}
+ {% if related.title == "preview" %}
+ {% thumbnail related.file "168x96" as im %}
+ <div style="background: no-repeat url('{{ im.url }}') 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 %}
+ {% endif %}
+ {% endfor %}
+ {% else %}
+ {% trans 'Click here' %}
+ {% endif %}
+ </a>
+ </td>
+ <td {% if forloop.first %}class="border-top"{% endif %} width="60%" style="padding-left: 1em;">
+ <div>
+ <dl class="listing" style="font-size: 1.2em;">
+ <dt>{% trans "Title" %}</dt><dd>{{ media.conference.course.title }}</dd>
+ <dt>{% trans "Session" %}</dt><dd>{{ media.conference.session }}</dd>
+ {% if media.conference.professor %}
+ <dt>{% trans "Professor" %}</dt><dd><a href="{% url telemeta-profile-detail media.conference.professor.user.username %}" target="_blank">{{ media.conference.professor }}</a></dd>
+ {% endif %}
+ <dt>{% trans "Begin" %}</dt><dd>{{ media.conference.date_begin }}</dd>
+ {% if media.conference.comment %}
+ <dt>{% trans "Comment" %}</dt><dd>{{ media.conference.comment }}</dd>
+ {% endif %}
+ </dl>
+ </div>
+ </td>
+ <td {% if forloop.first %}class="border-top"{% endif %} width="10%" align="center">
+ {% if media.is_published and user.is_staff %}
+ <img src="{{ STATIC_URL }}telemeta/images/ok.png" style="vertical-align:middle" alt="" title="{% trans ' published' %}" />
+ {% elif not media.is_published and user.is_staff %}
+ <img src="{{ STATIC_URL }}telemeta/images/delete.png" style="vertical-align:middle" alt="" title="{% trans ' rejected' %}" />
+ {% endif %}
+ {% if media.item.file %}
+ <a href="{{ MEDIA_URL }}{{ media.item.file }}">
+ <img src="{{ STATIC_URL }}teleforma/images/download_media.png" style="vertical-align:middle" alt="" title="{% trans "Download" %}" />
+ </a>
+ {% endif %}
+ </td>
+ </tr>
+ {% endif %}
+ {% endif %}
+ {% endfor %}
+ </tbody>
+ </table>
+</div>
+{% endif %}
# Desk
url(r'^desk/$', HomeRedirectView.as_view(), name="teleforma-desk"),
url(r'^desk/periods/(?P<period_id>.*)/courses/$', CourseListView.as_view(), name="teleforma-desk-period-list"),
+ url(r'^desk/periods/(?P<period_id>.*)/courses_pending/$', CoursePendingListView.as_view(), name="teleforma-desk-period-pending"),
url(r'^desk/periods/(?P<period_id>.*)/courses/(?P<pk>.*)/detail/$', CourseView.as_view(),
name="teleforma-desk-period-course"),
return media_list
+class CoursePendingListView(CourseListView):
+
+ template_name='teleforma/courses_pending.html'
+
+ def get_context_data(self, **kwargs):
+ context = super(CoursePendingListView, self).get_context_data(**kwargs)
+ context['courses'] = sorted(context['all_courses'], key=lambda k: k['date'], reverse=True)
+ return context
+
+
class MediaView(CourseAccessMixin, DetailView):
model = Media