Skip to content
Snippets Groups Projects
Commit 81f6ffb0 authored by Nico Vermaas's avatar Nico Vermaas
Browse files

show join/joined tasks as separate workflow icons

parent 747c5aee
Branches
No related tags found
1 merge request!316Joined operations
Pipeline #54548 passed
......@@ -321,6 +321,7 @@ class Task(models.Model):
@property
def task_type_join(self):
try:
# find out if this is a join/joined type of task, or just a regular task
if self.joined_output_task:
# this tasks has a designated output task, so it is an input task (join)
......@@ -332,7 +333,9 @@ class Task(models.Model):
return 'joined'
return 'regular'
except:
# 'the show must go on', don't crash if anything goes wrong, just show it as 'regular'
return 'regular'
@property
def joined_status(self):
......
......@@ -46,7 +46,6 @@
target="_blank"><i class="fas fa-diagram-predecessor"></i> {{ task.workflow.id }}
</a></td>
{% endif %}
</td>
<td>
{% if user.is_authenticated %}
......
......@@ -18,11 +18,29 @@
</td></tr>
<tr class="{{ task.status }}"><td><b>status</b></td><td>{{ task.status }}</td></tr>
<tr><td><b>workflow</b></td><td>
{% if task.task_type_join == 'regular' %}
<a class="open-modal btn btn-primary btn-sm"
href="{% url 'workflow-details' task.workflow.id %}"
data-popup-url="{% url 'workflow-details' task.workflow.id %}"
target="_blank"><i class="fas fa-project-diagram"></i> {{ task.workflow }}
</a>
</a></td>
{% endif %}
{% if task.task_type_join == 'joined' %}
<a class="open-modal btn btn-primary btn-sm"
href="{% url 'workflow-details' task.workflow.id %}"
data-popup-url="{% url 'workflow-details' task.workflow.id %}"
target="_blank"><i class="fas fa-diagram-successor"></i> {{ task.workflow }}
</a></td>
{% endif %}
{% if task.task_type_join == 'join' %}
<a class="open-modal btn btn-secondary btn-sm"
href="{% url 'workflow-details' task.workflow.id %}"
data-popup-url="{% url 'workflow-details' task.workflow.id %}"
target="_blank"><i class="fas fa-diagram-predecessor"></i> {{ task.workflow }}
</a></td>
{% endif %}
{% if user.is_staff %}
<a href="/atdb/admin/taskdatabase/workflow/{{ task.workflow }}/change/" class="btn btn-secondary btn-sm" target="_blank" role="button"><i class="fas fa-cog"></i> Edit</a>&nbsp;</td></tr>
{% endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment