{% extends "base.html" %} {% block title %}Decision — MartinhalApprovalFlow{% endblock %} {% block content %}
{% if stage == 'notfound' %}

Link not valid

This decision link doesn't match any request. It may have been mistyped or removed.

{% elif stage == 'confirm' %} {% if req.status != 'pending' %}

Already decided

Request #{{ req.id }} was already {{ req.status }} {% if req.decided_by %} by {{ req.decided_by }}{% endif %}.

{% else %}

{% if action == 'approve' %}Approve{% else %}Deny{% endif %} this request?

Workflow {{ req.wf_name }} · request #{{ req.id }} · approval step {{ req.current_step + 1 }} of {{ chain | length }}

From: {{ req.requester }}
Subject: {{ req.subject }}

{{ req.body }}
{% if req.attachment %}

Attachment: {{ req.attachment.split('_', 1)[-1] }} — sent to you in the approval email.

{% endif %}
{% if error %}
{{ error }}
{% endif %} {% if action == 'deny' %} {% endif %}
{% if action == 'approve' %} {% if req.current_step + 1 < chain | length %}

Approving sends the request to the next approver: {{ chain[req.current_step + 1] }}.

{% else %}

You are the last approver — approving completes the workflow and notifies everyone involved.

{% endif %} {% else %}

Denying stops the workflow immediately and notifies everyone involved so far.

{% endif %} {% endif %} {% elif stage == 'done' %} {% if status == 'ok' %}

{% if req.status == 'pending' %} step approved {% else %} {{ req.status }} {% endif %}

Request #{{ req.id }}

{{ message }}

{% else %}

{{ message }}

{% endif %} {% endif %}
{% endblock %}