Wykres commitów

15927 Commity (9fbc62ab5267b0e08f27ee756e9a220edd411139)

Autor SHA1 Wiadomość Data
Sage Abdullah 9fbc62ab52
Mark ModelViewSet and SnippetViewSet legacy URL patterns for removal 2023-09-21 12:21:14 +01:00
Sage Abdullah f6c2f0bd95
Add legacy URL patterns for ModelViewSet's edit and delete URLs
In case people hardcode the URLs instead of using reverse().

Unify the legacy redirects with SnippetViewSet to use the same
_legacy_urlpatterns property.
2023-09-21 12:21:14 +01:00
Sage Abdullah f77125155f
Change FeatureCompleteToy test model to use custom CharField primary key 2023-09-21 12:21:14 +01:00
Sage Abdullah 38c9e1d521
Safely use unquote() by converting to pks to str first 2023-09-21 12:21:14 +01:00
Sage Abdullah 05a846423a
Allow non-integer primary keys in ModelViewSet 2023-09-21 12:21:13 +01:00
Sage Abdullah 47af24381e
Do not use super().get_urlpatterns in ModelViewSet and SnippetViewSet
In ModelViewSet, this doesn't do anything as the base ViewSet class
returns an empty list.

In SnippetViewSet, this causes the ModelViewSet's urlpatterns to be
carried over, resulting in duplicate URLs that we do not want.
2023-09-21 12:21:13 +01:00
Stefan Hammer bc09537136 Fix theme of logo in README.md
Github seems to have removed the dark-mode/light-mode switch using a URL-fragment.
2023-09-21 20:56:42 +10:00
Matt Westcott 235f1f4104 Set title line-height in em rather than rem 2023-09-21 09:51:51 +01:00
Matt Westcott 2ed0910e26 Remove margin on ul elements within tables
Fixes the Usage view - https://github.com/wagtail/wagtail/pull/10896#discussion_r1328281681
2023-09-21 09:51:51 +01:00
Matt Westcott 19e57cda7f Adjust page header actions menu to match the order in the listing 2023-09-21 09:51:51 +01:00
Matt Westcott fa5decfb5f Remove unnecessary utility classes from page title icons 2023-09-21 09:51:51 +01:00
Matt Westcott 9d1b38030f Remove outdated comments about setting up permissions to only give certain buttons
These were only relevant when the assertions were retrieving the relevant buttons by index.

These were only meaningful when
2023-09-21 09:51:51 +01:00
Matt Westcott 4815ae03d5 Move Edit action into the 'more' dropdown 2023-09-21 09:51:51 +01:00
Matt Westcott 4c7a1aae94 Make action buttons in listings always visible 2023-09-21 09:51:51 +01:00
Matt Westcott 29244cf006 Fix mismatches between aria-label and title in buttons
We have mostly standardised on passing an "aria-label" attribute when constructing buttons. However, _dropdown_items.html was still trying to pull this from 'title' when producing its own rendering of the button (probably because you can't write `{{ button.attrs.aria-label }}` in a template...) which meant that the original aria-label attribute wasn't being passed through. Fix this so that we consistently expect an aria-label attribute everywhere, and correct for this in the base Button class if a 'title' attribute has been passed instead.
2023-09-21 09:51:51 +01:00
Matt Westcott 210a9c5df3 Set title-wrapper to inline so we don't have to change it to a span everywhere 2023-09-21 09:51:51 +01:00
Matt Westcott 04eca55b13 Add folder icon for pages with children 2023-09-21 09:51:51 +01:00
Matt Westcott 1746cdec58 Remove align-top classname and use top alignment in listings as standard
This is the most sensible rendering when one cell's content is overly tall - see for example the thumb image column on the bakerydemo People listing.
2023-09-21 09:51:51 +01:00
Matt Westcott 7ee53a9714 Update listing table styling 2023-09-21 09:51:51 +01:00
Matt Westcott 7dc6be54a8 Move all but the Edit button into More 2023-09-21 09:51:51 +01:00
Matt Westcott 3ad7c54267 Allow specifying icon on a dropdown button 2023-09-21 09:51:51 +01:00
Matt Westcott 32caf644c0 Move dropdown button contents into an include 2023-09-21 09:51:51 +01:00
LB Johnston 6bcc66c1e0 Docs - use `subclass` not `sub-class`
- All other usage of this does not have the hyphen
2023-09-21 08:15:57 +10:00
Sage Abdullah da636f6b61
Release notes for #10864 2023-09-20 14:01:15 +01:00
Sage Abdullah b363989fed
Ensure side panels media is included in media context data 2023-09-20 12:38:10 +01:00
Sage Abdullah 46c524a872
Introduce MediaContainer class to ease combining media definitions 2023-09-20 12:37:13 +01:00
Sage Abdullah 9441b5de09
Remove unused code in page status side panel
- The live_object and scheduled_object are never used directly in the
templates.
- The page_perms is no longer used in the template when user_can_lock and
user_can_unlock were added in the view in
fb6d3262ad.
- There has been a long enough time since features were introduced in
  snippets so we can drop the page-specific translatable strings in
  favour of the generic ones.
2023-09-20 11:57:12 +01:00
Sage Abdullah 9c0e3d61fc
Remove unused in_explorer parameter in StatusSidePanel
It's never used directly in the template. The value that is used in the
side_panels.html template does not come from this parameter, because
that is a wrapper template and not the status panel itself. Instead, the
value is passed when the template is included, i.e. {% include ...
in_explorer=True %}.
2023-09-20 11:57:12 +01:00
Sage Abdullah 2a9709106c
Move snippets status side panel's locale and translations context to the view 2023-09-20 11:57:11 +01:00
Sage Abdullah 4c0aa931b4
Move page status side panel's locale and translations context to the view
Before the introduction of the side panels, the locale selector is
displayed in the header, with the context values resolved in the view.
When side panels were introduced, these values are resolved in the
status side panel component, but some of the logic (e.g. allowing the
locale selection when creating a page at the root level) was lost. In
addition, the resolved values in the view were left unused, which means
that we had a duplicate query for the translations that was unused.

This refactoring reintroduces the ability to select the locale when
creating a page at the root level and eliminates the duplicate query.
2023-09-20 11:57:11 +01:00
Sage Abdullah 89730bf9f7
Unify PreviewSidePanel code for pages and snippets
Move the preview_url resolving to the view and pass the value via the constructor
2023-09-20 11:57:11 +01:00
Sage Abdullah a642e8a4bd
Remove unused BaseSidePanels class
This was extracted from PageSidePanels in 80643e0680
and the code to maintain the ordering based on the order attribute was
added in c6e6f46c29 (previously the order
attribute did nothing) and the test was added in
291538ca1d. All of these were added just
for the sake of making use of the order attribute that isn't really
necessary because we never had the ability to customise the side panels
and it actually was just a leftover from copy-pasting the action menu code.

Now that the side panels and the order are defined directly in the view,
we can safely remove this code.
2023-09-20 11:57:11 +01:00
Sage Abdullah 4580079d13
Remove SnippetSidePanels class and instantiate each side panel directly in the view 2023-09-20 11:57:11 +01:00
Sage Abdullah 363129216d
Remove PageSidePanels class and instantiate each side panel directly in the view
The intermediary class isn't very useful and only adds complexities, as
we have to pass the data to be used by each side panel through it even
if only one of them uses the data (e.g. live_object, scheduled_object
that are only used by the status side panel. It also made parameters
like preview_enabled and comments_enabled necessary when the view
could've determined which side panels to use in the first place.
2023-09-20 11:57:11 +01:00
Neeraj P Yetheendran cdd6f1800c Allow subclasses of PagesAPIViewSet override default Page model
- Built on original PR #7372 and feedback on that solution
- Add unit tests and documentation
- Fix typo in API documentation for `CustomPagesAPIViewSet`
- Ensure that pk is used (not id) while filtering to prevent assumption that id is pk
2023-09-20 08:13:19 +10:00
Matt Westcott 6009903c55 Support passing extra context variables via the {% component %} tag 2023-09-20 07:46:39 +10:00
LB Johnston dd95b8b0d2 Fix changelog / release notes entry for #10916 2023-09-20 07:24:58 +10:00
Matt Westcott 30a489a51c Document support for OpenSearch
Fixes #7920
2023-09-20 07:17:58 +10:00
Matt Westcott 4938db9b7c Release note for #10916 in 5.1.2 2023-09-19 10:29:23 +01:00
Matt Westcott 362b847ef5 Add test run on opensearch 2023-09-19 10:25:12 +01:00
Matt Westcott 9372cb12e2 Fix Elasticsearch7 backend to work on pre-7.15 library versions
Fixes #7920. Check library version and only patch backend classes with the updated API calls if it's >=7.15.
2023-09-19 10:25:12 +01:00
LB Johnston b60828ac47 Hooks documentation - fix up admonition formatting 2023-09-19 12:18:51 +10:00
Matt Westcott b5eff93fde Release note for #10911 in 5.0.3 2023-09-18 16:03:10 +01:00
LB Johnston 6abcb254c2 Clean up additional white-space in HTML attributes 2023-09-18 20:34:12 +10:00
Sage Abdullah 4a097466eb Fix CallableChoiceIterator import on Django 5.0+ 2023-09-18 10:43:07 +01:00
LB Johnston 27a8f85e1e Add changelog for #10245 & #10893 2023-09-17 21:20:51 +10:00
Subhajit Ghosh 70a6aacfb9 Replace usage of text/django-form-template script with template element
- Remove `escapescript` template tag usage as no longer required
- Closes #10034
2023-09-17 21:20:51 +10:00
mansi0829 0fde1ca404 Update InlinePanel JS to support empty form as Template
- Keep backwards compatibility with script element
2023-09-17 21:20:51 +10:00
SebCorbin f82366e151 Fix PublishMenuItem label is not overridable through hook
Fixes #10663
2023-09-17 17:27:44 +10:00
Daniel Kirkham 72c55dee17 Fix typo and expression in 5.1 release notes 2023-09-17 16:28:40 +10:00