samvera-deprecated / sufia

[DEPRECATED] Sufia: a fully featured, flexible Samvera repository front-end.
http://sufia.io/
Other
111 stars 78 forks source link

Regression: Batch edit functionality #1461

Closed jcoyne closed 8 years ago

jcoyne commented 8 years ago

Compare https://github.com/projecthydra/sufia/blob/6.x-stable/app/views/my/_sort_and_per_page.html.erb with https://github.com/projecthydra/sufia/blob/master/app/views/my/_sort_and_per_page.html.erb

"Edit Selected" and batch_delete are gone now. We want this functionality to work like it did in 6.0

jcoyne commented 8 years ago

I'm not sure why this is closed, it's still not working like it did in 6.0.

njaffer commented 8 years ago

So when I compare, Sufia 6 and the master branch, I cannot get the document info from solr, the reason is that it is saved as GenericWork and not FileSet

Should this be GenericWork instead of FileSet? Any thoughts?https://github.com/projecthydra/sufia/blob/master/app/controllers/concerns/sufia/batch_edits_controller_behavior.rb#L23

mjgiarlo commented 8 years ago

@njaffer Yes, I believe so.

njaffer commented 8 years ago

Ok, I changed it and I am getting the information but now the error is the default render form, it is rendering curation concerns edit form and not the batch edit form in sufia. Because of this I am getting an error on this line: https://github.com/projecthydra-labs/curation_concerns/blob/64eab4d87fac8b88367ebb5e34b4d34ad7ce6716/app/views/curation_concerns/base/edit.html.erb#L1

Any ideas?

mjgiarlo commented 8 years ago

@njaffer I wonder if the BatchEditsControllerBehavior module is finding the CC view before the Sufia view because of this method: https://github.com/projecthydra/sufia/blob/master/app/controllers/concerns/sufia/batch_edits_controller_behavior.rb#L65-L68

I haven't analyzed this deeply yet, but I wonder if that method should return @_prefixes ||= super + ['curation_concerns/base'] instead, so that Sufia views are found before CC ones. @jcoyne added this code so he may have a better suggestion.

njaffer commented 8 years ago

@mjgiarlo , it worked! Thank you..

mjgiarlo commented 8 years ago

@njaffer :clap: