Comments fully integrated.
[~kgodey/maayanwich.git] / templates / comments / moderation_queue.html
diff --git a/templates/comments/moderation_queue.html b/templates/comments/moderation_queue.html
new file mode 100644 (file)
index 0000000..73012b3
--- /dev/null
@@ -0,0 +1,75 @@
+{% extends "admin/change_list.html" %}
+{% load adminmedia i18n %}
+
+{% block title %}{% trans "Comment moderation queue" %}{% endblock %}
+
+{% block extrahead %}
+  {{ block.super }}
+  <style type="text/css" media="screen">
+    p#nocomments { font-size: 200%; text-align: center; border: 1px #ccc dashed; padding: 4em; }
+    td.actions { width: 11em; }
+    td.actions form { display: inline; }
+    td.actions form input.submit { width: 5em; padding: 2px 4px; margin-right: 4px;}
+    td.actions form input.approve { background: green; color: white; }
+    td.actions form input.remove { background: red; color: white; }
+  </style>
+{% endblock %}
+
+{% block branding %}
+<h1 id="site-name">{% trans "Comment moderation queue" %}</h1>
+{% endblock %}
+
+{% block breadcrumbs %}{% endblock %}
+
+{% block content %}
+{% if empty %}
+<p id="nocomments">{% trans "No comments to moderate" %}.</p>
+{% else %}
+<div id="content-main">
+  <div class="module" id="changelist">
+    <table cellspacing="0">
+      <thead>
+        <tr>
+          <th>{% trans "Action" %}</th>
+          <th>{% trans "Name" %}</th>
+          <th>{% trans "Comment" %}</th>
+          <th>{% trans "Email" %}</th>
+          <th>{% trans "URL" %}</th>
+          <th>{% trans "Authenticated?" %}</th>
+          <th>{% trans "IP Address" %}</th>
+          <th class="sorted desc">{% trans "Date posted" %}</th>
+        </tr>
+    </thead>
+    <tbody>
+      {% for comment in comments %}
+        <tr class="{% cycle 'row1' 'row2' %}">
+          <td class="actions">
+            <form action="{% url comments-approve comment.pk %}" method="post">
+              <input type="hidden" name="next" value="{% url comments-moderation-queue %}" />
+              <input class="approve submit" type="submit" name="submit" value="{% trans "Approve" %}" />
+            </form>
+            <form action="{% url comments-delete comment.pk %}" method="post">
+              <input type="hidden" name="next" value="{% url comments-moderation-queue %}" />
+              <input class="remove submit" type="submit" name="submit" value="{% trans "Remove" %}" />
+            </form>
+          </td>
+          <td>{{ comment.name }}</td>
+          <td>{{ comment.comment|truncatewords:"50" }}</td>
+          <td>{{ comment.email }}</td>
+          <td>{{ comment.url }}</td>
+          <td>
+            <img
+              src="{% admin_media_prefix %}img/admin/icon-{% if comment.user %}yes{% else %}no{% endif %}.gif"
+              alt="{% if comment.user %}{% trans "yes" %}{% else %}{% trans "no" %}{% endif %}"
+            />
+          </td>
+          <td>{{ comment.ip_address }}</td>
+          <td>{{ comment.submit_date|date:"F j, P" }}</td>
+        </tr>
+      {% endfor %}
+    </tbody>
+    </table>
+  </div>
+</div>
+{% endif %}
+{% endblock %}