{% extends "txcollections/base.html" %}
{% load i18n %}
{% load txcommontags %}

{% block title %}
  {% if not collection %}{{ block.super }} | {% trans "Add a collection" %}
  {% else %}{{ block.super }} | {% blocktrans with collection.name as collection_name %}Edit {{ collection_name}}{% endblocktrans %}{% endif %}
{% endblock %}

{% block breadcrumb %}
  {% if not collection %}{{ block.super }} &raquo; {% trans "Add a collection" %}
  {% else %}{{ block.super }} &raquo; {% blocktrans with collection.name as collection_name %}Edit <em>{{ collection_name}}</em>{% endblocktrans %}{% endif %}
{% endblock %}

{% block content_title %}
  {% if not collection %}
    <h2 class="pagetitle">{% trans "Add a collection" %}</h2>
  {% else %}
    <h2 class="pagetitle">
      {% blocktrans with collection.name as collection_name and collection.get_absolute_url as collection_url %}Editing <a href="{{ collection_url }}">{{ collection_name }}</a>{% endblocktrans %}
    </h2>
  {% endif %}
{% endblock %}

{% block content %}
  <div class="collection_create generic_form">
  {% if form_message %}
    <p class="message i16 bell">{{ form_message }}</p>
  {% endif %}
  <form action='' method='post'>
  <table>
  <tbody>
    {% form_as_table_rows form %}
  </tbody>
  </table>
  <p class="submit"><input type="submit" class="i16 submit" value="{% trans "Save collection" %}" /></p>
  </form>
  </div>
{% endblock %}
