Commit graph

6377 commits

Author SHA1 Message Date
Matt Westcott
90b009583e Convert remaining permission_required decorators to the wagtailadmin one 2015-08-15 02:39:30 +02:00
Matt Westcott
2c948bbe15 Remove redundant access_admin permission check from styleguide.
All admin views added through register_admin_urls have this applied automatically.
2015-08-15 02:39:30 +02:00
Matt Westcott
7d32c55d7f Add a permission_required decorator as a non-broken replacement for Django's one.
This is functionally equivalent to any_permission_required with a single permission passed, but it's better to make permission_required its own thing so that developers don't have the mental hurdle of seeing an unfamiliar decorator and wondering what 'any' refers to...
2015-08-15 02:39:30 +02:00
Matt Westcott
b3a55a3588 Make documents admin usable by users who have change_document permission but not add_document 2015-08-15 02:39:30 +02:00
Matt Westcott
169eb8a85c Make images admin usable by users who have change_image permission but not add_image 2015-08-15 02:39:29 +02:00
Matt Westcott
04b95ce99e Remove 'delete' permission checkboxes for image and document.
For these models, permission to edit implies permission to delete, so the delete permission is redundant.
2015-08-15 02:39:29 +02:00
Matt Westcott
d11f8efc80 Remove 'user profile' from the set of registered permission types.
This is never used, as Wagtail has no interface for editing user profiles; if one were to exist, it would make more sense for this to be linked to User permissions.
2015-08-15 02:39:29 +02:00
Karl Hobley
5d0c4caf3b Search results messages
- Number of items matched
 - Different message when no items found
2015-08-14 15:50:48 +01:00
Karl Hobley
f9632b98d3 JavaScript for snippet chooser search 2015-08-14 15:50:48 +01:00
Karl Hobley
8ed3b79706 Use main listing template in chooser 2015-08-14 15:50:48 +01:00
Karl Hobley
aa4edc67d3 Snippets chooser pagination now fetches results.html
Instead of going through modal workflow. This is similar to how the chooser works elsewhere in wagtail
2015-08-14 15:50:48 +01:00
Karl Hobley
cc66159441 Added snippet chooser results template
So search results can be loaded with ajax
2015-08-14 15:50:47 +01:00
Karl Hobley
eddc129a69 Added search form to snippets chooser 2015-08-14 15:50:47 +01:00
Karl Hobley
d43fa39f89 Ajaxify snippet search 2015-08-14 15:50:47 +01:00
Karl Hobley
9fced68f89 Add search to snippet chooser view 2015-08-14 15:50:47 +01:00
Karl Hobley
3efbac7dfc Added search to snippet listing view 2015-08-14 15:50:47 +01:00
Karl Hobley
f8a4ff4e6a Added SearchableSnippet test model 2015-08-14 13:58:52 +01:00
Matt Westcott
371c9dc9a5 Merge branch 'kaedroho-fetch-translations' 2015-08-14 13:11:26 +02:00
Karl Hobley
ce743768f5 Fetched translations from transfex 2015-08-14 10:58:35 +01:00
Matt Westcott
a1886d4d5b fix another styleguide link missed when converting to namespaced URLs 2015-08-14 11:44:06 +02:00
Karl Hobley
6a9a80a16d Don't reopen files that are from external hosting
Fixes #1397
2015-08-13 17:28:20 +01:00
Karl Hobley
20036e5b5f Implemented Image.is_stored_locally helper function 2015-08-13 17:19:47 +01:00
Karl Hobley
870ce11bd6 Failing tests for #1397
Testing the following with an external image backend:
 - Uploading through image chooser (fails)
 - Visiting the edit page of an image with a null file_size (fails)
 - Editing an image, changing the image file
 - Adding a new image

The latter two do not fail, I thought I'd add them to reduce risk of regressions in the future
2015-08-13 16:59:08 +01:00
Karl Hobley
ef73c7ec12 Use wagtailsearch in page chooser 2015-08-13 14:51:15 +01:00
Matt Westcott
7785beecc6 Allow AdminPageChooser edit link to be hidden, and hide it on the page permissions interface 2015-08-12 17:08:22 +01:00
Matt Westcott
7c26217ea0 Remove 'Clear choice' action from page chooser in page permissions interface.
This appeared because we reassigned the field's 'widget' attribute after the field was initialised - this means that the field never gets to pass its 'required=True' flag on to the widget. We avoid this by defining the field as a whole, in the Django-approved way (which also means we don't need to override __init__).
2015-08-12 16:13:44 +01:00
Alex Gleason
af901c3706 Fixes #1298 2015-08-11 23:01:39 -05:00
Matt Westcott
e867b48446 Merge pull request #1593 from torchbox/revert-1581-multiple-page-types-in-page-chooser
Revert "Multiple page types in page chooser"
2015-08-11 18:00:25 +01:00
Matt Westcott
85707d5925 Revert "Multiple page types in page chooser" 2015-08-11 18:00:05 +01:00
Matt Westcott
31c6198afb Merge pull request #1592 from torchbox/revert-1590-fix-1581
Revert "Fix a couple of bugs in #1581"
2015-08-11 17:59:49 +01:00
Matt Westcott
90ebd2ed73 Revert "Fix a couple of bugs in #1581" 2015-08-11 17:59:38 +01:00
Karl Hobley
e1cb885de2 Merge pull request #1590 from kaedroho/fix-1581
Fix a couple of bugs in #1581
2015-08-11 17:08:44 +01:00
Karl Hobley
3550a17401 Fix crash
content_types is a dictionary of model classes => content types.

content_type__in requires a list of content types so .values() is called
2015-08-11 16:44:37 +01:00
Karl Hobley
4aabac1bdc JS changes for #1581
These got lost somehow...
2015-08-11 16:43:57 +01:00
Tom Dyson
f8d2a9f456 Merge pull request #1565 from gasman/fix/remove-menu-classes
Remove all menu-{section_name} classnames on the <body> element and menu item <li>s
2015-08-11 12:39:03 +01:00
Tom Dyson
de78b8d609 Merge pull request #1573 from kaedroho/fix-editorspicks-references
Fixed a couple of references to editors picks
2015-08-11 12:33:44 +01:00
Michael van Tellingen
51bf76ba70 Don't call Site.get_root_paths() twice in Page.url property 2015-08-08 15:54:01 +02:00
hanpama
de3d22b8da Correct omitted parameter in assertion 2015-08-08 02:34:38 +09:00
hanpama
4f761136d4 Remove unused local var and Fix some indentations 2015-08-07 22:12:38 +09:00
hanpama
e819de91b5 Fix URL names with namespace 2015-08-07 22:03:10 +09:00
hanpama
0f4514752c Pull and Merge torchbox master 2015-08-07 21:17:34 +09:00
hanpama
3723a15eec Edit some comments 2015-08-07 21:12:54 +09:00
hanpama
407f18a922 Write testcase for delete submission view 2015-08-07 21:07:22 +09:00
Karl Hobley
337a979257 #1582 - Fix typo in model reference 2015-08-05 14:13:00 +01:00
Karl Hobley
5b123ca5f4 Deterministic ordering for tags 2015-08-03 20:27:22 +01:00
Karl Hobley
1d0fa2a3bf Various tweaks and fixes 2015-08-03 20:24:51 +01:00
Tom Dyson
7c784dec70 Merge pull request #1581 from nimasmi/multiple-page-types-in-page-chooser
Multiple page types in page chooser
2015-08-03 20:18:21 +01:00
Karl Hobley
fdb3e4905e Merge pull request #1576 from kaedroho/issue/1574
Removed references to search picks from project template
2015-08-03 20:09:52 +01:00
Karl Hobley
6d92ca4f3a Moved page model specific check into PageSerializer 2015-08-03 20:01:26 +01:00
Karl Hobley
c2706ac6d4 Split serialize_fields out of to_representation
Makes some code look a bit better
2015-08-03 19:49:08 +01:00