-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: customize user login redirection and index page
- Loading branch information
1 parent
7557f21
commit c0e7e2c
Showing
12 changed files
with
250 additions
and
16 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
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: 17 additions & 0 deletions
17
mycarehub/content/migrations/0018_rename_content_smscontentitem_body.py
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,17 @@ | ||
# Generated by Django 3.2.20 on 2023-10-25 07:39 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("content", "0017_alter_contentitem_facilities"), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name="smscontentitem", | ||
old_name="content", | ||
new_name="body", | ||
), | ||
] |
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,84 @@ | ||
{% load i18n %} | ||
{% load l10n %} | ||
{% load wagtailadmin_tags %} | ||
<table class="listing {% if full_width %}full-width{% endif %} {% block table_classname %}{% endblock %}" {% if show_ordering_column %}aria-descrption="{% trans 'Press enter to select an item, use up and down arrows to move the item, press enter to complete the move or escape to cancel the current move.' %}"{% endif %}> | ||
{% if show_ordering_column or show_bulk_actions %} | ||
<col width="10px" /> | ||
{% endif %} | ||
<col /> | ||
{% if show_parent %} | ||
<col /> | ||
{% endif %} | ||
<col width="12%" /> | ||
<col width="12%" /> | ||
<col width="12%" /> | ||
<col width="10%" /> | ||
<thead> | ||
{% block post_parent_page_headers %} | ||
{% endblock %} | ||
</thead> | ||
<tbody> | ||
{% if pages %} | ||
{% trans "Select page" as checkbox_aria_label %} | ||
{% for page in pages %} | ||
{% page_permissions page as page_perms %} | ||
<tr {% if ordering == "ord" %}id="page_{{ page.id|unlocalize }}" data-page-title="{{ page.get_admin_display_title }}"{% endif %} class="{% if not page.live %}unpublished{% endif %} {% block page_row_classname %}{% endblock %}"> | ||
{% if show_ordering_column %} | ||
<td class="ord"> | ||
{% if orderable and ordering == "ord" %} | ||
<div class="handle icon icon-grip text-replace" tabindex="0" aria-live="polite" data-order-handle> | ||
{% trans 'Drag' %} | ||
<span data-order-label>Item {{ forloop.counter }} of {{ pages|length }}</span> | ||
</div> | ||
{% endif %} | ||
</td> | ||
{% elif show_bulk_actions %} | ||
{% include "wagtailadmin/bulk_actions/listing_checkbox_cell.html" with obj_type="page" obj=page aria_labelledby_prefix="page_" aria_labelledby=page.pk|unlocalize aria_labelledby_suffix="_title" %} | ||
{% endif %} | ||
<td id="page_{{ page.pk|unlocalize }}_title" class="title" valign="top" data-listing-page-title> | ||
{% block page_title %} | ||
{% endblock %} | ||
</td> | ||
<td class="category" valign="top"> | ||
{% if page.category %} | ||
{{ page.category }} | ||
{% endif %} | ||
|
||
{% for category in page.categories.all %} | ||
{{ category.name }} | ||
</a>{% if not forloop.last %}, {% endif %} | ||
{% endfor %} | ||
</td> | ||
<td class="message" valign="top">{{ page.body|safe|truncatechars:70 }}</td> | ||
{% if show_parent %} | ||
<td class="parent" valign="top"> | ||
{% block page_parent_page_title %} | ||
{% with page.get_parent as parent %} | ||
{% if parent %} | ||
<a href="{% url 'wagtailadmin_explore' parent.id %}">{{ parent.specific_deferred.get_admin_display_title }}</a> | ||
{% endif %} | ||
{% endwith %} | ||
{% endblock %} | ||
</td> | ||
{% endif %} | ||
<td class="updated" valign="top"> | ||
{% if page.latest_revision_created_at %} | ||
{% human_readable_date page.latest_revision_created_at %} | ||
{% endif %} | ||
</td> | ||
<td class="type" valign="top">{{ page.page_type_display_name }}</td> | ||
<td class="status" valign="top"> | ||
{% include "wagtailadmin/shared/page_status_tag.html" with page=page %} | ||
</td> | ||
<td class="added-by" valign="top"> | ||
{{ page.owner }} | ||
</td> | ||
{% block page_navigation %} | ||
{% endblock %} | ||
</tr> | ||
{% endfor %} | ||
{% else %} | ||
{% block no_results %}{% endblock %} | ||
{% endif %} | ||
</tbody> | ||
</table> |
77 changes: 77 additions & 0 deletions
77
mycarehub/templates/wagtailadmin/pages/listing/_table_headers_explore.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,77 @@ | ||
{% load i18n wagtailadmin_tags %} | ||
|
||
{% comment %} | ||
|
||
Table headers for the page listing, when in 'explore' mode. Expects the following variables: | ||
|
||
sortable: if true, headings are links to wagtailadmin_explore with sort parameters applied. | ||
sortable_by_type: must be true to allow sorting on the 'type' column | ||
show_ordering_column: if true, an 'ordering' column is added. | ||
orderable: if true, the 'ordering' column is populated (again with links to wagtailadmin_explore). | ||
|
||
If either sortable or orderable is true, the following variables are also required: | ||
|
||
parent_page: The page instance currently being browsed (used to generate the correct wagtailadmin_explore urls and title text) | ||
ordering: the current sort parameter | ||
|
||
{% endcomment %} | ||
|
||
<tr class="table-headers"> | ||
{% if show_ordering_column %} | ||
<th class="ord{% if orderable and ordering == 'ord' %} ord--active{% endif %}"> | ||
{% if orderable %} | ||
{% if ordering == "ord" %} | ||
<a href="{% url 'wagtailadmin_explore' parent_page.id %}" title="{% trans 'Disable ordering of child pages' %}"> | ||
{% icon name="order" %}{% trans 'Sort' %} | ||
</a> | ||
{% else %} | ||
<a href="{% url 'wagtailadmin_explore' parent_page.id %}?ordering=ord" title="{% trans 'Enable ordering of child pages' %}"> | ||
{% icon name="order" %}{% trans 'Sort' %} | ||
</a> | ||
{% endif %} | ||
{% endif %} | ||
</th> | ||
{% elif show_bulk_actions %} | ||
{% include 'wagtailadmin/bulk_actions/select_all_checkbox_cell.html' with parent=parent_page.id %} | ||
{% endif %} | ||
<th class="title"> | ||
{% trans 'Title' as title_label %} | ||
{% page_table_header_label label=title_label sortable=sortable sort_field='title' parent_page_title=parent_page.title %} | ||
</th> | ||
<th class="category"> | ||
{% trans 'Category' as category_label %} | ||
{% page_table_header_label label=category_label parent_page_title=parent_page.title %} | ||
</th> | ||
<th class="message"> | ||
{% trans 'Message' as message_label %} | ||
{% page_table_header_label label=message_label parent_page_title=parent_page.title %} | ||
</th> | ||
{% if show_parent %} | ||
<th class="parent"> | ||
{% trans 'Parent' as parent_label %} | ||
{% page_table_header_label label=parent_label sortable=0 parent_page_title=parent_page.title %} | ||
</th> | ||
{% endif %} | ||
<th class="updated"> | ||
{% trans 'Last Updated' as updated_label %} | ||
{% page_table_header_label label=updated_label sortable=sortable sort_field='latest_revision_created_at' parent_page_title=parent_page.title %} | ||
</th> | ||
<th class="type"> | ||
{% trans 'Type' as type_label %} | ||
|
||
{% if sortable and sortable_by_type %} | ||
{% page_table_header_label label=type_label sortable=1 sort_field='content_type' parent_page_title=parent_page.title %} | ||
{% else %} | ||
{% page_table_header_label label=type_label sortable=0 parent_page_title=parent_page.title %} | ||
{% endif %} | ||
</th> | ||
<th class="status"> | ||
{% trans 'Status' as status_label %} | ||
{% page_table_header_label label=status_label sortable=sortable sort_field='live' parent_page_title=parent_page.title %} | ||
</th> | ||
<th class="added-by"> | ||
{% trans 'Added By' as added_by_label %} | ||
{% page_table_header_label label=added_by_label parent_page_title=parent_page.title %} | ||
</th> | ||
<th></th> | ||
</tr> |
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