-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only update the elements that needs to be updated.
- Loading branch information
Showing
8 changed files
with
51 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
from django.urls import path | ||
|
||
from .views import destination_list, destination_delete, destination_update | ||
from .views import destination_list, create_htmx, delete_htmx, update_htmx | ||
|
||
app_name = "htmx" | ||
urlpatterns = [ | ||
path("", destination_list, name="destination-list"), | ||
path("<int:pk>/delete/", destination_delete, name="destination-delete"), | ||
path("<int:pk>/", destination_update, name="destination-update"), | ||
path("htmx-create/", create_htmx, name="htmx-create"), | ||
path("<int:pk>/htmx-delete/", delete_htmx, name="htmx-delete"), | ||
path("<int:pk>/htmx-update/", update_htmx, name="htmx-update"), | ||
] |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div id="destination-content"> | ||
{% include "htmx/destination/_create_form.html" %} | ||
{% for error in errors %}<p class="text-error">{{ error }}</p>{% endfor %} | ||
{% include "htmx/destination/_form_list.html" %} | ||
</div> |
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
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div id="form-list"> | ||
{% for media, forms in grouped_forms.items %} | ||
<details class="collapse bg-base-200 collapse-arrow" open=""> | ||
<summary class="collapse-title text-xl font-medium">{{ media.name }} ({{ forms|length }})</summary> | ||
<div class="collapse-content"> | ||
{% for form in forms %} | ||
<div class="flex w-full h-fit items-center"> | ||
{% include "htmx/destination/_edit_form.html" %} | ||
{% include "htmx/destination/_delete_form.html" %} | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</details> | ||
{% endfor %} | ||
</div> |
16 changes: 1 addition & 15 deletions
16
src/argus/htmx/templates/htmx/destination/destination_list.html
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,18 +1,4 @@ | ||
{% extends "htmx/base.html" %} | ||
{% block main %} | ||
{% include "htmx/destination/_create_form.html" %} | ||
{% for error in errors %}<p class="text-error">{{ error }}</p>{% endfor %} | ||
{% for media, forms in grouped_forms.items %} | ||
<details class="collapse bg-base-200 collapse-arrow" open=""> | ||
<summary class="collapse-title text-xl font-medium">{{ media.name }} ({{ forms|length }})</summary> | ||
<div class="collapse-content"> | ||
{% for form in forms %} | ||
<div class="flex w-full h-fit items-center"> | ||
{% include "htmx/destination/_edit_form.html" %} | ||
{% include "htmx/destination/_delete_form.html" %} | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</details> | ||
{% endfor %} | ||
{% include "htmx/destination/_content.html" %} | ||
{% endblock main %} |