CottageLabs / willow

Willow is an implementation of the Fedora/Samvera stack by Cottage Labs. It is built with Docker containers, which simplify development and deployment onto live services.
http://willow.cottagelabs.com/
6 stars 2 forks source link

Buttons to create work don't go to the New work page #114

Closed nimphal closed 7 years ago

nimphal commented 7 years ago

On the front page the button "Share work" and from the Works dropdown the button "New work" do not take the user to the New work page, instead they do nothing.

nimphal commented 7 years ago

Both of these (and all other Create work buttons) have been changed to link_tos with a specific target. The target is a modal https://github.com/projecthydra/sufia/blob/6cad34f9c06c9362f53e0e7aea490c52ff8cd777/app/views/shared/_select_work_type_modal.html.erb . For some reason the JS supposed to kick off this whole chain isn't firing. It isn't throwing any errors either.

I tried to put in place all of the parts into our repo rather than relying on the engine, but no dice.

nimphal commented 7 years ago

The "New work" item in the "My works" dropdown is dependent on the existence of multiple curation concerns as registered in config/initializers/sufia.rb As part of the Sufia 7.3 upgrade I generated a generic MyWorkType placeholder to test out the functionality with multiple work types. With multiple work types, the "New work" menu item uses the target modal same as the Share Your Work button. If there is only one registered work type, it goes the standard route of having a href to concern/works/new.

The problem is that the JS that is supposed to fire when you click these buttons with targets is not firing. The work creation pages are accessible through the url by going to /concern/works/new or for the dummy work type /concern/my_work_types/new.

nimphal commented 7 years ago

I have now tried these on the sufia base app and they don't work there either, focus now is on a workaround.

martyn-w commented 7 years ago

HI @Nimphal, you can work around by going to the url /concern/works/new

martyn-w commented 7 years ago

oops, I see you already know that ^ :-)

nimphal commented 7 years ago

No worries :)

nimphal commented 7 years ago

This now works, closing.