]> git.parisson.com Git - teleforma.git/commitdiff
fix profile couses list
authorGuillaume Pellerin <guillaume.pellerin@free.fr>
Fri, 12 Jul 2024 13:11:27 +0000 (15:11 +0200)
committerGuillaume Pellerin <guillaume.pellerin@free.fr>
Fri, 12 Jul 2024 13:11:27 +0000 (15:11 +0200)
teleforma/templates/teleforma/profile_detail.html

index 706d5709b60203825221854470bf7154435e8371..9528dc1bbd21ce3a064d3e75dd2364e236a03b91 100644 (file)
   <div id="module-set-left" style="width: 20%">
   {% block modules %}
 
-    <div class="module">
-    <h3><a href="{% url 'teleforma-home' %}"><img src="/static/teleforma/images/module_playlist.png" alt="playlists" style="vertical-align:middle" />{% if user.username != usr.username%}{% trans "His courses" %}{% else %}{% trans "My courses" %}{% endif %}</a></h3>
+  <div class="module">
+
+    <h3><img src="/static/teleforma/images/module_playlist.png" alt="playlists"
+        style="vertical-align:middle" />{{ period }}</h3>
     <div style="background: white;">
-    <ul>
-    {% block courses %}
-    {% with usr|user_courses as courses %}
-     {% for c in courses %}
-       {% with c.course as course %}
-       <li><a href="#">{{ course.title}} {{ course.type }}</a></li>
-       {% endwith %}
-     {% endfor %}
-    {% endwith %}
-    {% endblock courses %}
-    </ul>
-    </div>
+      <ul>
+        {% block courses %}
+        {% for c in all_courses %}
+        {% with c.course as course %}
+        <li><a href="{% url 'teleforma-desk-period-course' period.id course.id %}">{{ course.title }}</a></li>
+        {% endwith %}
+        {% endfor %}
+        {% endblock courses %}
+      </ul>
     </div>
 
+  </div>
+
   {% endblock %}
 
   {% if user.is_authenticated and user.username != usr.username %}