]> git.parisson.com Git - teleforma.git/commitdiff
10 courses max on desk, add comment to media list, media click go to blank tab
authoryomguy <yomguy@parisson.com>
Tue, 31 Jul 2012 21:30:05 +0000 (23:30 +0200)
committeryomguy <yomguy@parisson.com>
Tue, 31 Jul 2012 21:30:05 +0000 (23:30 +0200)
teleforma/templates/teleforma/inc/media_list.html
teleforma/views.py

index 6088b59cb074b2e8840f1fab930fbc1368914499..2b66a7defc95a5d40598470e50b05e580bcd2172 100644 (file)
@@ -14,7 +14,7 @@
           {% if media.type == 'webm' %}
             <tr>
             <td {% if forloop.first %}class="border-top"{% endif %} width="230px">
-                <a href="{% url teleforma-media-detail media.id %}" title="{% trans "View" %}">
+                <a href="{% url teleforma-media-detail media.id %}" title="{% trans "View" %}" target="_blank">
                  {% if media.item.related.all %}
                  {% for related in media.item.related.all %}
                   {% if related.title == "preview" %}
@@ -35,6 +35,9 @@
                     <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>
index 8f4c05b9c1eb74468b2996b65660022030674d44..6b324fdf6f21a5f2712dd55bfb96bd5fb565cad2 100755 (executable)
@@ -204,7 +204,7 @@ class CoursesView(ListView):
     template_name='teleforma/courses.html'
 
     def get_queryset(self):
-        return get_courses(self.request.user, date_order=True)
+        return get_courses(self.request.user, date_order=True)[:10]
 
     def get_context_data(self, **kwargs):
         context = super(CoursesView, self).get_context_data(**kwargs)