NYULibraries/ichabod — pull request #116 by ekate (2014-12-10 16:02:36+00:00)
Title: Feature/edit button on results

This feature adds "Edit" and "Delete" buttons to the search results and detailed search results pages. Only authorized users can see the buttons.
After the feature is implemented I suggest we modify nyucore.rb#index. It's now lists all nyucores object without pagination and may cause timeout.
I added the following parameters to the catalog_controller. Those parameters controls display of each document in search results(index) and detailed search results(show):
config.index.partials = ['index_header','index','action_buttons']
config.show.partials = ['show_header','show','action_buttons']
I also added partial _action_buttons_default.erb.html which displays the buttons.
Modifications in nyucores_controller insure that we return to the correct page on the search results after action is completed
I added specs to check that documents are displayed correctly and redirects to search results work
I added cucs to make sure the action buttons do work as expected
As I needed to re-record cassettes for search new cassettes are added

The following files were added:
﻿app/views/catalog/_action_buttons_default.erb.htm
features/edit_button_on_results.feature
features/destroy_button_on_results.feature
feature/step_definitions/edit_button_steps.rb
spec/controllers/nyucores_controller_spec.rb
spec/views/catalog/_action_buttons_default.html.erb_spec.rb
spec/views/catalog/show.html.erb_spec.rb
spec/views/catalog/_document.html.erb_spec.rb

The following files were modified
app/controllers/catalog_controller.rb
app/controllers/nyucores_controller.rb
feature/step_definitions/record_steps.rb
feature/edit_metadata_authorization.feature
feature/metadata_remediation.feature
spec/controllers/nyucores_controller_spec.rb
features/support/env.rb (to create cassettes)