{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "questions/base.html" %} {# TODO: liberate - remove questions dependency #}
{% set title = _('Flagged Content Pending Moderation') %}
{% set classes = 'flagged' %}

{% block content %}
  <div id="flagged-queue">
    <h1>{{ _('Flagged Content Pending Moderation') }}</h1>
    {% for object in objects %}
      {% if loop.first %}<ul>{% endif %}
      <li class="{{ object.content_type }}">
        {% if object.content_object %}
          <hgroup>
            <h2>{{ _('Flagged {t} (Reason: {r})')|f(t=object.content_type, r=object.get_reason_display()) }}</h2>
            {% if object.notes %}
              <h3 class="notes">{{ _('Other reason:') }} {{ object.notes }}</h3>
            {% endif %}
          </hgroup>
          <div class="wrap">
            {% include 'flagit/includes/flagged_%s.html' % object.content_type %}
            <h3>{{ _('Update Status:') }}</h3>
            <form class="update" action="{{ url('flagit.update', object.id) }}" method="post">
              {{ csrf() }}
              <select name="status">
                <option value="">{{ _('Please select...') }}</option>
                <option value="1">{{ _('The flag is valid and I fixed the issue.') }}</option>
                <option value="2">{{ _('The flag is invalid.') }}</option>
              </select>
              <input type="submit" class="btn" value="Update" />
            </form>
          </div>
        {% else %}
          {{ _('Oops! {t} {id} no longer exists.')|f(t=object.content_type, id=object.object_id) }}
        {% endif %}
      </li>
      {% if loop.last %}</ul>{% endif %}
    {% else %}
     <p>{{ _('There is no flagged content pending moderation.') }}</p>
    {% endfor %}
  </div>
{% endblock %}

{% block side %}
{% endblock %}
