Skip to content

Commit

Permalink
Add page title to login, destinations, timeslots and profiles pages
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaengland authored Jan 15, 2025
1 parent 7af4523 commit af1adf6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/argus/htmx/auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
backends = get_htmx_authentication_backend_name_and_type()
context["backends"] = backends
context["page_title"] = "Log in"
return context
1 change: 1 addition & 0 deletions src/argus/htmx/destination/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def _render_destination_list(
"create_form": create_form,
"grouped_forms": grouped_forms,
"errors": errors,
"page_title": "Destinations",
}
return render(request, template, context=context)

Expand Down
5 changes: 5 additions & 0 deletions src/argus/htmx/notificationprofile/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ def get_template_names(self):
def get_success_url(self):
return reverse("htmx:notificationprofile-list")

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["page_title"] = "Profiles"
return context


class ChangeMixin:
"Common functionality for create and update views"
Expand Down
5 changes: 5 additions & 0 deletions src/argus/htmx/timeslot/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ def get_template_names(self):
def get_success_url(self):
return reverse("htmx:timeslot-list")

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["page_title"] = "Timeslots"
return context


class FormsetMixin:
def post(self, request, *args, **kwargs):
Expand Down

0 comments on commit af1adf6

Please sign in to comment.