{% extends "base.html" %}
{% load i18n %}

{% block title %}
    {% if resource %}
        {%blocktrans%}Edit Resource{%endblocktrans%}
    {% else %}
        {%blocktrans%}New Resource{%endblocktrans%}
    {% endif %}
{% endblock %}

{% block breadcrumb %}
    {# <a href="/">Home</a> > {% if content %}{{ content.headline }}{% else %}{%blocktrans%}New {{content_type}}{%endblocktrans%}{% endif %} #}
{% endblock %}

{% block content %}
    {% if resource %}
        <h1><a href="{% url twistranet.views.resource_by_id resource.id %}">{%blocktrans%}Edit Resource{%endblocktrans%}</a></h1>     
        <form enctype="multipart/form-data"
              action="{{ path }}"
              method="post"
              class="edit-form enableAutoFocus enableUnloadProtect">
    {% else %}
        <h1>{%blocktrans%}New Resource{%endblocktrans%}</h1>
        <form enctype="multipart/form-data"
              action="{{ path }}"
              method="post"
              class="edit-form enableAutoFocus enableUnloadProtect">
    {% endif %}
        <fieldset>
        {% for field in form %}
            <div class="fieldWrapper">
                {{ field.errors }}
                {{ field.label_tag }} {{ field }}    
                <div class="clear"><!-- --></div>
            </div>
        {% endfor %}
        {% csrf_token %}
        <div class="form-controls">
          <input type="submit" value="{% trans 'Save' %}" /> 
          <input type="reset" value="{% trans 'Undo' %}" />
        </div>
        </fieldset>
    </form>
    
{% endblock %}

{% block contextbar %}
    {% include 'account/profile.box.html' %}
{% endblock %}

