ZuluPro/myblog

View on GitHub
myblog/myapp/templates/comments/zinnia_entry_preview.html

Summary

Maintainability
Test Coverage
{% extends "zinnia/base.html" %}
{% load i18n zinnia comments %}

{% block title %}{% trans "Comment preview" %}{% endblock title %}

{% block body-class %}comment-preview{% endblock body-class %}

{% block content %}
 <section>
 <div class="content">
  {% if form.errors %}
  <aside>{% blocktrans count errors=form.errors|length %}Please correct following error.{% plural %}Please correct following errors.{% endblocktrans %}</aside>
  {% else %}
  <h2>{% trans "Preview of the comment" %}</h2>
  <ol id="comment-list">
    {% with comment=form.get_comment_object %}
    <li id="comment-preview" class="comment vcard box1">
      <img src="{% get_gravatar comment.email 60 "G" %}"
           class="gravatar photo" alt="{{ comment.name }}" />
      <p class="comment-info">
    {% if comment.url %}
    <a href="{{ comment.url }}" rel="external nofollow"
           class="fn url">{{ comment.name }}</a>
    {% else %}
    {{ comment.name }}
    {% endif %}
    {% trans "on" context "on date" %}
        <abbr class="comment-published" title="{{ comment.submit_date|date:"c" }}">
          {{ comment.submit_date|date:"SHORT_DATETIME_FORMAT" }}
        </abbr>
      </p>
      {{ comment.comment|linebreaks }}
    </li>
    {% endwith %}
  </ol>
  {% endif %}
  {% include "comments/zinnia/entry/form.html" %}
 </div>
 </section>
{% endblock content %}