-
Notifications
You must be signed in to change notification settings - Fork 8
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 #2 from cfpb/good-parenting
Support parent selection in breadcrumb navigation and new child creation
- Loading branch information
Showing
9 changed files
with
369 additions
and
134 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
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 |
---|---|---|
@@ -1,77 +1,31 @@ | ||
{% extends "wagtailadmin/base.html" %} | ||
{% extends "modeladmin/index.html" %} | ||
{% load i18n modeladmin_tags treemodeladmin_tags %} | ||
|
||
{% block titletag %}{{ view.get_meta_title }}{% endblock %} | ||
|
||
{% block css %} | ||
{{ block.super }} | ||
{{ view.media.css }} | ||
{% endblock %} | ||
|
||
{% block extra_js %} | ||
{{ view.media.js }} | ||
{% block header %} | ||
{% include "treemodeladmin/includes/header.html" %} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
{% block header %} | ||
{% include "treemodeladmin/includes/header.html" %} | ||
{% endblock %} | ||
|
||
{% block content_main %} | ||
<div> | ||
<div class="row"> | ||
{% block content_cols %} | ||
|
||
{% block filters %} | ||
{% if view.has_filters and all_count %} | ||
<div class="changelist-filter col3"> | ||
<h2>{% trans 'Filter' %}</h2> | ||
{% for spec in view.filter_specs %}{% admin_list_filter view spec %}{% endfor %} | ||
</div> | ||
{% endif %} | ||
{% endblock %} | ||
|
||
<div class="result-list {% if view.has_filters and all_count %}col9{% else %}col12{% endif %}"> | ||
{% block result_list %} | ||
{% if not all_count %} | ||
<div class="nice-padding" style="margin-top:30px;"> | ||
{% if no_valid_parents %} | ||
<p>{% blocktrans with view.verbose_name_plural as name %}No {{ name }} have been created yet. One of the following must be created before you can add any {{ name }}:{% endblocktrans %}</p> | ||
<ul> | ||
{% for type in required_parent_types %}<li><b>{{ type|title }}</b></li>{% endfor %} | ||
</ul> | ||
{% else %} | ||
<p>{% blocktrans with view.verbose_name_plural as name %}No {{ name }} have been created yet.{% endblocktrans %} | ||
{% if user_can_create %} | ||
{% blocktrans with view.create_url as url %} | ||
Why not <a href="{{ url }}">add one</a>? | ||
{% endblocktrans %} | ||
{% endif %}</p> | ||
{% endif %} | ||
</div> | ||
{% elif view.has_child %} | ||
{% tree_result_list %} | ||
{% else %} | ||
{% result_list %} | ||
{% endif %} | ||
{% endblock %} | ||
</div> | ||
|
||
{% block pagination %} | ||
<div class="pagination {% if view.has_filters and all_count %}col9{% else %}col12{% endif %}"> | ||
<p>{% blocktrans with page_obj.number as current_page and paginator.num_pages as num_pages %}Page {{ current_page }} of {{ num_pages }}.{% endblocktrans %}</p> | ||
{% if paginator.num_pages > 1 %} | ||
<ul> | ||
{% pagination_link_previous page_obj view %} | ||
{% pagination_link_next page_obj view %} | ||
</ul> | ||
{% endif %} | ||
</div> | ||
{% endblock %} | ||
|
||
{% endblock %} | ||
</div> | ||
{% block result_list %} | ||
{% if not all_count %} | ||
<div class="nice-padding" style="margin-top:30px;"> | ||
{% if no_valid_parents %} | ||
<p>{% blocktrans with view.verbose_name_plural as name %}No {{ name }} have been created yet. One of the following must be created before you can add any {{ name }}:{% endblocktrans %}</p> | ||
<ul> | ||
{% for type in required_parent_types %}<li><b>{{ type|title }}</b></li>{% endfor %} | ||
</ul> | ||
{% else %} | ||
<p>{% blocktrans with view.verbose_name_plural as name %}No {{ name }} have been created yet.{% endblocktrans %} | ||
{% if user_can_create %} | ||
{% blocktrans with view.create_url as url %} | ||
Why not <a href="{{ url }}">add one</a>? | ||
{% endblocktrans %} | ||
{% endif %}</p> | ||
{% endif %} | ||
</div> | ||
{% endblock %} | ||
|
||
{% elif view.has_child %} | ||
{% tree_result_list %} | ||
{% else %} | ||
{% result_list %} | ||
{% endif %} | ||
{% endblock %} | ||
|
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
Oops, something went wrong.