SEESenv/web/hgbook/templates/comment.html
author amit@thunder
Wed, 10 Mar 2010 17:39:26 +0530
changeset 45 b5bff924ef69
parent 2 52d12eb31c30
permissions -rwxr-xr-x
Some more changes to soup is made in final html also comment.html has been changed so the links don't appear

{% ifequal length 1 %}
  <a class="commenttoggle" id="toggle_{{ id }}"
      onclick="return toggleComment('{{ id }}')"
      href="comments: show / hide">One comment</a>
{% else %}
  {% if length %}
    <a class="commenttoggle" id="toggle_{{ id }}"
      onclick="return toggleComment('{{ id }}')"
      href="comments: show / hide">{{ length }} comments</a>
  {% 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>
  {% endif %}
{% endifequal %}
{% for c in query %}
  <div 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="/review/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>
{% endfor %}
<form class="comment" id="form_{{ id }}" action="/review/comments/submit/{{ id }}/"
    method="post" {% if not newid %} style="display: none;" {% endif %}>
  {{ form.id }}
  <table>
    <tbody>
      <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></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>
      <tr><td align="right">Remember you?</td><td>{{ form.remember }}</td></tr>
      <tr><td/><td><input name="submit" type="submit"
	      value="Submit Comment"/><span class="comment_error">{{ error }}</span></td></tr>
    </tbody>
  </table>
</form>