{% load i18n %}
{% load lfc_tags %}

<h2 class="first-heading">
    {% trans "Metadata" %}
</h2>

{% ifhasperm edit %}
    <form action="{% url 'lfc_save_meta_data' obj.id %}"
          method="POST">

            {% include "lfc/manage/lfc_form.html" %}

            <div class="field">
                <div class="label">
                    <label>{% trans "Creation date" %}:</label>
                </div>
                <div>
                    {{ obj.creation_date|date:"Y-m-d H:i:s" }}
                </div>
            </div>

            <div class="field">
                <div class="label">
                    <label>{% trans "Modification date" %}:</label>
                </div>
                <div>
                    {{ obj.modification_date|date:"Y-m-d H:i:s" }}
                </div>
            </div>


        <input class="ajax-submit"
               type="submit"
               value="{% trans 'Save metadata' %}" />
    </form>
    <script type="text/javascript">
        bind_datetime_picker("{{ CURRENT_LANGUAGE }}")
    </script>
{% else %}
    {% include "lfc/manage/lfc_form_view.html" %}
    <div class="field">
        <div class="label">
            <label>{% trans "Creation date" %}:</label>
        </div>
        <div>
            {{ obj.creation_date }}
        </div>
    </div>

    <div class="field">
        <div class="label">
            <label>{% trans "Modification date" %}:</label>
        </div>
        <div>
            {{ obj.modification_date }}
        </div>
    </div>
{% endifhasperm %}
