-
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.
Merge pull request #1116 from Uninett/polish-profiles-page
Polish profiles page
- Loading branch information
Showing
11 changed files
with
87 additions
and
50 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Polished the looks of the profiles page. |
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
17 changes: 4 additions & 13 deletions
17
src/argus/htmx/templates/htmx/notificationprofile/_notificationprofile_buttons.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,16 +1,7 @@ | ||
<div> | ||
{% if show_view %} | ||
<p> | ||
<a class="btn btn-primary" | ||
href="{% url "htmx:notificationprofile-detail" pk=object.pk %}">View</a> | ||
</p> | ||
{% endif %} | ||
<p> | ||
<a class="btn btn-primary" | ||
href="{% url "htmx:notificationprofile-update" pk=object.pk %}">Update</a> | ||
</p> | ||
<p> | ||
<div class="card-actions justify-end"> | ||
<input class="btn btn-primary" type="submit" value="Save"> | ||
<button class="contents"> | ||
<a class="btn btn-primary" | ||
href="{% url "htmx:notificationprofile-delete" pk=object.pk %}">Delete</a> | ||
</p> | ||
</button> | ||
</div> |
16 changes: 0 additions & 16 deletions
16
src/argus/htmx/templates/htmx/notificationprofile/_notificationprofile_detail.html
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
src/argus/htmx/templates/htmx/notificationprofile/_notificationprofile_form.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<section class="card-body"> | ||
<form method="post" | ||
action="{% url "htmx:notificationprofile-update" pk=form.instance.pk %}" | ||
class="flex flex-row gap-4"> | ||
{% csrf_token %} | ||
{{ form.as_div }} | ||
{% include "./_notificationprofile_buttons.html" with object=form.instance %} | ||
</form> | ||
</section> |
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,5 +1,8 @@ | ||
{% extends "htmx/base.html" %} | ||
{% block main %} | ||
{% block profile_main %} | ||
{% endblock profile_main %} | ||
<h2 class="text-center text-xl font-semibold">Profiles</h2> | ||
<div class="flex justify-center"> | ||
{% block profile_main %} | ||
{% endblock profile_main %} | ||
</div> | ||
{% endblock main %} |
6 changes: 0 additions & 6 deletions
6
src/argus/htmx/templates/htmx/notificationprofile/notificationprofile_detail.html
This file was deleted.
Oops, something went wrong.
8 changes: 3 additions & 5 deletions
8
src/argus/htmx/templates/htmx/notificationprofile/notificationprofile_form.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,8 +1,6 @@ | ||
{% extends "./base.html" %} | ||
{% block profile_main %} | ||
<form method="post"> | ||
{% csrf_token %} | ||
{{ form.as_div }} | ||
<input class="btn btn-primary" type="submit" value="Save"> | ||
</form> | ||
<section class="card my-4 bg-base-100 glass shadow-2xl"> | ||
{% include "./_notificationprofile_form.html" %} | ||
</section> | ||
{% endblock profile_main %} |
10 changes: 5 additions & 5 deletions
10
src/argus/htmx/templates/htmx/notificationprofile/notificationprofile_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,12 +1,12 @@ | ||
{% extends "./base.html" %} | ||
{% block profile_main %} | ||
<div> | ||
<p> | ||
<button class="contents"> | ||
<a class="btn btn-primary" | ||
href="{% url "htmx:notificationprofile-create" %}">Create</a> | ||
</p> | ||
{% for object in object_list %} | ||
<div>{% include "./_notificationprofile_detail.html" with show_view=True %}</div> | ||
href="{% url "htmx:notificationprofile-create" %}">Create new profile</a> | ||
</button> | ||
{% for form in form_list %} | ||
<div class="card my-4 bg-base-100 glass shadow-2xl">{% include "./_notificationprofile_form.html" %}</div> | ||
{% endfor %} | ||
</div> | ||
{% endblock profile_main %} |
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