]> git.parisson.com Git - teleforma.git/commitdiff
fix multiple seminars for 1 media package
authoryomguy <yomguy@parisson.com>
Sat, 29 Dec 2012 21:04:41 +0000 (22:04 +0100)
committeryomguy <yomguy@parisson.com>
Sat, 29 Dec 2012 21:04:41 +0000 (22:04 +0100)
teleforma/templates/teleforma/inc/media_package_list.html
teleforma/templates/teleforma/seminar_detail.html
teleforma/templates/teleforma/seminar_media_audio.html
teleforma/templates/teleforma/seminar_media_video.html
teleforma/urls.py
teleforma/views/pro.py

index 81b3933ff978e40e23d0dcb815c0274ad412b4f6..8e91304e342586cfd03cb763b2692d39615f8ce3 100644 (file)
@@ -13,7 +13,7 @@
         {% if media.is_published or user.is_staff %}
             <tr>
             <td {% if forloop.first %}class="border-top"{% endif %} width="230px" style="vertical-align:middle">
-            <a href="{% url teleforma-media-video media_package.id %}" title="{% trans "Play" %}">
+            <a href="{% url teleforma-media-video seminar.id media_package.id %}" title="{% trans "Play" %}">
             {% if media.item.related.all %}
              {% with media.item.related.all.0 as related %}
               {% if related.title == "preview" %}
index b9048190800e67ad4bc421d889bb160bf9b933ee..08131317daea5a8247d2de7221b74a2e8055f1eb 100644 (file)
@@ -87,11 +87,11 @@ $(function() {
 
           {% with seminar.media as media_packages %}
            {% if media_packages.all.count > 1 %}
-            {% with _("Step 2 : attend these conferences") as title %}
+            {% with _("Step 2 : view these conferences") as title %}
              {% include "teleforma/inc/media_package_list.html" %}
             {% endwith %}
            {% else %}
-            {% with _("Step 2 : attend this conference") as title %}
+            {% with _("Step 2 : view this conference") as title %}
              {% include "teleforma/inc/media_package_list.html" %}
             {% endwith %}
            {% endif %}
index b5114af5460ead075c92284ac615910ef22c01d0..4a014a105a337217203ae3ee1b61bc0aea7ce32a 100644 (file)
@@ -19,7 +19,7 @@
 <div class="course_title">
     <div style="float: right; font-size: 0.9em;">
         
-        <a href="{% url teleforma-media-video media_package.id %}" class="component_icon button icon_speaker">&nbsp;{% trans "Video" %}</a>
+        <a href="{% url teleforma-media-video seminar.id media_package.id %}" class="component_icon button icon_speaker">&nbsp;{% trans "Video" %}</a>
         
         {% if user.is_staff %}
         <a id="publish" href="#" class="{% if media_package.is_published %}component_icon button icon_ok{% else %}component_icon button icon_delete{% endif %}">{% if media_package.is_published %}{% trans " published" %}{% else %}{% trans " rejected" %}{% endif %}</a>
index b2c82004f6bbd261981b9ff98234b3c06e17d002..1674a1319694aa5910ad17c7412b1bbf755aafa7 100644 (file)
@@ -67,7 +67,7 @@ $(window).ready(function(){
 <div class="course_title">
     <div style="float: right; font-size: 0.9em;">
         
-        <a href="{% url teleforma-media-audio media_package.id %}" class="component_icon button icon_speaker">&nbsp;{% trans "Audio" %}</a>
+        <a href="{% url teleforma-media-audio seminar.id media_package.id %}" class="component_icon button icon_speaker">&nbsp;{% trans "Audio" %}</a>
         
         {% if user.is_staff %}
         <a id="publish" href="#" class="{% if media_package.is_published %}component_icon button icon_ok{% else %}component_icon button icon_delete{% endif %}">{% if media_package.is_published %}{% trans " published" %}{% else %}{% trans " rejected" %}{% endif %}</a>
index d40884e7e45c79ef3fabe8dee368257237da48cc..2ea067e316e21f5fd1ca03cb5b4f614d66ffee09 100644 (file)
@@ -69,10 +69,10 @@ urlpatterns = patterns('',
     url(r'^desk/medias/(?P<pk>.*)/detail/$', MediaView.as_view(), name="teleforma-media-detail"),
     url(r'^desk/medias/(?P<pk>.*)/download/$', media.download, name="teleforma-media-download"),
 
-    url(r'^desk/media-packages/(?P<pk>.*)/video/$', 
+    url(r'^desk/seminars/(?P<id>.*)/media-packages/(?P<pk>.*)/video/$', 
             MediaPackageView.as_view(template_name='teleforma/seminar_media_video.html'), 
             name="teleforma-media-video"),
-    url(r'^desk/media-packages/(?P<pk>.*)/audio/$', 
+    url(r'^desk/seminars/(?P<id>.*)/media-packages/(?P<pk>.*)/audio/$', 
             MediaPackageView.as_view(template_name='teleforma/seminar_media_audio.html'),
             name="teleforma-media-audio"),
 
index e988ca2888290b387b4c8c315a0a93c89e4375cb..bc479bed558235add8dc805806da229630426308 100644 (file)
@@ -183,7 +183,8 @@ class MediaPackageView(DetailView):
         context = super(MediaPackageView, self).get_context_data(**kwargs)
         media_package = self.get_object()
         media_package.readers.add(self.request.user)
-        seminar = media_package.seminar.get()
+        print self.kwargs
+        seminar = Seminar.objects.get(pk=self.kwargs['id'])
         context['seminar'] = seminar
         context['media_package'] = media_package
         context['seminar_progress'] = seminar_progress(self.request.user, seminar)