Closed nimphal closed 7 years ago
Both of these (and all other Create work buttons) have been changed to link_to
s 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.
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
.
I have now tried these on the sufia base app and they don't work there either, focus now is on a workaround.
HI @Nimphal, you can work around by going to the url /concern/works/new
oops, I see you already know that ^ :-)
No worries :)
This now works, closing.
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.