{# # This file is part of Invenio. # Copyright (C) 2012, 2013, 2014, 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # Invenio is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Invenio; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. #} {% extends "workflows/base.html" %} {% import 'workflows/utils.html' as utils %} {% block header%} {{ super() }} {% bundles "workflows.js", "workflows.css", "jquery.js" %} {% endblock header %} {% block javascript %} {{ super() }} {%- endblock javascript %} {% block hpbody %} {% block hp_navbar %} {% endblock %}
{% block hpbody_details %} {% block action_side %} {% if "side" in rendered_actions %} {{ rendered_actions["side"]|safe }} {% endif %} {% endblock %} {% block workflow_history %} {% set current_task = bwobject.get_current_task_info() %} {% if current_task %}

{{ _('Current task') }}

{{ utils.display_task(current_task.get("nicename"), current_task.get("doc"), current_task.get("parameters"), current_task.get("name"), id|length, true) }}

{{ _('Restart this task') }}

{% endif %}

{{ _('Workflow') }}

{{ workflow.name|truncate(25, True)|u }}

{% if task_history %}
{{ _('Completed tasks') }}
{% endif %}
{{ _('Definition') }}
{# This row is needed to avoid a weird collapsing effect. #}
{% set id = [] %} {% if task_history %}
{{ _('Completed tasks') }}:
{% for item in task_history %} {% if item %} {{ utils.display_task(item.get("nicename"), item.get("doc"), item.get("parameters"), item.get("name"), id|length, true) }} {% do id.append(1) %} {% endif %} {% endfor %}
{% endif %}
{{ _('Workflow definition') }}:
{{ utils.display_workflow_definition(workflow_definition, id) }}
{% endblock %} {% block workflow_error %} {% if bwobject.get_error_message() %}

{{ _('Error occurred') }}

{{ bwobject.get_extra_data()['_last_task_name'] }}
{% endif %} {% endblock %} {% block object_history %} {% if history_objects %}

{{ _('History') }}

{{ _('More') }}
{% for object in history_objects %} {% endfor %}
{% if object.id == bwobject.id %} {{ _('current') }} {% else %} {{ object.id }} {% endif %} {{ object.message }} {{ pretty_date(object.modified) }}
{{ _('Delete this object') }}
{% endif %} {% endblock %} {% block workflow_information %}

{{ _('Other information') }}

{{ _('More') }}
{# This row is needed to avoid a weird collapsing effect. #}
{% for key, value in info.items() %} {% endfor %}
{{ _("status") }} {{ bwobject.message }}
{{ key }} {{ value }}
{% endblock %} {% endblock %}
{% block hp_details_main %} {% block hp_action_main %} {% if "main" in rendered_actions %} {{ rendered_actions["main"]|safe }} {% endif %} {% endblock %} {%- block action_alert -%} {% if 'message' in bwobject.get_extra_data() and bwobject.get_action() != None %}
{{ bwobject.get_extra_data()['_message'] }}
{% endif %} {%- endblock -%} {%- block workflow_completed -%} {% if bwobject.version == 1 %}
{{ _('Workflow completed with success') }} ×
{% elif bwobject.version == 3 %}
{{ _('Object is currently processing') }} ×
{% endif %} {%- endblock -%} {% block hp_preview %} {{ _('Display:') }}
{{ data_preview|safe }}
{% endblock %} {% block hp_task_results %} {% if task_results %} {% for template in task_results.values() %} {{ template|safe }} {% endfor %} {% endif %} {% endblock %} {% block hp_task_logs %}
{{ _("Task logs") }}
{% for entry in bwobject.get_log() %} {{ entry.created }}: {{ entry.message }} {% endfor %}
{% endblock %} {% endblock %}
{% endblock %}