Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Systematize names: some easy pickings #1015

Merged
merged 10 commits into from
Dec 10, 2024
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
1 change: 1 addition & 0 deletions changelog.d/+singularize-easy-pickings.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
HTMx: Renamed some directories and templates to give them better, more consistent names.
2 changes: 1 addition & 1 deletion src/argus/htmx/incidents/customization.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class IncidentTableColumn:
"row_select",
"Selected",
"htmx/incidents/_incident_checkbox.html",
"htmx/incidents/_selected_incidents_header.html",
"htmx/incidents/_incident_list_select_all_checkbox.html",
),
IncidentTableColumn("id", "ID", "htmx/incidents/_incident_pk.html"),
IncidentTableColumn(
Expand Down
2 changes: 1 addition & 1 deletion src/argus/htmx/incidents/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def incident_list(request: HtmxHttpRequest) -> HttpResponse:
# requests, allowing us to skip rendering the unchanging parts of the
# template.
if request.htmx:
base_template = "htmx/incidents/responses/_incidents_table_refresh.html"
base_template = "htmx/incidents/responses/_incident_list_refresh.html"
else:
base_template = "htmx/incidents/_base.html"
context = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
aria-label="Update Incidents" />
<div role="tabpanel"
class="tab-content border-primary [--tab-border:theme(borderWidth.DEFAULT)] rounded-box p-2">
{% include "htmx/incidents/_incidents_update_menu.html" %}
{% include "htmx/incidents/_incident_list_update_menu.html" %}
</div>
{% endblock menu_tabs %}
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<td colspan="{{ columns|length }}" class="border-t border-primary">
<div class="flex justify-between items-center">
{% block refresh_info %}
{% include "htmx/incidents/_incidents_refresh_info.html" %}
{% include "htmx/incidents/_incident_list_refresh_info.html" %}
{% endblock refresh_info %}
<!--
The htmx attributes set on the nav here are inherited by the child links.
Expand Down
4 changes: 2 additions & 2 deletions src/argus/htmx/templates/htmx/incidents/incident_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<section>
{% if incidents_extra_widget %}
<div class="flex">
<div class="w-2/3">{% include "htmx/incidents/_incidents_menubar.html" %}</div>
<div class="w-2/3">{% include "htmx/incidents/_incident_list_menubar.html" %}</div>
<div class="w-1/3 ml-2">{% include incidents_extra_widget %}</div>
</div>
{% else %}
{% include "htmx/incidents/_incidents_menubar.html" %}
{% include "htmx/incidents/_incident_list_menubar.html" %}
{% endif %}
</section>
<section id="incident-list" class="loading-box overflow-x-auto">
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/argus/htmx/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

from .auth import views as auth_views
from .incidents.urls import urlpatterns as incident_urls
from .timeslots.urls import urlpatterns as timeslot_urls
from .notificationprofiles.urls import urlpatterns as notificationprofile_urls
from .timeslot.urls import urlpatterns as timeslot_urls
from .notificationprofile.urls import urlpatterns as notificationprofile_urls
from .destination.urls import urlpatterns as destination_urls
from .themes.urls import urlpatterns as theme_urls
from .dateformat.urls import urlpatterns as dateformat_urls
Expand Down
Loading