From: yomguy Date: Fri, 22 Jun 2012 13:34:41 +0000 (+0200) Subject: - add stream-m snapshot to live preview X-Git-Tag: 0.6^2~24 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=fa35a98f0c20b459d4ec6e7b880f762a33fd50dc;p=teleforma.git - add stream-m snapshot to live preview - prepare telecaster inclusion.. --- diff --git a/teleforma/models.py b/teleforma/models.py index 9bc49537..0538caf4 100755 --- a/teleforma/models.py +++ b/teleforma/models.py @@ -260,6 +260,14 @@ class LiveStream(Model): else: return self.slug + '.' + self.stream_type + @property + def snapshot_url(self): + url = '' + if self.server.type == 'stream-m': + url = 'http://' + self.server.host + ':' + self.server.port + \ + '/snapshot/' + self.slug + return url + @property def url(self): return 'http://' + self.server.host + ':' + self.server.port + '/' + self.mount_point diff --git a/teleforma/static/teleforma/css/teleforma.css b/teleforma/static/teleforma/css/teleforma.css index 17242070..9edbd6f6 100644 --- a/teleforma/static/teleforma/css/teleforma.css +++ b/teleforma/static/teleforma/css/teleforma.css @@ -641,7 +641,7 @@ dl dt { } dl.listing dt { - width: 18em; + width: 30%; background-color: #f9f9f9; border: .1em solid #eee; border-right: .3em solid #ddd; @@ -649,6 +649,7 @@ dl.listing dt { margin-right: .8em; color: #444; } + dl.listing dt.group { float: none; margin-top: .9em; @@ -658,7 +659,7 @@ dl.listing dt.group { width: 18.2em; } dl.listing dd { - margin-left: 19.4em; + margin-left: 30%; font-weight: bold; } diff --git a/teleforma/templates/teleforma/inc/conference_list.html b/teleforma/templates/teleforma/inc/conference_list.html index b0cb720f..16337bcd 100644 --- a/teleforma/templates/teleforma/inc/conference_list.html +++ b/teleforma/templates/teleforma/inc/conference_list.html @@ -10,16 +10,48 @@ {% for stream in course.livestream.all|from_course_type:type %} - {{ stream.slug }} - {{ stream.conference.date_begin }} - + + {% if stream.streaming %} + + snapshot + + {% else %} + {% trans "The conference is not started yet. Please wait..." %} + {% endif %} + + +
+
+
{% trans "Title" %}
{{ stream.conference.course.title }}
+
{% trans "Session" %}
{{ stream.conference.session }}
+
{% trans "Professor" %}
{{ stream.conference.professor }}
+
{% trans "Begin" %}
{{ stream.conference.date_begin }}
+
+
+ + {% if stream.streaming %} - yes + + {% endif %} + {% endfor %} + + + {% endif %} \ No newline at end of file