{"action":"created","issue":{"url":"https://api.github.com/repos/torchbox/wagtail/issues/1751","labels_url":"https://api.github.com/repos/torchbox/wagtail/issues/1751/labels{/name}","comments_url":"https://api.github.com/repos/torchbox/wagtail/issues/1751/comments","events_url":"https://api.github.com/repos/torchbox/wagtail/issues/1751/events","html_url":"https://github.com/torchbox/wagtail/pull/1751","id":108897601,"number":1751,"title":"Collections for image/document organisation","user":{"login":"gasman","id":85097,"avatar_url":"https://avatars.githubusercontent.com/u/85097?v=3","gravatar_id":"","url":"https://api.github.com/users/gasman","html_url":"https://github.com/gasman","followers_url":"https://api.github.com/users/gasman/followers","following_url":"https://api.github.com/users/gasman/following{/other_user}","gists_url":"https://api.github.com/users/gasman/gists{/gist_id}","starred_url":"https://api.github.com/users/gasman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gasman/subscriptions","organizations_url":"https://api.github.com/users/gasman/orgs","repos_url":"https://api.github.com/users/gasman/repos","events_url":"https://api.github.com/users/gasman/events{/privacy}","received_events_url":"https://api.github.com/users/gasman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/torchbox/wagtail/labels/Enhancement","name":"Enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/torchbox/wagtail/milestones/19","html_url":"https://github.com/torchbox/wagtail/milestones/1.3","labels_url":"https://api.github.com/repos/torchbox/wagtail/milestones/19/labels","id":1347538,"number":19,"title":"1.3","description":"","creator":{"login":"gasman","id":85097,"avatar_url":"https://avatars.githubusercontent.com/u/85097?v=3","gravatar_id":"","url":"https://api.github.com/users/gasman","html_url":"https://github.com/gasman","followers_url":"https://api.github.com/users/gasman/followers","following_url":"https://api.github.com/users/gasman/following{/other_user}","gists_url":"https://api.github.com/users/gasman/gists{/gist_id}","starred_url":"https://api.github.com/users/gasman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gasman/subscriptions","organizations_url":"https://api.github.com/users/gasman/orgs","repos_url":"https://api.github.com/users/gasman/repos","events_url":"https://api.github.com/users/gasman/events{/privacy}","received_events_url":"https://api.github.com/users/gasman/received_events","type":"User","site_admin":false},"open_issues":87,"closed_issues":0,"state":"open","created_at":"2015-10-09T16:33:13Z","updated_at":"2015-11-03T15:42:04Z","due_on":"2015-11-30T00:00:00Z","closed_at":null},"comments":4,"created_at":"2015-09-29T15:43:24Z","updated_at":"2015-11-03T17:30:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/torchbox/wagtail/pulls/1751","html_url":"https://github.com/torchbox/wagtail/pull/1751","diff_url":"https://github.com/torchbox/wagtail/pull/1751.diff","patch_url":"https://github.com/torchbox/wagtail/pull/1751.patch"},"body":"Spec: https://github.com/torchbox/wagtail/wiki/Collections-RFC, https://groups.google.com/d/msg/wagtail-developers/kE-aDrOIzRI/Cc2CP3KbAwAJ\r\n\r\nThis has been developed as a change to core Wagtail rather than a pluggable module, since it interacts with many existing areas of Wagtail, such as the permissions model, document/image edit forms, and the groups admin interface - and implementing a general-purpose extension framework in all of those areas would be a far bigger job. However, I've tried to keep the code compartmentalised enough so that it can be enabled/disabled depending on whether or not Image and Document inherit from the `CollectionMember` class. By default, custom image models do not inherit from this, so collections will be disabled for those.\r\n\r\nAs it stands this is a 'minimum viable product' and has a few rough edges:\r\n\r\n* There is no restriction on what documents/images the user can use (i.e. see within the document/image chooser) - we agreed that this was out of scope for the initial feature.\r\n* There is no interface for browsing documents / images by collection - the listing pages simply show all items that the user has edit permission for (meaning that currently, collections are *only* useful for permission restriction - not for general asset organisation).\r\n* Deleting a collection will delete all documents / images within it; the 'manage collections' interface does not warn about this (since the collection management area doesn't currently know or care which models are making use of collections).\r\n* Our aim was for the collection feature to be effectively invisible (apart from the addition of a Collections item in the settings menu) until a site is actively making use of it - i.e. a user creating a new Wagtail site would not have to understand the concept of collections up-front. We haven't entirely achieved this, because the document/image permissions within the 'edit group' UI now appear under 'collection permissions'. In order to configure these permissions, a user will have to understand what it means to be specifying those permissions on the 'root' collection.\r\n* It hasn't had any design review yet. The UI additions here are mostly uncontroversial, as they're mainly just adding extra fields to an existing form - but the collection chooser dropdown on the 'add multiple images' view probably needs some attention.\r\n* It hasn't been tested with custom image models yet.\r\n\r\nThis PR incorporates #1668."},"comment":{"url":"https://api.github.com/repos/torchbox/wagtail/issues/comments/153425890","html_url":"https://github.com/torchbox/wagtail/pull/1751#issuecomment-153425890","issue_url":"https://api.github.com/repos/torchbox/wagtail/issues/1751","id":153425890,"user":{"login":"gasman","id":85097,"avatar_url":"https://avatars.githubusercontent.com/u/85097?v=3","gravatar_id":"","url":"https://api.github.com/users/gasman","html_url":"https://github.com/gasman","followers_url":"https://api.github.com/users/gasman/followers","following_url":"https://api.github.com/users/gasman/following{/other_user}","gists_url":"https://api.github.com/users/gasman/gists{/gist_id}","starred_url":"https://api.github.com/users/gasman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gasman/subscriptions","organizations_url":"https://api.github.com/users/gasman/orgs","repos_url":"https://api.github.com/users/gasman/repos","events_url":"https://api.github.com/users/gasman/events{/privacy}","received_events_url":"https://api.github.com/users/gasman/received_events","type":"User","site_admin":false},"created_at":"2015-11-03T17:30:03Z","updated_at":"2015-11-03T17:30:03Z","body":"Rebased on top of master (and #1896, #1897, #1898) in https://github.com/gasman/wagtail/tree/feature/collection-tree-model-2. Will open a new PR to replace this one once the following blockers have been addressed:\r\n\r\n* tests\r\n* UI for browsing by collection\r\n* refactoring to make CollectionMember NOT optional on image/document models (the conditionals make the code ugly, and only arose from misplaced sitting-on-the-fence about the value of this feature)\r\n* if possible, implement #1488 so that the permission management UI for page and collection permissions behaves the same as global permissions (so that the overall user experience is not a step backwards from when images/document permissions where managed through those checkboxes - and hopefully remains substantially similar, in accordance with the Complex Features Should Get Out Of Your Way principle)."}}