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

index 9528dc1bbd21ce3a064d3e75dd2364e236a03b91..d1833c640b5aa87479daaed3bf43fcf52dff9b33 100644 (file)
   <div id="module-set-left" style="width: 20%">
   {% block modules %}
 
-  <div class="module">
-
-    <h3><img src="/static/teleforma/images/module_playlist.png" alt="playlists"
-        style="vertical-align:middle" />{{ period }}</h3>
+    <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 style="background: white;">
-      <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>
+    <ul>
+    {% block courses %}
+    {% with usr|user_courses as courses %}
+     {% for c in courses %}
+       {% with c.course as course %}
+       <li><a href="{% url 'teleforma-desk-period-course' period.id course.id %}">{{ course.title}} {{ course.type }}</a></li>
+       {% endwith %}
+     {% endfor %}
+    {% endwith %}
+    {% endblock courses %}
+    </ul>
+    </div>
     </div>
-
-  </div>
 
   {% endblock %}