Skip to content

Commit

Permalink
adjusted collapsing states, added trash can icon
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahvgls committed Nov 19, 2024
1 parent 2d636ab commit 68f6e04
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ui/runs/templates/runs/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<!-- <div id="collapse_{{ section.id }}"
class="collapse{% if section.selected %} show {% endif %}"> -->
<div id="collapse_{{ section.id }}"
class="collapse">
class="collapse {% if section.selected %} show {% endif %}">
<div class="card-body my-2">
{% include "runs/sidebar_section.html" with section=section run_name=run_name %}
</div>
Expand Down
17 changes: 9 additions & 8 deletions ui/runs/templates/runs/sidebar_section.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{# params: run_name section{id, name, finished, selected, possible_steps{id, name, methods{id, name, description}}, steps{id, name, finished, selected, index, method_name}} #}

<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">

{% block js %}
<script>
$(function () {
Expand All @@ -13,7 +15,7 @@
<div>
{% for step in section.steps %}
<div class="wrapper {% if step.selected %}selected{% endif %} {% if step.finished %}finished{% endif %} d-flex align-items-center">
<form action="{% url 'runs:navigate' run_name %}" method="post" class="ms-auto">
<form action="{% url 'runs:navigate' run_name %}" method="post">
{% csrf_token %}
<input type="hidden" name="section_name" value="{{ section.id }}">
<input type="hidden" name="index" value="{{ step.index }}">
Expand All @@ -24,16 +26,15 @@

{% if not step.selected and not step.finished %}
{# button to remove step from workflow #}
<form action="{% url 'runs:delete_step' run_name %}" method="post">
<form action="{% url 'runs:delete_step' run_name %}" method="post" class="ms-auto">
{% csrf_token %}
<input type="hidden" name="index" value="{{ step.index }}">
<input type="hidden" name="section" value="{{ step.section }}">
<button class="removeBtn btn d-flex justify-content-center align-items-end mt-1">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="grey" class="bi bi-trash removeIcon">
<path d="M5.5 5.5v7h1v-7h-1zm3 0v7h1v-7h-1z"/>
<path d="M11 1.5H5l-.5.5H3.5A.5.5 0 0 0 3 2.5v1a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5H11.5l-.5-.5zm-7 1h6l.5.5h-7l.5-.5zm1.25 3v7A.75.75 0 0 0 7 13.75h2A.75.75 0 0 0 9.75 12v-7H5.25z"/>
</svg>
</button>
<button class="removeBtn btn d-flex justify-content-center">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="grey" class="bi bi-trash3-fill" viewBox="0 0 16 16">
<path d="M2.5 1a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1H3v9a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V4h.5a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H10a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1zm3 4a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-1 0v-7a.5.5 0 0 1 .5-.5M8 5a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-1 0v-7A.5.5 0 0 1 8 5m3 .5v7a.5.5 0 0 1-1 0v-7a.5.5 0 0 1 1 0"/>
</svg>
</button>
</form>
{% endif %}

Expand Down

0 comments on commit 68f6e04

Please sign in to comment.