generated from MinBZK/python-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for duplicating task cards on drag
- Loading branch information
1 parent
88db620
commit 0faa762
Showing
3 changed files
with
39 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,28 @@ | ||
{% macro render_task_card(task) -%} | ||
{% include "task.html.jinja" %} | ||
{%- endmacro -%} | ||
|
||
{% macro column(status, translations, tasks_service) -%} | ||
<div class="col span_1_of_4"> | ||
<h3 class="text-center-horizontal margin-bottom--small">{{ translations[status.name] }}</h3> | ||
<div class="progress_cards_container sortable" data-id="{{ status.id }}" id="column-{{ status.id }}"> | ||
{% for task in tasks_service.get_tasks(status.id) %} | ||
{{ render_task_card(task) }} | ||
{{ render_task_card_full(task) }} | ||
{% endfor %} | ||
</div> | ||
</div> | ||
{% endmacro -%} | ||
|
||
{% macro render_task_card_full(task) -%} | ||
<div class="progress_card_container" data-target-id="card-content-{{ task.id }}" id="card-container-{{ task.id }}" data-id="{{ task.id }}"> | ||
{{ render_task_card_content(task) }} | ||
</div> | ||
{% endmacro %} | ||
|
||
{% macro render_task_card_content(task) -%} | ||
<div id="card-content-{{ task.id }}" data-id="{{ task.id }}"> | ||
<h4 class="margin-bottom--extra-small">{{ task.title }}</h4> | ||
<div>{{ task.description }}</div> | ||
{% if task.user_id %} | ||
<div class="progress_card_assignees_container"> | ||
<img class="progress_card_assignees_image" src="/static/images/img_avatar.png" alt="Assigned to Avatar"/> | ||
</div> | ||
{% endif %} | ||
</div> | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,2 @@ | ||
<div class="progress_card_container" id="card-{{ task.id }}" data-id="{{ task.id }}"> | ||
<h4 class="margin-bottom--extra-small">{{ task.title }}</h4> | ||
<div>{{ task.description }}</div> | ||
{% if task.user_id %} | ||
<div class="progress_card_assignees_container"> | ||
<img class="progress_card_assignees_image" src="/static/images/img_avatar.png" alt="Assigned to Avatar"/> | ||
</div> | ||
{% endif %} | ||
</div> | ||
{% import 'macros/render.html.jinja' as render %} | ||
{{ render.render_task_card_content(task) }} |