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

show join/joined tasks as separate workflow icons

parent 59e51012
No related branches found
No related tags found
1 merge request!316Joined operations
Pipeline #54546 passed
......@@ -318,6 +318,22 @@ class Task(models.Model):
return finished
@property
def task_type_join(self):
# 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)
return 'join'
joined_input_tasks = self.joined_input_tasks.all()
if joined_input_tasks.count()>0:
# this task has input tasks, so it is an output task (joined)
return 'joined'
return 'regular'
@property
def joined_status(self):
# if a task has joined_input_tasks, then check their status
......
......@@ -20,6 +20,8 @@
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<link href='https://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.2/css/all.css" integrity="sha384-/rXc/GQVaYpyDdyxK+ecHPVYJSN9bmVFBvjA/9eOB+pb3F2w2N6fc5qB9Ew5yIns" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v6.4.0/css/all.css" crossorigin="anonymous">
<link href="{% static 'fontawesome_free/css/all.min.css' %}" rel="stylesheet" type="text/css">
<link href="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap4-toggle@3.6.1/css/bootstrap4-toggle.min.css" rel="stylesheet">
......
......@@ -31,7 +31,7 @@
{% include 'taskdatabase/pagination.html' %}
</div>
</div>
<p class="footer"> Version 18 July 2023
<p class="footer"> Version 27 July 2023
</div>
{% include 'taskdatabase/refresh.html' %}
......
......@@ -25,11 +25,28 @@
{% endif %}
</td>
<td>
<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.id }}
</a></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.id }}
</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.id }}
</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.id }}
</a></td>
{% endif %}
</td>
<td>
{% if user.is_authenticated %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment