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
Sage Abdullah
bde19900b9
Release notes for #10880
2023-09-15 15:33:55 +01:00
Sage Abdullah
d2ad1bfb69
Add breadcrumbs to generic inspect view
2023-09-15 15:27:05 +01:00
Sage Abdullah
ee67521b9f
Move Home breadcrumb item to the view level
...
This allows using the {% breadcrumbs %} tag without having the Home as the first item
2023-09-15 15:26:03 +01:00
Sage Abdullah
d0eba3e35d
Add home as the first item in generic breadcrumbs
2023-09-14 14:12:56 +01:00
Sage Abdullah
f4109ccf1d
Do not add URL to the last item in the generic breadcrumbs
2023-09-14 14:12:56 +01:00
Sage Abdullah
78f9db33e3
Render breadcrumbs in generic model views
2023-09-14 14:12:56 +01:00
Sage Abdullah
6f39b9170a
Move snippets breadcrumb items definition to generic views
2023-09-14 14:12:11 +01:00
Sage Abdullah
acf24d978e
Revert "Add breadcrumbs to snippets delete view"
...
This reverts commit 9ed5b8f070
.
2023-09-14 14:09:49 +01:00
WhatIsThisVJ
b681e74d30
Replace @total_ordering usage with comparison functions implementation #10526
2023-09-14 11:32:59 +01:00
LB Johnston
ba9f7c898f
Add changelog / upgrade considerations for #10869
...
Closes #10668
2023-09-14 09:09:59 +10:00
Subhajit Ghosh
36b9edc5d7
Migrate all data-tippy attributes to w-tooltip Stimulus data attributes
2023-09-14 09:09:59 +10:00
Subhajit Ghosh
849615404c
Update dropdown template tag using offset
...
- Rename template tag variable toggle_tippy_offset to toggle_tooltip_offset
- Update usage in the dropdown template to use as a Stimulus data attribute variable instead of a data-tippy attribute on the inner button element
2023-09-14 09:09:59 +10:00
Subhajit Ghosh
f86a832a4b
Add support for offset value in Dropdown & Tooltip controllers
2023-09-14 09:09:59 +10:00
LB Johnston
e317ac482b
Revise the human_readable_date arg (rename position to placement)
...
- Add unit tests
- Move changelog entry to features, not maintenance
- See #10871 & 0a977cc54d
2023-09-14 07:30:28 +10:00
LB Johnston
51df7b51d0
Add 5.1.2 backport changelog entry for #10857
2023-09-14 06:41:07 +10:00
Andy Chosak
dbc130e565
Fix minor typos in the docs
...
"JavasScript" -> "JavaScript"
2023-09-14 06:36:46 +10:00
LB Johnston
a5966753d2
Changelog & release notes for #10857
...
- Including backport to 5.1.2
2023-09-14 06:32:29 +10:00
Jake Howard
7439fa0b20
Add tests for image serving SVG and AVIF files
2023-09-14 06:20:34 +10:00
Jake Howard
84d744303d
Bump Willow to ensure it supports SVG mimes
2023-09-14 06:20:34 +10:00
Jake Howard
2ec1b0314b
Replace imghdr
with Willow's built-in mime-type detection
2023-09-14 06:20:34 +10:00
LB Johnston
19b4df2648
Add 5.1 release notes for changed attrs.html
template location
...
Fixes #10874
2023-09-14 06:04:01 +10:00
Sage Abdullah
3cd13c65ef
Release notes for #10865 and #10870
2023-09-13 17:53:15 +01:00
Sage Abdullah
e6fbc500ed
Move sticky header wrapper to slim_header.html
...
Reduces copy-pasting across every usage of the template
2023-09-13 17:41:48 +01:00
Sage Abdullah
b543e3ab2d
Move side_panels.html include to slim_header.html
...
This brings the side_panel_toggles.html and side_panels.html includes
closer together (in the same slim_header.html file), which makes sense
as you'd only use the side panels when the slim header (with the
breadcrumbs) is used.
2023-09-13 17:41:48 +01:00
Sage Abdullah
2901ac84a7
Re-use side_panel_toggles.html include in slim_header.html template
2023-09-13 17:41:48 +01:00
Sage Abdullah
40856e7552
Add tests for generic breadcrumbs template tag
2023-09-13 16:27:12 +01:00
Sage Abdullah
a0604fc272
Use SimpleTestCase for most templatetag tests
...
Speed them up when run individually as it skips the database setup
2023-09-13 16:27:08 +01:00
Sage Abdullah
7751234ae7
Add stories for generic breadcrumbs component
2023-09-13 16:27:05 +01:00
Sage Abdullah
df1f44e8e6
Update breadcrumbs.stories.tsx to page_breadcrumbs.stories.tsx
2023-09-13 16:27:01 +01:00
Sage Abdullah
d95c1ecde2
Explicitly add is_expanded support to breadcrumbs template tag
2023-09-13 16:26:54 +01:00