--- /dev/null
+{% extends "telemeta/base.html" %}
+{% load teleforma_tags %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+
+{% block extra_javascript %}
+{% endblock extra_javascript %}
+
+
+{% block content %}
+
+<div id="module-set-left" style="width: 18%">
+
+{% block modules %}
+<div class="module">
+
+<h3><a href="{% url teleforma-desk %}"><img src="{{ STATIC_URL }}telemeta/images/module_playlist.png" alt="playlists" style="vertical-align:middle" />{% trans "My courses" %}</a></h3>
+<div style="background: white;">
+<ul>
+{% block courses %}
+{% for c in all_courses %}
+ {% with c.course as course %}
+ <li><a href="{% url teleforma-course-detail course.id %}">{{ course.title }}</a></li>
+ {% endwith %}
+ {% endfor %}
+{% endblock courses %}
+</ul>
+</div>
+</div>
+
+{% block module-action %}
+{% get_telecaster as telecaster %}
+{% if telecaster %}
+<div class="module_action">
+<a href="{% url teleforma-conference-record %}" class="component_icon button" id="action_red">{% trans "New conference" %}</a>
+</div>
+{% endif %}
+{% endblock module-action %}
+
+{% block notes %}
+<!--<div class="module">
+<h3><img src="{{ STATIC_URL }}telemeta/images/view-pim-notes.png" alt="playlists" style="vertical-align:middle" />{% trans "My notes" %}</h3>
+<div style="background: white;">
+<ul>
+{% for note in notes %}
+<li>{{ note.content }}</li>
+{% endfor %}
+</ul>
+</div>
+</div>
+<div class="module_action">
+<a href="#" class="component_icon button" id="action_violet">{% trans "New note" %}</a>
+</div>-->
+{% endblock notes %}
+
+</div>
+{% endblock modules %}
+
+
+{% block course %}
+<div class="desk_center">
+ {% for c in object_list %}
+ {% with c.course as course %}
+ {% for type in c.types %}
+ <div class="course">
+ <div class="course_title">
+ <a href="{% url teleforma-course-detail course.id %}" style="color: #000;">{{ course.title }} - {{ type }}{% if course.description %} - {{ course.description }}{% endif %}</a>
+ </div>
+
+ {% block conference %}
+ {% include "teleforma/inc/conference_list.html" %}
+ {% endblock %}
+
+ {% block media %}
+ {% include "teleforma/inc/media_list.html" %}
+ {% endblock %}
+
+ {% block document %}
+ {% with forloop.counter as type_counter %}
+ {% include "teleforma/inc/document_list.html" %}
+ {% endwith %}
+ {% endblock %}
+
+ </div>
+ {% endfor %}
+ {% endwith %}
+ {% endfor %}
+</div>
+{% endblock course %}
+
+
+<div id="module-set" style="width: 22%">
+
+{% block status %}
+{% get_telecaster as telecaster %}
+{% if telecaster %}
+<div class="module">
+ <h3><img src="{{STATIC_URL}}teleforma/images/status.png" alt="status" style="vertical-align:middle" /> {% trans "Status" %}</h3>
+ <div id="server_status_table_wrapper" class="status"></div>
+</div>
+
+<script type="text/javascript">
+server_status_callback();
+</script>
+{% endif %}
+{% endblock status %}
+
+{% block chat %}
+{% if room %}
+{% with "General tweeter" as title %}
+{% include "teleforma/inc/chat_room.html" %}
+{% endwith %}
+{% endif %}
+{% endblock chat %}
+
+</div>
+
+{% endblock content %}
name="teleforma-conference-audio"),
url(r'^desk/conference_record/$', ConferenceRecordView.as_view(),
name="teleforma-conference-record"),
+ url(r'^desk/conferences/$', ConferenceListView.as_view(),
+ name="teleforma-conferences"),
# Postman
url(r'^messages/', include('postman.urls')),
class ConferenceListView(ListView):
model = Conference
+ template_name='teleforma/conferences.html'
+
+ def get_queryset(self):
+ conferences = Conference.objects.all()
+ return conferences
@jsonrpc_method('teleforma.get_conference_list')
def get_conference_list(request):
- return [c.to_json_dict() for c in self.get_queryset()]
+ conferences = Conference.objects.all()
+ return [c.to_json_dict() for c in conferences]
- def pull(self, conference):
+ def pull(request):
url = 'http://' + settings.TELECASTER_MASTER_SERVER + '/json/'
s = ServiceProxy(url)
- list = s.teleforma.get_conference_list()
- for conf_dict in list:
- conference.from_json_dict(conf_dict)
+ result = s.teleforma.get_conference_list()
+ for conf_dict in result['result']:
+ conference = Conference.objects.filter(public_id=conf_dict['id'])
+ if not conference:
+ conference = Conference()
+ conference.from_json_dict(conf_dict)
class ConferenceRecordView(FormView):