{% extends "base.html" %} {% load i18n plmapp_tags %} {% block css %} {% endblock %} {% block content %}
{% if is_owner %} {% trans 'You have the rights of owner on this object' %} {% endif %}
{# promotion form #}
{% if is_signer or is_signer_dm %}

{% trans "If you promote or demote this object, you may not be allowed to undo this action." %}

{# show the list of previous revisions that will be cancelled/deprecated #}
{% if cancelled_revisions %}

{% trans "The following revisions will be cancelled:" %}

    {% for rev in cancelled_revisions %}
  • {% blocktrans with rev.revision as revision and rev.name as name %} Revision {{ revision }} : {{ name }} {% endblocktrans %}
  • {% endfor %}
{% endif %} {% if deprecated_revisions %}

{% trans "The following revisions will be deprecated:" %}

    {% for rev in deprecated_revisions %}
  • {% blocktrans with rev.revision as revision and rev.name as name %} Revision {{ revision }} : {{ name }} {% endblocktrans %}
  • {% endfor %}
{% endif %}
{{ password_form.as_p }}
{% endif %} {# first put error messages, then put buttons #} {% spaceless %}
{# demote #} {% if obj.state != obj.lifecycle.first_state %} {% if is_signer_dm %} {% if not obj.is_proposed %}

{% trans "You can not demote this object since its state is official or more advanced." %}

{% endif %} {% else %}

{% trans "You do not have the permission to demote this object." %}

{% endif %} {% endif %} {# promote #} {% if is_signer %} {% if not obj.is_promotable %}

{% trans "You can not promote this object:" %}

{{ obj.promotion_errors.as_ul }} {% endif %} {% else %}

{% trans "You do not have the permission to promote this object." %}

{% endif %} {# cancel #} {% if obj.is_draft and is_owner %} {% if not obj.can_cancel %} {% with obj.get_all_revisions|length as nb_revision %} {% if nb_revision > 1 %}

{% trans "You can not cancel this object since it has more than one revision." %}

{% endif %} {% endwith %} {% if obj.has_links %}

{% trans "You can not cancel this object since it is related to an other object (part , document)." %}

{% endif %} {% endif %} {% else %} {% if not is_owner %}

{% trans "You do not have the permission to cancel this object." %}

{% else %}

{% trans "You can not cancel this object since its state is more advanced than draft." %}

{% endif %} {% endif %}
{% endspaceless %} {# buttons #} {% if obj.state != obj.lifecycle.first_state and is_signer_dm and obj.is_proposed %} {% endif %} {% if is_signer and obj.is_promotable %} {% endif %}
{# cancel #} {% if obj.can_cancel %}

{% trans "Warning, if you cancel this object, it won't be anymore accessible to everyone." %}

{{ password_form.as_p }}
{# button #}
{% endif %} {# publish #} {% if obj.can_publish %}

{% trans "Warning, if you publish this object, it will be accessible to everyone, including anonymous users." %}

{{ password_form.as_p }}
{# button #}
{% endif %} {# unpublish #} {% if obj.can_unpublish %}

{% trans "Warning, if you unpublish this object, it won't be anymore accessible to everyone." %}

{{ password_form.as_p }}
{# button #}
{% endif %} {% if obj.published %}

{% trans "This object has been published:" %} {% trans "Public link" %}

{% endif %} {# lifecycle : display all states #}
{% for status, is_current_state, signer, link_id in object_lifecycle %}
{{status}}
{% if not forloop.last %}
>
{% if signer %} {{signer}}
{% if is_owner %} {% trans "REPLACE" %} {% endif %}
{% endif %}
{% endif %} {% endfor %}
{# owner and notified users #}
{% if is_owner %} {% trans "Notify" %} {% else %} {% if is_notified %}
{% else %} {% if can_notify %}
{{ notify_self_form.as_p }}
{% endif %} {% endif %} {% endif %} {% if obj.is_official and in_group %} {% trans "Give access to a restricted account" %} {% endif %} {% with reader_list as object_management_list %} {% with in_group as can_delete %} {% include "snippets/management_block.html" %} {% endwith %} {% endwith %} {% with notified_list as object_management_list %} {% with is_owner as can_delete %} {% include "snippets/management_block.html" %} {% endwith %} {% endwith %} {% with owner_list as object_management_list %} {% with is_owner as can_delete %} {% include "snippets/management_block.html" %} {% endwith %} {% endwith %}
{% endblock %}