{% extends 'base.html' %} {% load custom_tags_and_filters %} {% load static %} {% load tz %} {% block title %} {% if form.instance.id %} Edit publication {% else %} Create publication {% endif %} {% endblock %} {% block content %} {% with instance_id=form.instance.id other_authors=other_users|get_item:"authors" other_tools=other_users|get_item:"tools" other_projects=other_users|get_item:"projects" %}

{% if instance_id %} Edit publication {% else %} Create publication {% endif %}

{% if user.is_staff and not metadata.status %}
{% csrf_token %} {% button type="save" submit=False name="approve" title="Approve" icon="glyphicon-ok-circle" value="Approve" onclick="confirm_review_dialog(this);" %} {% button type="delete" submit=False name="reject" title="Reject" icon="glyphicon-ban-circle" value="Reject" onclick="confirm_review_dialog(this);" %}
{% endif %}

Publication Information

 
{% if metadata.image_url %}
Image
{{ metadata.title }} image
{% endif %}
{% if metadata.json_metadata %}
Metadata (JSON)
{{ metadata.json_metadata }}
{% endif %} {% if user_publication %}
{% url "reject_user_publication" user_publication.id as reject_user_publication_url %}
{% button type="delete" icon="glyphicon-ban-circle" value="Not my publication" url=reject_user_publication_url %}
{% endif %}
{% csrf_token %} {% if form.non_field_errors %}
{{ form.non_field_errors }}
{% endif %}
{% if authors_suggestion %} Suggested author(s): {{ authors_suggestion }} {% endif %} {% if other_authors.exists %}
Other users have added
    {% for author in other_authors.all %}
  • {{ author }}
  • {% endfor %}
{% endif %}
{% if form.authors.errors %}
{{ form.authors.errors|striptags }}
{% endif %}

{% if other_tools.exists %}
Other users have added
    {% for tool in other_tools.all %}
  • {{ tool }}
  • {% endfor %}
{% endif %}
{% if form.tools.errors %}
{{ form.tools.errors|striptags }}
{% endif %}

{% if other_projects.exists %}
Other users have added
    {% for project in other_projects.all %}
  • {{ project }}
  • {% endfor %}
{% endif %}
{% if form.projects.errors %}
{{ form.projects.errors|striptags }}
{% endif %}
{% button type="save" value="Save" %}
{% endwith %} {% endblock %}