sphinx_django/templates/comment.html
changeset 2 f5e18f8ed036
parent 0 54f784230511
--- a/sphinx_django/templates/comment.html	Thu Sep 30 15:59:32 2010 +0530
+++ b/sphinx_django/templates/comment.html	Fri Oct 15 15:59:28 2010 +0530
@@ -1,7 +1,54 @@
+<style type="text/css">
+.comment {
+  font-size: 90%;
+}
+
+
+
+
+.comment_body {
+  background: #eeeeff;
+}
+
+
+.comment_header {
+  opacity: 0.75;
+}
+
+.comment_id {
+  float: right;
+  opacity: 0.3;
+  font-size: 60%;
+}
+
+.comment_name {
+  font-weight: bolder;
+}
+
+
+.comment_date {
+  opacity: 0.75;
+}
+
+.comment_thanks {
+  color: darkblue;
+  margin-left: 1em;
+  font-style: italic;
+  font-weight: bolder;
+}
+
+.comment_error {
+  padding-left: 1em;
+  font-weight: bolder;
+  font-size: 80%;
+  color: darkred;
+}
+</style>
+
 {% ifequal length 1 %}
   <a class="commenttoggle" id="toggle_{{ id }}"
       onclick="return toggleComment('{{ id }}')"
-      href="comments: show / hide">One comment</a>
+      href="comments: show / hide">{{ length }} comments</a>
 {% else %}
   {% if length %}
     <a class="commenttoggle" id="toggle_{{ id }}"
@@ -10,47 +57,30 @@
   {% else %}
     <a class="commenttoggle" id="toggle_{{ id }}"
       onclick="return toggleComment('{{ id }}')"
-      href="comments: show / hide">No comments</a>
-    <div class="comment" {% if not newid %} style="display: none;" {% endif %}>
-      <div class="comment_body">Be the first to comment on this paragraph!</div>
-    </div>
+      href="comments: show / hide">0 comments</a>
+    <span class="comment" {% if not newid %} style="display: none;" {% endif %}>
+      <span class="comment_body">Be the first to comment on this paragraph!</span>
+    </span>
   {% endif %}
 {% endifequal %}
 {% for c in query %}
-  <div class="{% ifequal c.id newid %}new_{% endifequal %}comment"
+  <span class="{% ifequal c.id newid %}new_{% endifequal %}comment"
       {% if not newid %} style="display: none;" {% endif %}
     id="comment{{ c.id }}">
     <a name="comment{{ c.id }}"/>
-    <div class="comment_header">
-	<span class="comment_id"><a href="/admin/comments/comment/{{ c.id }}/">{{ c.id }}</a></span>
-      {% if c.submitter_url %}
-	<span class="comment_name"><a rel="nofollow"
-	  href="{{ c.submitter_url }}">{{ c.submitter_name|escape }}</a></span>
-      {% else %}
-	<span class="comment_name">{{ c.submitter_name|escape }}</span>
-      {% endif %}
-      <span class="comment_date">{{ c.date|date:"Y-m-d" }}</span>
-      {% if c.reviewed %}
-	<span class="comment_reviewed">(reviewed)</span>
-      {% endif %}
-      {% ifequal c.id newid %}
-	<span class="comment_thanks">thank you for your comment!</span>
-      {% endifequal %}
-    </div>
-    <div class="comment_body">{{ c.comment|escape|linebreaks }}</div>
-  </div>
+    <span class="comment_header">
+    </span>
+    <div class="comment_body">{{ forloop.counter }}   {{ c.submitter_name }}  {{ c.comment|escape|linebreaks }}</div>
+  </span>
 {% endfor %}
-<form class="comment" id="form_{{ id }}" action="/comments/submit/{{ id }}/"
-    method="post" {% if not newid %} style="display: none;" {% endif %}>
-  {{ form.id }}
+<form class="comment" id="form_{{ paragraph_id }}" action="/submit/{{  paragraph_id }}/"
+    method="post" >
   <table>
     <tbody>
-      <tr><td align="right" valign="top">Comment<br><a class="comment_help"
-		href="web.html#web.comment">[ help ]</a></td>
+      <tr><td align="right" valign="top">Comment<br></td>
 	  <td>{{ form.comment }}</td></tr>
       <tr><td align="right">Your name</td><td>{{ form.name }}
-	    <span class="comment_help"><b>Required</b> so we can <a
-		href="web.html#web.comment.name">give you credit</a></span></td></tr>
+	    <span class="comment_help"><b>Required</b> so we can give you credit</a></span></td></tr>
       <tr><td align="right">Your URL</td><td>{{ form.url }}
 	    <span class="comment_help"><b>Optional</b> link to blog, home page,
 	      <i>etc</i>.</span></td></tr>