From: yomguy Date: Tue, 5 Jun 2012 21:10:50 +0000 (+0200) Subject: fix course detail X-Git-Tag: 0.5^2~21^2~10 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=7f7aac9bac26ee9290c946a7c5f719237da2d033;p=teleforma.git fix course detail --- diff --git a/teleforma/templates/teleforma/course_detail.html b/teleforma/templates/teleforma/course_detail.html index fc44478a..42a576ce 100644 --- a/teleforma/templates/teleforma/course_detail.html +++ b/teleforma/templates/teleforma/course_detail.html @@ -13,45 +13,44 @@ $(document).ready(function(){ {% endblock extra_javascript %} {% block courses %} -{% for course in courses %} -
  • {{ course.title}} {{ course.type }}
  • -{% endfor %} + {% for c in all_courses %} + {% for course in c.courses %} +
  • {{ course.title }}
  • + {% endfor %} + {% endfor %} {% endblock courses %} {% block course %}
    -
    - -
    {{ course.title }}{% if course.description %} - {{ course.description }}{% endif %} -
    - -{% if course.conference.all or course.document.all or course.media.all %} + {% for c in courses %} + {% for course in c.courses %} + {% for type in c.types %} +
    +
    {{ course.title }} - {{ type }}{% if course.description %} - {{ course.description }}{% endif %} +
    -{% block document %} -{% with course as course and %} -{% include "teleforma/inc/document_list.html" %} -{% endwith %} -{% endblock %} - -{% block conference %} -{% with course as course and %} -{% include "teleforma/inc/conference_list.html" %} -{% endwith %} -{% endblock %} + {% block document %} + {% with course as course and type as type %} + {% include "teleforma/inc/document_list.html" %} + {% endwith %} + {% endblock %} -{% block media %} -{% with course as course and %} -{% include "teleforma/inc/media_list.html" %} -{% endwith %} -{% endblock %} + {% block conference %} + {% with course as course %} + {% include "teleforma/inc/conference_list.html" %} + {% endwith %} + {% endblock %} -{% else %} -
    -

    {% trans "No document" %}

    -
    -{% endif %} + {% block media %} + {% with course as course %} + {% include "teleforma/inc/media_list.html" %} + {% endwith %} + {% endblock %} -
    +
    +{% endfor %} +{% endfor %} +{% endfor %}
    {% endblock course %} diff --git a/teleforma/templates/teleforma/courses.html b/teleforma/templates/teleforma/courses.html index e3f06691..f49e0b8f 100644 --- a/teleforma/templates/teleforma/courses.html +++ b/teleforma/templates/teleforma/courses.html @@ -23,11 +23,9 @@ $(document).ready(function(){