{% if not workload.approved and profile.approver and profile.user.username != workload.author %}
Approve
{% elif not workload.approved and request.user.is_superuser %}
Approve
{% else %}
Approve
{% endif %}
{% if workload.finished and not workload.passed and not workload.failed and profile.approver %}
Restart
{% elif workload.finished and not workload.passed and not workload.failed and profile.user.username == workload.author %}
Restart
{% elif workload.finished %}
Restart
{% endif %}
{% if not workload.finished and profile.approver %}
Stop
{% elif not workload.finished and profile.user.username == workload.author %}
Stop
{% elif not workload.finished %}
Stop
{% endif %}
{% if profile.approver or profile.user.username == workload.author %}
{% if workload.deleted %}
Restore
{% else %}
Delete
{% endif %}
{% else %}
{% if workload.deleted %}
Restore
{% else %}
Delete
{% endif %}
{% endif %}
{% if type == "TEST" or type == "DATAGEN" %}
{% endif %}
{% if workload.upload_pgns != "FALSE" %}
{% endif %}
{% if type == "TUNE" %}
{% endif %}
{% if type == "TUNE" %}
{% endif %}
{% if type == "TEST" %}
{{workload|longStatBlock|linebreaksbr}}
{% elif type == "TUNE" %}
{{workload|shortStatBlock|linebreaksbr}}
{% elif type == "DATAGEN" %}
{{workload|longStatBlock|linebreaksbr}}
{% endif %}