[Workbench] When combining collections in a project, the new collection is created in Home project, but the user is still in current project.
#2 Updated by Tom Clegg almost 5 years ago
Radhika Chippada wrote:
First preference: Create the collection in "current" project.
This seems like a much better default -- unless the current project is not writable, in which case "ask where" is probably the only non-surprising behavior.
Alternatively: Take the user to the newly created collection.
Seems to me we should do this as well.
#5 Updated by Radhika Chippada almost 5 years ago
- When collections are combined from within a project: the new collection is created in that project, provided the current_user can write to that project.
- When files in a collection are combined: the new collection is created in the project which owns the original collection, provided the current_user can write to that project.
- Updated tests and added additional assertions to look for the expected project
- Also, used rails flash to send a message from controller to the view to show an alert to the user about where the new collection is created.
- In addition, added rails flash handling and the associated alert display to "_title_and_buttons.html.erb". Hence, any other actions can start using this feature from now on. It supports the handling of more than one item in the flash message hash. This displays the alert using "alert-danger" if any of the keys used in the flash hash are of the key "error". Otherwise, it uses "alert-warning" to display the info messages. I chose to use "alert-warning" instead of "alert-info" so that the alert message stands out and does not get lost in the rest of the page display. Note: We might want to add a note in our Hacking Workbench page about this.