forked from torchbox/wagtailquickcreate
-
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.
Merge pull request #8 from torchbox-forks/support/wagtail-63
Support/wagtail 63
- Loading branch information
Showing
15 changed files
with
248 additions
and
120 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
- Added support for Wagtail 6.3 | ||
- Drop support for Wagtail versions 5 & 6 | ||
- Updated support for Django 4.2, 5.0 and 5.1 | ||
- Drop support for Django versions 2 & 3 | ||
- Drop support for Python versions 3.8 | ||
- Add support for Python versions 3.13 | ||
|
||
## Relases up to 2.0.1 | ||
|
||
Older versions of this package are available for older versions of Wagtail and Django. | ||
See [PyPi](https://pypi.org/project/wagtail-quick-create/#history) for more information. |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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
66 changes: 40 additions & 26 deletions
66
wagtailquickcreate/templates/wagtailquickcreate/create.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,44 +1,58 @@ | ||
|
||
{% extends "wagtailadmin/base.html" %} | ||
{% extends "wagtailadmin/generic/listing.html" %} | ||
{% load wagtailadmin_tags static i18n %} | ||
{% block titletag %}{% trans browser_title %}{% endblock %} | ||
|
||
|
||
{% block content %} | ||
<header class="w-header w-header--merged"> | ||
<div class="row row-flush"> | ||
<div class="col"> | ||
<h1 class="w-header__title"> | ||
<img src="{% avatar_url user %}" alt="" class="avatar"/> | ||
Add {{ model_verbose_name }} | ||
</h1> | ||
<h2>{{ user.get_full_name|default:user.get_username }}</h2> | ||
|
||
{% block header %} | ||
<header class="w-header"> | ||
<div class="row"> | ||
<div class="left"> | ||
<div class="col"> | ||
<h1 class="w-header__title" id="header-title"> | ||
<svg class="icon icon-doc-empty-inverse w-header__glyph" aria-hidden="true"> | ||
<use href="#icon-doc-empty-inverse"></use> | ||
</svg>Add <span class="w-header__subtitle">{{ model_verbose_name }}</span> | ||
</h1> | ||
</div> | ||
</div> | ||
</div> | ||
</header> | ||
{% endblock %} | ||
|
||
{% block listing %} | ||
<div class="nice-padding"> | ||
{% if parent_pages %} | ||
<p>Choose a parent section for the new <strong>{{ model_verbose_name }}</strong></p> | ||
{% else %} | ||
<p class="help-block help-warning"> | ||
<svg class="icon icon-warning icon" aria-hidden="true"><use href="#icon-warning"></use></svg> | ||
There are no parent <strong>{{ model_verbose_name }}</strong> sections created for child pages to be added to yet... | ||
</p> | ||
{% endif %} | ||
<ul class="listing"> | ||
{% if parent_pages %} | ||
<div class="help-block help-info"> | ||
Choose a parent section for the new <strong>{{ model_verbose_name }}</strong> | ||
</div> | ||
{% else %} | ||
<p class="help-block help-warning">There are no parent <strong>{{ model_verbose_name }}</strong> sections created for child pages to be added to yet...</p> | ||
{% endif %} | ||
|
||
{% for page in parent_pages %} | ||
<li> | ||
<a href="/admin/pages/add/{{model_app|lower}}/{{page.model|lower}}/{{page.id}}/" class="icon icon-plus-inverse icon-larger"> | ||
{% for parent in page.ancestors %} | ||
{% if not parent.is_root %} | ||
{{ parent }} > | ||
{% endif %} | ||
{% endfor %} | ||
<strong>{{ page.title }}</strong> | ||
</a> | ||
<div class="row row-flush"> | ||
<div class="col12"> | ||
<a href="/admin/pages/add/{{model_app|lower}}/{{page.model|lower}}/{{page.id}}/" class="icon icon-plus-inverse icon-larger"> | ||
<svg class="icon icon-crosshairs default w-mr-1 w-align-middle" aria-hidden="true"><use href="#icon-crosshairs"></use></svg> | ||
{% for parent in page.ancestors %} | ||
{% if not parent.is_root %} | ||
{{ parent }} > | ||
{% endif %} | ||
{% endfor %} | ||
<strong>{{ page.title }}</strong> | ||
</a> | ||
</div> | ||
|
||
</div> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{% endblock %} | ||
|
||
{% endblock %} | ||
|
53 changes: 50 additions & 3 deletions
53
wagtailquickcreate/templates/wagtailquickcreate/panel.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,3 +1,50 @@ | ||
<section class="panel wagtail_quick_create summary nice-padding"> | ||
{{ models }} | ||
</section> | ||
<section class="w-panel w-panel--dashboard" id="quickcreate-section" aria-labelledby="quickcreate-heading" data-panel> | ||
<div class="w-panel__header"> | ||
<a class="w-panel__anchor w-panel__anchor--prefix" href="#quickcreate-section" data-panel-anchor="" | ||
aria-labelledby="quickcreate-heading"> | ||
<svg class="icon icon-link w-panel__icon" aria-hidden="true"> | ||
<use href="#icon-link"></use> | ||
</svg> | ||
</a> | ||
<button class="w-panel__toggle" type="button" aria-label="Toggle section" aria-describedby="quickcreate-heading" | ||
data-panel-toggle="" aria-controls="quickcreate-content" aria-expanded="{{ initial_collapsed.aria_expanded }}"> | ||
|
||
<svg class="icon icon-placeholder w-panel__icon" aria-hidden="true"> | ||
<use href="#icon-placeholder"></use> | ||
</svg> | ||
</button> | ||
|
||
<h2 class="w-panel__heading " id="quickcreate-heading" data-panel-heading=""> | ||
<span data-panel-heading-text="">Quick Create</span> | ||
</h2> | ||
|
||
<a class="w-panel__anchor w-panel__anchor--suffix" href="#quickcreate-section" | ||
aria-labelledby="quickcreate-heading"> | ||
<svg class="icon icon-link w-panel__icon" aria-hidden="true"> | ||
<use href="#icon-link"></use> | ||
</svg> | ||
</a> | ||
<div class="w-panel__divider"></div> | ||
|
||
</div> | ||
<div id="quickcreate-content" class="w-panel__content" {% if initial_collapsed.hidden %}hidden="{{ initial_collapsed.hidden }}"{% endif %}> | ||
<table class="listing listing--dashboard listing-quickcreate"> | ||
<tbody> | ||
<tr> | ||
<td> | ||
{% for button in model_buttons %} | ||
{% include "wagtailquickcreate/quickcreate_button.html" with button=button %} | ||
{% endfor %} | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
{% for error in model_button_errors %} | ||
<div class="help-block help-warning"> | ||
<svg class="icon icon-warning icon" aria-hidden="true"><use href="#icon-warning"></use></svg> | ||
<strong>{{ error }}</strong> found in WAGTAIL_QUICK_CREATE_PAGE_TYPES does not exist. | ||
</div> | ||
{% endfor %} | ||
|
||
</div> | ||
</section> |
6 changes: 6 additions & 0 deletions
6
wagtailquickcreate/templates/wagtailquickcreate/quickcreate_button.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,6 @@ | ||
<a href="{{ button.link }}" class="button bicolor button--icon"> | ||
<span class="icon-wrapper"> | ||
<svg class="icon icon-plus icon" aria-hidden="true"><use href="#icon-plus"></use></svg> | ||
</span> | ||
{{ button.name }} | ||
</a> |
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
Oops, something went wrong.