Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,18 @@
<div class="flex justify-between w-full gap-2 group/item inline-flex">
<div class="flex justify-start">
<button class="toggleVisibility mr-2 {% if child.children|length == 0 %}hidden{% endif %}"
id="toggleVisibility_{{ child.id }}"
onclick="toggleVisibility(event)">
<i class="fa fa-chevron-circle-right text-gray-400 icon-arrow" aria-hidden="true"></i>
</button>
id="toggleVisibility_{{ child.id }}"
onclick="toggleVisibility(event)">
<i class="fa fa-chevron-circle-right text-gray-400 icon-arrow" aria-hidden="true"></i>
</button>

<span class="flex justify-between">
<span class="w-full">
{% if can_modify_product %}
{% include "product_management/tree_helper/drag.html" %}
{% endif %}
{{ child.name }}


</span>

{% with child=child %}
{% include "product_management/tree_helper/video.html" %}
{% endwith %}
Expand Down
6 changes: 5 additions & 1 deletion apps/canopy/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ def update_node(request, pk):
product_area.move(parent, "last-child")
talent_target_parent = product_area.get_parent() or 0
context = {
"child_count": talent_target_parent.get_children_count() if product_area else 0,
"child_count": (
talent_target_parent.get_children_count()
if isinstance(talent_target_parent, mgt.ProductArea)
else 0
),
"target_parent_id": talent_target_parent.id if talent_target_parent else None,
}
return JsonResponse(context)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<button class="w-3 h-3">
<img src="{{ static('images/drag.svg') }}" class="w-full h-full object-contain object-center draggableImage" alt="#">
<button class="w-4 h-3">
<i class="fa-solid fa-grip-vertical"></i>
</button>