0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00
Commit Graph

14265 Commits

Author SHA1 Message Date
LB Johnston
1f9a9c50bf move identity util to shared utils file 2022-12-10 07:05:39 +10:00
Thibaud Colas
0bf26a73c1 Fix horizontal positioning of rich text inline toolbar 2022-12-10 06:56:54 +10:00
Sage Abdullah
25fa8793a7 Require publish permission for unscheduling snippets 2022-12-09 17:46:54 +00:00
Sage Abdullah
ac3add0f29 Add tests for locking scheduled snippets with LockableMixin 2022-12-09 17:46:54 +00:00
Sage Abdullah
74a4258ebb Lock snippets when scheduled for publishing 2022-12-09 17:46:54 +00:00
Sage Abdullah
0f0ecb4938 Add user_has_permission and user_has_any_permission methods in PermissionCheckedMixin 2022-12-09 17:46:54 +00:00
Sage Abdullah
a53c6f5320 Add default __init__ to BaseLock 2022-12-09 17:46:54 +00:00
Sage Abdullah
859f5b61ac Rename locks 'page' param and attribute to 'object' 2022-12-09 17:46:54 +00:00
Sage Abdullah
39f9a63875 Make ScheduledForPublishLock take precedence before BasicLock
This ensures that a scheduled object is always locked,
even for someone who has locked it with the BasicLock.
2022-12-09 17:46:54 +00:00
Sage Abdullah
7323973673 Move page-locked class in _tabs.scss to content-locked in _panel.scss
This allows locking even if the panels do not use TabbedInterface.
2022-12-09 17:46:54 +00:00
Sage Abdullah
3270267ca2 Use class placeholder for LockableMixin.locked_by related_name
This allows the mixin to be used on non-Page models
2022-12-09 17:46:54 +00:00
Matt Westcott
f635038e13 Release note for StreamField data migration helpers (#9694) 2022-12-09 16:40:07 +00:00
Matt Westcott
aa3ab79384 Avoid setUpTestData in streamfield migration tests
Setting a StreamField RawDataView as a class attribute of a test case is not valid in Django 4.1, as it doesn't support deep copying. Convert these to setUp methods, so that they're recreated for each test invocation.
2022-12-09 16:40:07 +00:00
Matt Westcott
440427f8a7 Disable reference extraction when constructing invalid StreamField data 2022-12-09 16:40:07 +00:00
Joshua Munn
f12c4a3714 Bump wagtail-factories version for Wagtail 4.1 compatibility 2022-12-09 16:40:07 +00:00
Joshua Munn
e84cdc4e2c Add wagtail-streamfield-migration-toolkit docs
- Move RichText -> StreamField migration guide into
  advanced/streamfield_migrations.md
2022-12-09 16:40:07 +00:00
Matt Westcott
a9ba66c648 Remove fallbacks for older Wagtail versions 2022-12-09 16:40:07 +00:00
Matt Westcott
ad65741b94 Add tests for streamfield migration helpers
Currently failing due to wagtail-factories being broken on Wagtail 4.1: https://github.com/wagtail/wagtail-factories/issues/65
2022-12-09 16:40:07 +00:00
Matt Westcott
ec6229c236 Add StreamField migration helpers from https://github.com/sandilsranasinghe/wagtail-streamfield-migration-toolkit/ 2022-12-09 16:40:07 +00:00
LB Johnston
eb808116f0 Development docs - refine classname convention
- Update template example to be in a more logical order & use the correct template syntax
- Update `class_name` as no longer preferred as we have adopted a normalised approach for icon
2022-12-09 20:13:33 +10:00
LB Johnston
3d484e133d Update icon template to allow classname
- Preserve the existing `class_name` behaviour in most other cases
- Update only docs reference to use `classname`
- Relates to #6107 & #6028
2022-12-09 20:13:33 +10:00
LB (Ben Johnston)
4e66afad0a
Eslint - disable rule class-methods-use-this (#9482) 2022-12-09 07:33:28 +00:00
LB (Ben Johnston)
a3fa3b86be
Eslint - disable rule max-classes-per-file (#9483) 2022-12-09 07:14:49 +00:00
4the4ryushin
7fe09f65bb conditional display of meta description (#9764) 2022-12-08 14:35:46 +00:00
Sage Abdullah
ddbdd51607 Extract generic Lock/Unlock views and make page's views extend from them (#9740) 2022-12-08 12:06:52 +00:00
Sage Abdullah
d3f9d2e9a3 Document ClusterableModel requirement for relations in RevisionMixin-enabled snippets 2022-12-08 11:46:59 +00:00
LB Johnston
f31cce6786 Update changelog for #9750 2022-12-08 07:45:00 +10:00
LB Johnston
fa544d4ec2 Add changelog for #9762 2022-12-08 07:43:30 +10:00
dependabot[bot]
55c355dda9 Bump qs and express
Bumps [qs](https://github.com/ljharb/qs) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `qs` from 6.9.6 to 6.11.0
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.9.6...v6.11.0)

Updates `express` from 4.17.2 to 4.18.2
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.2...4.18.2)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-08 07:42:39 +10:00
Matt Westcott
2cb12871ef Fix RichTextField - StreamField migration example code
Follow-up to #8307. It appears that the original code was designed for a StreamField setup where the `rich_text` block is not a RichTextBlock, but a StructBlock with a RichTextBlock child also named `rich_text`. #8307 correctly removed this redundant wrapper from page_to_streamfield, but there are corresponding changes required for the rest of the helper methods.
2022-12-08 07:39:37 +10:00
Matt Westcott
52c50e0e67 Release note for InlinePanel refactor 2022-12-08 07:37:32 +10:00
Matt Westcott
2335d28b7c Move InlinePanel child initialisation into the InlinePanel constructor 2022-12-08 07:37:32 +10:00
Matt Westcott
3c3bb68a9b Make ExpandingFormset responsible for managing the opts dict again
With the custom onAdd logic eliminated, it is now safe for ExpandingFormset and InlinePanel to work from the same opts dict
2022-12-08 07:37:32 +10:00
Matt Westcott
54a1901c69 move InlinePanel onAdd logic into an overridden addForm method 2022-12-08 07:37:32 +10:00
Matt Westcott
100727eb13 make InlinePanel a subclass of ExpandingFormset 2022-12-08 07:37:32 +10:00
Matt Westcott
c632df8dee Allow skipping onAdd/onInit callbacks when adding a new form to ExpandingFormset
This will help us to make InlinePanel a subclass of ExpandingFormset, since we'll want InlinePanel to extend the addForm method and only call the callbacks after it's done its thing.

Also rename this.opts in ExpandingFormset, so that we can have a separate set of options passed to ExpandingFormset while we're refactoring.
2022-12-08 07:37:32 +10:00
Matt Westcott
24a8a459b4 Fix misleading use of formCount in form 'add' logic 2022-12-08 07:37:32 +10:00
Matt Westcott
9f3c0b0492 Add an addForm API endpoint to InlinePanel 2022-12-08 07:37:32 +10:00
Matt Westcott
ef9d56723d Make InlinePanel into a proper JS component class 2022-12-08 07:37:32 +10:00
Matt Westcott
393c1b3374 Move InlinePanel include module to components 2022-12-08 07:37:32 +10:00
Matt Westcott
5b8b508385 Release note for #9726 2022-12-07 10:43:09 +00:00
Sage Abdullah
e6512a9a88 Add tests for publishing and unpublishing snippets using publish permission 2022-12-07 10:41:28 +00:00
Sage Abdullah
b04c383008 Check for publish permission before allowing publish action 2022-12-07 10:41:28 +00:00
Sage Abdullah
0a5ae5f523 Add skip_permission_checks param to DraftStateMixin.publish() and Revision.publish() 2022-12-07 10:41:28 +00:00
Sage Abdullah
26a721a1ba Remain on the edit view when saving a snippet draft 2022-12-07 10:41:28 +00:00
Matt Westcott
bb9dad4f96 Release note for #9709 2022-12-06 18:08:56 +00:00
Sage Abdullah
2f5d419051 Combine mixins into CreateEditViewOptionalFeaturesMixin 2022-12-06 18:07:25 +00:00
Sage Abdullah
f8688985f6 Extract EditViewOptionalFeaturesMixin from generic EditView 2022-12-06 18:07:25 +00:00
Sage Abdullah
c3e7219415 Extract CreateViewOptionalFeaturesMixin from generic CreateView 2022-12-06 18:07:25 +00:00
Sage Abdullah
57b584cfc6 Extract IndexViewOptionalFeaturesMixin from generic IndexView 2022-12-06 18:07:25 +00:00