sphinx_django/templates/comment.html
changeset 0 54f784230511
child 2 f5e18f8ed036
equal deleted inserted replaced
-1:000000000000 0:54f784230511
       
     1 {% ifequal length 1 %}
       
     2   <a class="commenttoggle" id="toggle_{{ id }}"
       
     3       onclick="return toggleComment('{{ id }}')"
       
     4       href="comments: show / hide">One comment</a>
       
     5 {% else %}
       
     6   {% if length %}
       
     7     <a class="commenttoggle" id="toggle_{{ id }}"
       
     8       onclick="return toggleComment('{{ id }}')"
       
     9       href="comments: show / hide">{{ length }} comments</a>
       
    10   {% else %}
       
    11     <a class="commenttoggle" id="toggle_{{ id }}"
       
    12       onclick="return toggleComment('{{ id }}')"
       
    13       href="comments: show / hide">No comments</a>
       
    14     <div class="comment" {% if not newid %} style="display: none;" {% endif %}>
       
    15       <div class="comment_body">Be the first to comment on this paragraph!</div>
       
    16     </div>
       
    17   {% endif %}
       
    18 {% endifequal %}
       
    19 {% for c in query %}
       
    20   <div class="{% ifequal c.id newid %}new_{% endifequal %}comment"
       
    21       {% if not newid %} style="display: none;" {% endif %}
       
    22     id="comment{{ c.id }}">
       
    23     <a name="comment{{ c.id }}"/>
       
    24     <div class="comment_header">
       
    25 	<span class="comment_id"><a href="/admin/comments/comment/{{ c.id }}/">{{ c.id }}</a></span>
       
    26       {% if c.submitter_url %}
       
    27 	<span class="comment_name"><a rel="nofollow"
       
    28 	  href="{{ c.submitter_url }}">{{ c.submitter_name|escape }}</a></span>
       
    29       {% else %}
       
    30 	<span class="comment_name">{{ c.submitter_name|escape }}</span>
       
    31       {% endif %}
       
    32       <span class="comment_date">{{ c.date|date:"Y-m-d" }}</span>
       
    33       {% if c.reviewed %}
       
    34 	<span class="comment_reviewed">(reviewed)</span>
       
    35       {% endif %}
       
    36       {% ifequal c.id newid %}
       
    37 	<span class="comment_thanks">thank you for your comment!</span>
       
    38       {% endifequal %}
       
    39     </div>
       
    40     <div class="comment_body">{{ c.comment|escape|linebreaks }}</div>
       
    41   </div>
       
    42 {% endfor %}
       
    43 <form class="comment" id="form_{{ id }}" action="/comments/submit/{{ id }}/"
       
    44     method="post" {% if not newid %} style="display: none;" {% endif %}>
       
    45   {{ form.id }}
       
    46   <table>
       
    47     <tbody>
       
    48       <tr><td align="right" valign="top">Comment<br><a class="comment_help"
       
    49 		href="web.html#web.comment">[ help ]</a></td>
       
    50 	  <td>{{ form.comment }}</td></tr>
       
    51       <tr><td align="right">Your name</td><td>{{ form.name }}
       
    52 	    <span class="comment_help"><b>Required</b> so we can <a
       
    53 		href="web.html#web.comment.name">give you credit</a></span></td></tr>
       
    54       <tr><td align="right">Your URL</td><td>{{ form.url }}
       
    55 	    <span class="comment_help"><b>Optional</b> link to blog, home page,
       
    56 	      <i>etc</i>.</span></td></tr>
       
    57       <tr><td align="right">Remember you?</td><td>{{ form.remember }}</td></tr>
       
    58       <tr><td/><td><input name="submit" type="submit"
       
    59 	      value="Submit Comment"/><span class="comment_error">{{ error }}</span></td></tr>
       
    60     </tbody>
       
    61   </table>
       
    62 </form>