wcs/wcs/templates/wcs/backoffice/workflow-status.html

113 lines
3.4 KiB
HTML

{% extends "wcs/backoffice.html" %}
{% load i18n %}
{% block appbar-title %}{{ status.name }}{% endblock %}
{% block content %}
{{ block.super }}
{% if status.get_visibility_restricted_roles %}
<div class="bo-block">
{% trans "This status is hidden from the user." %}
{% if not workflow.is_readonly %}
(<a href="display" rel="popup">{% trans "change" %}</a>)
{% endif %}
</div>
{% endif %}
{% if not status.items %}
<div class="infonotice">
{% trans "There are not yet any items in this status." %}
</div>
{% else %}
{% spaceless %}
<div class="bo-block">
{% if workflow.is_readonly %}
<ul id="items-list" class="biglist sortable readonly">
{% else %}
<p class="hint">{% trans "Use drag and drop with the handles to reorder items." %}</p>
<ul id="items-list" class="biglist sortable">
{% endif %}
{% for item in status.items %}
<li class="biglistitem" id="itemId_{{ item.id }}">
<a href="items/{{ item.id }}/">{{ item.render_as_line|safe }}</a>
<p class="commands">
{% with item.get_target_status_url as url %}
{% if url %}<span class="jump"><a href="{{ url }}" title="{% trans "Go to Target" %}">{% trans "Go to Target" %}</a></span>{% endif %}
{% endwith %}
{% if not workflow.is_readonly %}
<span class="edit"><a href="items/{{ item.id }}/" title="{% trans "Edit" %}">{% trans "Edit" %}</a></span>
<span class="remove"><a href="items/{{ item.id }}/delete" rel="popup" title="{% trans "Delete" %}">{% trans "Delete" %}</a></span>
{% endif %}
</p>
</li>
{% endfor %}
</ul>
</div>
{% endspaceless %}
{% endif %}
{% with source_statuses=view.get_source_statuses %}
{% if source_statuses %}
<div class="bo-block">
<h3>{% trans "Jumps" %}</h3>
<p>{% trans "This status is reachable from the following status:" %}
{% for source in source_statuses %}
<a href="../{{ source.id }}/">{{ source.name }}</a>{% if not forloop.last %}, {% endif %}
{% endfor %}
</p>
</div>
{% endif %}
{% endwith %}
<p><a href="../../">{% trans "Back to workflow main page" %}</a></p>
<div class="bo-block">
{{ view.graphviz|safe }}
<div class="full-screen-link"><a href="schema.svg">{% trans "Full Screen" %}</a></div>
</div>
{% endblock %}
{% block sidebar-content %}
{% if workflow.is_default %}
<p>
{% blocktrans %}
This is the default workflow, you cannot edit it but you can
duplicate it to base your own workflow on it.
{% endblocktrans %}
</p>
{% elif workflow.is_readonly %}
<div class="infonotice"><p>{% trans "This workflow is readonly." %}</p></div>
{% else %}
{% if status.is_endpoint %}
<div class="infonotice">
<p>
{% if status.forced_endpoint %}
{% trans "This status has been manually set to be considered as terminal." %}
<br><a href="endpoint" rel="popup">{% trans "Unforce Terminal Status" %}</a>
{% elif status.is_endpoint %}
{% trans "This status has been automatically evaluated as being terminal." %}
{% endif %}
</p>
</div>
{% endif %}
<ul id="sidebar-actions">
<li><a href="edit" rel="popup">{% trans "Change Status Name" %}</a></li>
<li><a href="display" rel="popup">{% trans "Change Display Settings" %}</a></li>
{% if not status.forced_endpoint %}
<li><a href="endpoint" rel="popup">{% trans "Force Terminal Status" %}</a></li>
{% endif %}
<li><a href="backoffice-info-text" rel="popup">{% trans "Change Backoffice Information Text" %}</a></li>
<li><a href="delete" rel="popup">{% trans "Delete" %}</a></li>
</ul>
<div id="new-field">
<h3>{% trans "New Action" %}</h3>
{{ view.get_new_item_form.render|safe }}
</div>
{% endif %}
{% endblock %}