Rohit Sharma
8d4e4f2a0d
Pass page_size to ImageChooserViewSet
2024-04-23 19:00:49 +00:00
Rohit Sharma
4878943a52
changes
2024-04-22 20:31:18 +00:00
Rohit Sharma
b4a63e38f2
revert changes :)
2024-04-22 19:06:49 +00:00
Rohit Sharma
21a3df31da
Some changes
2024-04-22 14:16:50 +00:00
Claude Meyer
c3324c04fa
Match response_data_title_key for SnippetChooserViewSet.create_view_class to the front end's titleStateKey value of 'string'.
2023-10-13 15:40:02 +01:00
Sage Abdullah
dc44e571c8
Allow admin URL customisation for snippets via SnippetViewSet
2023-03-23 13:54:43 +00:00
Sage Abdullah
dd54899ec8
Pass icon to AdminSnippetChooser in SnippetViewSet.register_chooser_widget()
...
This effectively sets the chooser widget icon to use SnippetViewSet.icon
2023-03-22 15:05:12 +00:00
Daniel Kirkham
fd1ccbc669
Allow a custom icon in SnippetViewSet to be used across the admin views
2023-03-22 15:03:48 +00:00
Sage Abdullah
01b36267af
Register AdminSnippetChooser from SnippetChooserViewSet.on_register()
2023-03-12 19:40:19 +10:00
Matt Westcott
45fe5c1b95
Use correct dict key for SnippetChosenMultipleView
2023-01-18 14:31:08 +00:00
Sage Abdullah
5e2a827afa
Create LiveStatusTagColumn and UpdatedAtColumn classes with predefined arguments
2022-09-28 10:39:48 +01:00
Sage Abdullah
fcbb494747
Show Status column in snippet chooser view if DraftStateMixin is applied
2022-08-11 10:03:32 +01:00
Matt Westcott
f58cef9a33
Move locale filtering from snippets into the base chooser
2022-08-02 19:28:49 +02:00
Matt Westcott
52696c467c
Add CreationFormMixin to ChooseResultsView
...
Among other creation-form-related methods, this makes `can_create` available on the results view, which is useful for selectively outputting the "no objects found; would you like to create one now?" message.
2022-07-04 19:01:28 +01:00
Matt Westcott
ee1867e766
Add some more customisation hooks to creation form handling
2022-07-04 19:01:28 +01:00
Matt Westcott
9086300a4a
Remove special-case handling of cross-links between chooser views
...
The viewset deals with those correctly now.
2022-06-29 13:34:30 +10:00
Matt Westcott
6b6d3b1f7e
Register snippet chooser views using viewsets
2022-06-29 13:34:30 +10:00
Matt Westcott
65cf8488b8
Refactor chooser views into separate urlconfs per model
2022-06-29 13:34:30 +10:00
Matt Westcott
d259d2067a
Use generic ChosenView for snippets
2022-06-29 13:34:30 +10:00
Matt Westcott
6041df231b
Add mixins to eliminate duplication on ChooseView / ChooseResultsView
2022-06-29 13:34:30 +10:00
Matt Westcott
64f2a57137
Make BaseSnippetChooseView inherit from generic BaseChooseView
2022-06-29 13:34:30 +10:00
Matt Westcott
eb22a209e4
Add properties for columns and per_page
2022-06-29 13:34:30 +10:00
Matt Westcott
787691e762
Make snippet chooser results template inherit from generic chooser results
2022-06-29 13:34:30 +10:00
Matt Westcott
c293438121
Use generic chooser.html template
2022-06-29 13:34:30 +10:00
Matt Westcott
75d268d104
rename 'items' to 'results' for consistency with generic view
2022-06-29 13:34:30 +10:00
Matt Westcott
8c40292938
Add a get_results_url method to accommodate setups where the URL routing is more complex than a static route name with no arguments
2022-06-29 13:34:30 +10:00
Matt Westcott
5debdaa1f8
Pass icon / page_title / page_subtitle from view class
2022-06-29 13:34:30 +10:00
Matt Westcott
8735472ace
Move locale chooser into filter_form
...
Remove the hidden 'locale' field, as it's not clear why it's needed - there's no UI mechanism for reverting back to the locale we initially opened the modal on, so there's no reason to persist it between modal view loads.
2022-06-29 13:34:30 +10:00
Matt Westcott
4f511f0fd4
Migrate snippet chooser search form to get_filter_form_class
...
to match generic implementation in wagtail.admin.views.generic.chooser
2022-06-29 13:34:30 +10:00
Matt Westcott
fe700b9292
Split out a get_context_data method
2022-06-29 13:34:30 +10:00
Matt Westcott
20f49137b6
Split out a get_object_list method
2022-06-29 13:34:30 +10:00
Matt Westcott
97b3ab2c39
Fix 'create one now' link on snippet choosers
...
Regression introduced in #8422
2022-06-25 22:27:08 +10:00
Matt Westcott
b37d16b07b
Adopt a standard data-chooser-modal-choice attribute to identify 'chosen' links
2022-05-25 20:10:47 +10:00
sage
9d1110d349
Wrap snippet views in SnippetViewSet ( #8422 )
2022-04-26 16:08:26 +01:00
sage
ecfca0169e
Use class-based view for snippet chosen view ( #8417 )
2022-04-25 13:51:03 +01:00
Karl Hobley
75cc7da38a
Move wagtail.core to wagtail
2022-03-17 17:19:59 +00:00
Dan Braghis
d10f15e558
Reformat with black
2022-02-15 13:06:17 +00:00
Matt Westcott
7611f4023f
Don't bother adding the table-headers classname
...
The only purpose it serves here is to add a grey bottom border, which is already provided by the <thead> element.
2022-01-21 01:27:12 +00:00
Matt Westcott
d7e6382d97
Use wagtail.admin.ui.tables framework for snippet chooser
2022-01-21 01:27:12 +00:00
Matt Westcott
ca8dd6d007
Make the results-only version of the choose view a distinct view, rather than a URL parameter
2021-08-02 17:05:14 +01:00
Matt Westcott
7ddbcb18d7
Move response rendering into its own method
2021-08-02 17:05:14 +01:00
Matt Westcott
7439f38d51
Convert choose view to a class-based view
2021-08-02 17:05:14 +01:00
Matt Westcott
728b48ceca
remove locale variables unused by wagtailsnippets/chooser/results.html
2021-08-02 17:05:14 +01:00
Karl Hobley
4daeed1bf5
Add locale filter into snippet chooser ( #6699 )
2021-05-17 13:24:03 +01:00
Andy Babic
1f2b6fb449
Consistently return TemplateResponse from views instead of using the render() shortcut ( #5731 )
2020-04-20 13:33:04 +01:00
Mohamed Feddad
bb2e460c0b
Replace deprecated ugettext, ungettext with gettext and ngettext. ( #5907 )
2020-04-02 17:15:26 +01:00
Matt Westcott
b3ed5cc1cc
Deprecate wagtail.utils.pagination
2019-03-14 11:50:25 +01:00
Matt Westcott
b3a6b7f55f
Update imports of wagtail.admin.forms to use more specific sub-modules
2018-09-28 17:00:16 +01:00
Sævar Öfjörð Magnússon
6e60469142
Convert UUID primary key to string before serializing in json. Fixes #4616 .
2018-08-21 17:17:03 +01:00
Matt Westcott
074d9ce3f4
Convert the snippet chooser to use static onload handlers
2018-06-20 15:35:40 +01:00