]> gitweb.fperrin.net Git - djsite.git/blobdiff - quotes/templates/quotes/display.html
Hide by default details about the quotes
[djsite.git] / quotes / templates / quotes / display.html
index 1369e2ce96f2ac30abb2d9388aa564f587fe66cc..2e09b3540a957c03c4613b1ba4fcc72a72eef490 100644 (file)
@@ -3,23 +3,36 @@
     {{ quote.text }}
   </p>
 
-  <p class="author">
-    — <span class="name"><a href="{% url 'quotes:author' quote.author.id %}">
-       {{ quote.author.name }}
-    </a></span>
-  </p>
+  <div class="details">
+    <p id="details_{{ quote.id}}_button">
+      <a href="" class="show_details"
+         onclick="showDetails('details_{{ quote.id }}'); return false;">
+       Show details</a></p>
+    <div class="hidden_details" id="details_{{ quote.id }}">
+      <p><a href="" class="hide_details"
+           onclick="hideDetails('details_{{ quote.id }}'); return false;">
+         Hide details</a></p>
+      <p class="author">
+       — <span class="name">
+         <a href="{% url 'quotes:author' quote.author.id %}">
+           {{ quote.author.name }}
+         </a>
+       </span>
+      </p>
 
-  {% if quote.tags.all %}
-    <p class="tags">
-      Tags:
-      {% for tag in quote.tags.all %}
+      {% if quote.tags.all %}
+      <p class="tags">
+       Tags:
+       {% for tag in quote.tags.all %}
        <a href="{% url 'quotes:tags' tag.id %}" class="tag_link">
          {{ tag.tag }}
        </a>
-      {% endfor %}
-    </p>
-  {% endif %}
+       {% endfor %}
+      </p>
+      {% endif %}
 
+    </div> <!-- /hidden_details -->
+  </div>   <!-- /details -->
   <p class="permalink">
     <a href="{% url 'quotes:onequote' quote.id %}">Permalink</a>
   </p>