]> git.parisson.com Git - teleforma.git/commitdiff
fold keywords
authoryomguy <yomguy@parisson.com>
Sun, 30 Dec 2012 01:48:58 +0000 (02:48 +0100)
committeryomguy <yomguy@parisson.com>
Sun, 30 Dec 2012 01:48:58 +0000 (02:48 +0100)
teleforma/templates/teleforma/seminar_detail.html
teleforma/templates/teleforma/seminars.html

index 08131317daea5a8247d2de7221b74a2e8055f1eb..4a4cc6cb71f16be251e83b1cfc8f11f1c0cc42ed 100644 (file)
@@ -22,6 +22,16 @@ $(function() {
         var color = '#' + rainbow.colourAt({{seminar_progress}});
         $('#progressbar-seminar div').css({"background": color});
     });
+
+
+$(function () {
+    $('div.keywords').expander({
+        slicePoint: 45,
+        expandText: 'Lire plus',
+        userCollapseText: 'Cacher le texte',
+    });
+});
+
 </script>
 {% endblock infra_javascript %}
 
@@ -53,10 +63,10 @@ $(function() {
             <div class="course_description">
               <dl class="listing" style="font-size: 1.1em;">
               <dt>{% trans "course" %}</dt><dd>{{ seminar.course }}</dd>
-              {% if seminar.keywords.all %}<dt>{% trans "keywords" %}</dt><dd>{% for kw in seminar.keywords.all %}{{ kw }}, {% endfor %}</dd>{% endif %}
               <dt>{% trans "level" %}</dt><dd>{{ seminar.level }}</dd>
               <dt>{% trans "public concerned" %}</dt><dd>{{ seminar.concerned }}</dd>
               <dt>{% trans "duration" %}</dt><dd>{{ seminar.duration }}</dd>
+              {% if seminar.keywords.all %}<dt>{% trans "keywords" %}</dt><dd><div class="keywords">{% for kw in seminar.keywords.all %}{{ kw }}, {% endfor %}</div></dd>{% endif %}
               <!-- {% if seminar.description %}
               <dt>{% trans "description" %}</dt><dd><div class="description">{{ seminar.description|safe }}</div></dd>
               {% endif %}
index 41b62213dc839fed371a483944f0c294feb28bf1..68f7ecaa6c6d71022e8399ecf7f2e667e965a382 100644 (file)
@@ -12,6 +12,15 @@ $(function () {
         userCollapseText: 'Cacher le texte',
     });
 });
+
+$(function () {
+    $('div.keywords').expander({
+        slicePoint: 45,
+        expandText: 'Lire plus',
+        userCollapseText: 'Cacher le texte',
+    });
+});
+
 </script>
 {% endblock extra_javascript %}
 
@@ -36,7 +45,6 @@ $(function() {
 <div style="background: white;">
 <ul>
 {% block courses %}
-
 {% for seminar in all_seminars %}
    <li><a href="{% url teleforma-seminar-detail seminar.id %}">{{ seminar.title }}</a></li>
  {% endfor %}
@@ -97,10 +105,10 @@ $(function() {
             </div>
             <div class="course_description">
               <dl class="listing" style="font-size: 1.1em;">
-              {% if seminar.keywords.all %}<dt>{% trans "keywords" %}</dt><dd>{% for kw in seminar.keywords.all %}{{ kw }}, {% endfor %}</dd>{% endif %}
               <dt>{% trans "level" %}</dt><dd>{{ seminar.level }}</dd>
               <dt>{% trans "public concerned" %}</dt><dd>{{ seminar.concerned }}</dd>
               <dt>{% trans "duration" %}</dt><dd>{{ seminar.duration }}</dd>
+              {% if seminar.keywords.all %}<dt>{% trans "keywords" %}</dt><dd><div class="keywords">{% for kw in seminar.keywords.all %}{{ kw }}, {% endfor %}</div></dd>{% endif %}
               {% if seminar.description %}
               <dt>{% trans "description" %}</dt><dd><div class="description">{{ seminar.description|safe }}</div></dd>
               {% endif %}