atrium 0.0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +9 -1
- data/.rspec +2 -0
- data/.rvmrc +1 -1
- data/CONTRIBUTING.md +73 -0
- data/Gemfile +27 -2
- data/Gemfile.lock +122 -246
- data/Guardfile +40 -10
- data/LICENSE +14 -0
- data/README.mkd +23 -39
- data/ROADMAP.mkd +41 -9
- data/Rakefile +39 -4
- data/app/assets/images/atrium/remove.png +0 -0
- data/app/assets/images/atrium/white-arrow.png +0 -0
- data/app/assets/javascripts/{atrium/atrium.js → atrium.js} +8 -153
- data/app/assets/stylesheets/{atrium/atrium.css → atrium.css} +110 -37
- data/app/assets/stylesheets/atrium/collections.css +4 -0
- data/app/assets/stylesheets/atrium/descriptions.css +4 -0
- data/app/assets/stylesheets/atrium/exhibits.css +4 -0
- data/app/assets/stylesheets/atrium/reset.css +69 -0
- data/app/assets/stylesheets/atrium/showcases.css +4 -0
- data/app/assets/stylesheets/atrium/theme.css +248 -0
- data/app/controllers/atrium/application_controller.rb +12 -0
- data/app/controllers/atrium/browse_levels_controller.rb +22 -0
- data/app/controllers/atrium/collections_controller.rb +42 -138
- data/app/controllers/atrium/descriptions_controller.rb +27 -146
- data/app/controllers/atrium/exhibits_controller.rb +51 -77
- data/app/controllers/atrium/order_controller.rb +74 -0
- data/app/controllers/atrium/showcases_controller.rb +96 -117
- data/app/helpers/atrium/application_helper.rb +8 -0
- data/app/helpers/atrium/collections_helper.rb +44 -0
- data/app/helpers/atrium/descriptions_helper.rb +4 -0
- data/app/helpers/atrium/exhibits_helper.rb +4 -0
- data/app/helpers/atrium/showcases_helper.rb +34 -0
- data/app/models/atrium/browse_level.rb +21 -11
- data/app/models/atrium/collection.rb +70 -36
- data/app/models/atrium/configuration.rb +66 -0
- data/app/models/atrium/description.rb +39 -88
- data/app/models/atrium/essay.rb +4 -5
- data/app/models/atrium/exhibit.rb +28 -19
- data/app/models/atrium/is_showcased_mixin.rb +34 -0
- data/app/models/atrium/query_param_mixin.rb +105 -0
- data/app/models/atrium/search/facet.rb +14 -25
- data/app/models/atrium/search/facet_selection.rb +10 -12
- data/app/models/atrium/showcase.rb +105 -95
- data/app/models/atrium/showcase/facet_selection.rb +18 -18
- data/app/models/atrium/showcase/featured_selection.rb +15 -0
- data/app/services/browse_level_evaluation_service.rb +131 -0
- data/app/services/current_filter_query_params_extraction_service.rb +91 -0
- data/app/services/navigation_tree.rb +13 -0
- data/app/services/params_adaptor_for_filter.rb +18 -0
- data/app/views/atrium/collections/_form.html.erb +149 -72
- data/app/views/atrium/collections/_head.html.erb +3 -0
- data/app/views/atrium/collections/edit.html.erb +1 -4
- data/app/views/atrium/collections/index.html.erb +14 -0
- data/app/views/atrium/collections/new.html.erb +2 -5
- data/app/views/atrium/collections/show.html.erb +11 -29
- data/app/views/atrium/descriptions/_form.html.erb +47 -49
- data/app/views/atrium/descriptions/edit.html.erb +1 -2
- data/app/views/atrium/descriptions/index.html.erb +2 -8
- data/app/views/atrium/descriptions/new.html.erb +2 -1
- data/app/views/atrium/descriptions/show.html.erb +2 -20
- data/app/views/atrium/exhibits/_exhibit.html.erb +1 -0
- data/app/views/atrium/exhibits/_form.html.erb +143 -96
- data/app/views/atrium/exhibits/edit.html.erb +1 -8
- data/app/views/atrium/exhibits/index.html.erb +2 -0
- data/app/views/atrium/exhibits/new.html.erb +0 -5
- data/app/views/atrium/exhibits/show.html.erb +2 -34
- data/app/views/atrium/showcases/_configure_menu.html.erb +55 -0
- data/app/views/atrium/showcases/_form.html.erb +40 -0
- data/app/views/atrium/showcases/edit.html.erb +3 -0
- data/app/views/atrium/showcases/index.html.erb +32 -0
- data/app/views/atrium/showcases/new.html.erb +3 -0
- data/app/views/atrium/showcases/show.html.erb +2 -1
- data/app/views/layouts/atrium.html.erb +16 -24
- data/app/views/layouts/atrium/application.html.erb +49 -0
- data/app/views/layouts/atrium/themes/default.html.erb +15 -0
- data/app/views/shared/_list_searchs.html.erb +4 -0
- data/app/views/shared/_navigation.html.erb +19 -0
- data/atrium.gemspec +31 -64
- data/config/routes.rb +40 -10
- data/{lib/generators/atrium/templates/migrations/create_atrium_collections.rb → db/migrate/20120730170406_create_atrium_collections.rb} +2 -1
- data/{lib/generators/atrium/templates/migrations/create_atrium_showcases.rb → db/migrate/20120731134846_create_atrium_showcases.rb} +3 -4
- data/{lib/generators/atrium/templates/migrations/create_atrium_exhibits.rb → db/migrate/20120731134856_create_atrium_exhibits.rb} +2 -1
- data/{lib/generators/atrium/templates/migrations/create_atrium_descriptions.rb → db/migrate/20120731134904_create_atrium_descriptions.rb} +2 -1
- data/{lib/generators/atrium/templates/migrations/create_atrium_essays.rb → db/migrate/20120731135534_create_atrium_essays.rb} +3 -2
- data/{lib/generators/atrium/templates/migrations/create_atrium_search_facets.rb → db/migrate/20120731135721_create_atrium_search_facets.rb} +1 -1
- data/{lib/generators/atrium/templates/migrations/create_atrium_showcase_facet_selections.rb → db/migrate/20120731140621_create_atrium_showcase_facet_selections.rb} +6 -2
- data/{lib/generators/atrium/templates/migrations/create_atrium_browse_levels.rb → db/migrate/20120801145241_create_atrium_browse_levels.rb} +1 -1
- data/db/migrate/20120820183808_create_selected_items.rb +16 -0
- data/db/migrate/20120823135716_update_atrium_collection_indices.rb +13 -0
- data/db/migrate/20120823143315_add_lookup_indices_as_required.rb +11 -0
- data/lib/atrium.rb +40 -36
- data/lib/atrium/engine.rb +4 -8
- data/lib/atrium/exceptions.rb +10 -0
- data/lib/atrium/version.rb +2 -2
- data/lib/generators/atrium/install/USAGE +8 -0
- data/lib/generators/atrium/install/install_generator.rb +86 -0
- data/lib/generators/atrium/install/templates/atrium_initializer.rb +21 -0
- data/lib/generators/atrium/install/templates/controllers/atrium_base_controller.rb +18 -0
- data/lib/generators/atrium/install/templates/controllers/collections_controller.rb +40 -0
- data/lib/generators/atrium/install/templates/controllers/descriptions_controller.rb +36 -0
- data/lib/generators/atrium/install/templates/controllers/exhibits_controller.rb +47 -0
- data/lib/generators/atrium/install/templates/controllers/selected_items_controller.rb +26 -0
- data/lib/generators/atrium/install/templates/helpers/application_helper.rb +42 -0
- data/lib/generators/atrium/install/templates/helpers/collections_helper.rb +15 -0
- data/lib/generators/atrium/install/templates/helpers/navigation_helper.rb +62 -0
- data/lib/generators/atrium/install/templates/helpers/solr_helper.rb +138 -0
- data/lib/generators/atrium/install/templates/models/selected_item.rb +7 -0
- data/lib/generators/atrium/install/templates/views/collections/_document.html.erb +19 -0
- data/lib/generators/atrium/install/templates/views/collections/_exhibits.html.erb +3 -0
- data/lib/generators/atrium/install/templates/views/collections/_pagination.html.erb +6 -0
- data/lib/generators/atrium/install/templates/views/collections/browse.html.erb +16 -0
- data/lib/generators/atrium/install/templates/views/collections/show.html.erb +19 -0
- data/lib/generators/atrium/install/templates/views/descriptions/show.html.erb +8 -0
- data/lib/generators/atrium/install/templates/views/exhibits/_document.html.erb +19 -0
- data/lib/generators/atrium/install/templates/views/exhibits/_pagination.html.erb +6 -0
- data/lib/generators/atrium/install/templates/views/exhibits/show.html.erb +28 -0
- data/lib/generators/atrium/install/templates/views/folder/_selected_items_form.html.erb +8 -0
- data/lib/generators/atrium/install/templates/views/folder/index.html.erb +45 -0
- data/lib/generators/atrium/install/templates/views/shared/_document_list.html.erb +14 -0
- data/lib/generators/atrium/install/templates/views/shared/_featured_sources.html.erb +19 -0
- data/lib/generators/atrium/install/templates/views/shared/_list_descriptions.html.erb +25 -0
- data/lib/generators/atrium/install/templates/views/shared/_masthead.html.erb +19 -0
- data/lib/generators/atrium/install/templates/views/shared/_navigation_browse_level.html.erb +34 -0
- data/lib/generators/atrium/install/templates/views/shared/_showcases.html.erb +12 -0
- data/lib/generators/atrium/install/templates/views/shared/_side_bar_navigation.html.erb +20 -0
- data/lib/generators/atrium/service/USAGE +9 -0
- data/lib/generators/atrium/service/service_generator.rb +16 -0
- data/lib/generators/atrium/service/templates/service.rb.erb +2 -0
- data/lib/generators/atrium/service/templates/service_spec.rb.erb +4 -0
- data/lib/generators/atrium/theme/USAGE +8 -0
- data/lib/generators/atrium/theme/templates/theme.html.erb +14 -0
- data/lib/generators/atrium/theme/theme_generator.rb +11 -0
- data/lib/tasks/atrium_tasks.rake +4 -0
- data/script/rails +10 -0
- data/spec/atrium_spec.rb +10 -0
- data/spec/controllers/atrium/application_controller_spec.rb +7 -0
- data/spec/controllers/atrium/collections_controller_spec.rb +125 -0
- data/spec/controllers/atrium/descriptions_controller_spec.rb +142 -0
- data/spec/controllers/atrium/exhibits_controller_spec.rb +102 -0
- data/spec/controllers/atrium/order_controller_spec.rb +100 -0
- data/spec/controllers/atrium/showcases_controller_spec.rb +217 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/models/collection.rb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +59 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/db/schema.rb +124 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/test/fixtures/collections.yml +11 -0
- data/spec/dummy/test/unit/collection_test.rb +7 -0
- data/spec/factories/atrium_collections.rb +8 -0
- data/spec/factories/atrium_exhibits.rb +9 -0
- data/spec/factories/atrium_search_facets.rb +8 -0
- data/spec/factories/atrium_showcases.rb +25 -0
- data/spec/helpers/atrium/collections_helper_spec.rb +57 -0
- data/spec/helpers/atrium/showcases_helper_spec.rb +56 -0
- data/spec/models/atrium/browse_level_spec.rb +56 -0
- data/spec/models/atrium/collection_spec.rb +76 -0
- data/spec/models/atrium/configuration_spec.rb +114 -0
- data/spec/models/atrium/description_spec.rb +56 -0
- data/spec/models/atrium/essay_spec.rb +16 -0
- data/spec/models/atrium/exhibit_spec.rb +90 -0
- data/spec/models/atrium/search/facet_selection_spec.rb +23 -0
- data/{test_support/spec → spec}/models/atrium/search/facet_spec.rb +2 -4
- data/{test_support/spec → spec}/models/atrium/showcase/facet_selection_spec.rb +5 -5
- data/spec/models/atrium/showcase/featured_selection_spec.rb +18 -0
- data/spec/models/atrium/showcase_spec.rb +97 -0
- data/spec/services/browse_level_evaluation_service_spec.rb +33 -0
- data/spec/services/current_filter_query_params_extraction_service_spec.rb +34 -0
- data/spec/services/navigation_tree_spec.rb +18 -0
- data/spec/services/params_adaptor_for_filter_spec.rb +8 -0
- data/spec/spec_helper.rb +39 -0
- data/spec/support/accept_nested_attributes_for.rb +39 -0
- data/{test_support/spec → spec}/support/be_accessible_matcher.rb +0 -0
- data/{test_support/spec → spec}/support/be_routed_mixin.rb +0 -0
- data/spec/support/controller_hacks.rb +35 -0
- data/spec/support/routes.rb +5 -0
- data/spec/support/shared_examples/is_showcased_mixin.rb +20 -0
- data/spec/support/shared_examples/query_param_mixin.rb +179 -0
- data/{app/assets/stylesheets/atrium → vendor/assets/images}/chosen-sprite.png +0 -0
- data/{app → vendor}/assets/javascripts/chosen.jquery.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor.warning.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/config.js.coffee +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/jquery.generateId.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/jquery.jeditable.ckeditor.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/linkItem/application_link.png +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/linkItem/dialogs/linkItem.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/linkItem/plugin.js +0 -0
- data/{app → vendor}/assets/javascripts/ckeditor/plugins/linkItem/ui_toolbar_pencil.png +0 -0
- data/vendor/assets/javascripts/jquery-ui-1.8.23.custom.min.js +41 -0
- data/vendor/assets/javascripts/jquery-ui-build.txt +8 -0
- data/{app → vendor}/assets/javascripts/jquery.jeditable.js +0 -0
- data/{app/assets/stylesheets/atrium → vendor/assets/stylesheets}/chosen.css +4 -4
- data/vendor/assets/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/vendor/assets/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/vendor/assets/stylesheets/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/vendor/assets/stylesheets/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/vendor/assets/stylesheets/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/vendor/assets/stylesheets/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/vendor/assets/stylesheets/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/vendor/assets/stylesheets/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/vendor/assets/stylesheets/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/vendor/assets/stylesheets/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/vendor/assets/stylesheets/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/vendor/assets/stylesheets/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/vendor/assets/stylesheets/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/vendor/assets/stylesheets/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/vendor/assets/stylesheets/ui-lightness/jquery-ui-1.8.23.custom.css +334 -0
- metadata +431 -949
- data/GETTING_STARTED.textile +0 -102
- data/app/assets/images/atrium/ajax-loader.gif +0 -0
- data/app/assets/images/atrium/lightbox-ico-loading.gif +0 -0
- data/app/assets/images/atrium/logo.png +0 -0
- data/app/assets/javascripts/jquery.colorbox.js +0 -864
- data/app/assets/stylesheets/colorbox.css +0 -42
- data/app/assets/stylesheets/controls.png +0 -0
- data/app/assets/stylesheets/loading.gif +0 -0
- data/app/controllers/atrium/base_controller.rb +0 -25
- data/app/controllers/atrium/collection_exhibit_order_controller.rb +0 -21
- data/app/controllers/atrium/customization_controller.rb +0 -41
- data/app/controllers/atrium/exhibit_facet_order_controller.rb +0 -19
- data/app/helpers/atrium/base_helper.rb +0 -6
- data/app/models/ability.rb +0 -14
- data/app/models/atrium/showcase/item.rb +0 -19
- data/app/models/role_mapper.rb +0 -23
- data/app/views/_user_util_links.html.erb +0 -25
- data/app/views/atrium/collections/_bookmark_control.html.erb +0 -25
- data/app/views/atrium/collections/_browse_index.html.erb +0 -20
- data/app/views/atrium/collections/_collection_items_index.html.erb +0 -10
- data/app/views/atrium/collections/_document.html.erb +0 -24
- data/app/views/atrium/collections/_document_list.html.erb +0 -6
- data/app/views/atrium/collections/_edit_navigation.html.erb +0 -20
- data/app/views/atrium/collections/_folder_control.html.erb +0 -12
- data/app/views/atrium/collections/_listing.html.erb +0 -18
- data/app/views/atrium/collections/_navigation.html.erb +0 -50
- data/app/views/atrium/collections/_results_pagination.html.erb +0 -9
- data/app/views/atrium/collections/_sort_and_per_page.html.erb +0 -23
- data/app/views/atrium/exhibits/_bookmark_control.html.erb +0 -25
- data/app/views/atrium/exhibits/_folder_control.html.erb +0 -12
- data/app/views/atrium/exhibits/_navigation.html.erb +0 -30
- data/app/views/atrium/showcases/_showcase_navigation.html.erb +0 -23
- data/app/views/catalog/_collection_home_text.html.erb +0 -6
- data/app/views/catalog/_constraints.html.erb +0 -9
- data/app/views/catalog/_default_collection_text.html.erb +0 -18
- data/app/views/catalog/_default_home_text.html.erb +0 -6
- data/app/views/catalog/_home_text.html.erb +0 -6
- data/app/views/catalog/_index_partials/_description.html.erb +0 -8
- data/app/views/catalog/_search_form.html.erb +0 -66
- data/app/views/catalog/_show_partials/_description.html.erb +0 -15
- data/app/views/catalog/browse_show.html.erb +0 -18
- data/app/views/catalog/index.html.erb +0 -41
- data/app/views/catalog/list_description.html.erb +0 -24
- data/app/views/catalog/list_item.html.erb +0 -3
- data/app/views/layouts/atrium_themes/default.html.erb +0 -4
- data/app/views/layouts/item_listing.html.erb +0 -36
- data/app/views/listing/_document.html.erb +0 -27
- data/app/views/listing/_document_list.html.erb +0 -3
- data/app/views/listing/_item_search.html.erb +0 -27
- data/app/views/shared/_banner.html.erb +0 -5
- data/app/views/shared/_collection_complete_list.html.erb +0 -33
- data/app/views/shared/_collection_search_form.html.erb +0 -12
- data/app/views/shared/_collection_title_header.html.erb +0 -3
- data/app/views/shared/_featured_sources.html.erb +0 -23
- data/app/views/shared/_list_descriptions.html.erb +0 -39
- data/app/views/shared/_navigation_browse_levels.html.erb +0 -34
- data/app/views/shared/_showcase_configure_menu.html.erb +0 -22
- data/app/views/shared/_top_navigation.html.erb +0 -9
- data/init.rb +0 -3
- data/lib/application_controller.rb +0 -24
- data/lib/atrium/application_helper.rb +0 -24
- data/lib/atrium/atrium_helper_behavior.rb +0 -159
- data/lib/atrium/catalog.rb +0 -203
- data/lib/atrium/collections_helper.rb +0 -172
- data/lib/atrium/controller.rb +0 -10
- data/lib/atrium/descriptions_helper.rb +0 -27
- data/lib/atrium/layout_helper.rb +0 -13
- data/lib/atrium/routes.rb +0 -100
- data/lib/atrium/solr_helper.rb +0 -440
- data/lib/generators/atrium/assets_generator.rb +0 -44
- data/lib/generators/atrium/atrium_generator.rb +0 -149
- data/lib/generators/atrium/cucumber_support_generator.rb +0 -29
- data/lib/generators/atrium/templates/config/role_map_cucumber.yml +0 -2
- data/lib/generators/atrium/templates/config/role_map_development.yml +0 -2
- data/lib/generators/atrium/templates/config/role_map_production.yml +0 -2
- data/lib/generators/atrium/templates/config/role_map_test.yml +0 -2
- data/lib/generators/atrium/templates/config/solr.yml +0 -10
- data/lib/generators/atrium/templates/db/seeds.rb +0 -87
- data/lib/generators/atrium/templates/migrations/create_atrium_showcase_items.rb +0 -17
- data/lib/generators/atrium/templates/themes/example.html.erb +0 -21
- data/lib/railties/all_tests.rake +0 -23
- data/lib/railties/atrium_cucumber.rake +0 -121
- data/lib/railties/index.rake +0 -37
- data/tasks/atrium.rake +0 -268
- data/tasks/atrium_rspec.rake +0 -91
- data/test_support/etc/Gemfile +0 -33
- data/test_support/etc/bundle_config +0 -3
- data/test_support/etc/rvmrc +0 -32
- data/test_support/features/atrium_collections.feature +0 -162
- data/test_support/features/atrium_exhibits.feature +0 -164
- data/test_support/features/step_definitions/atrium_collection_steps.rb +0 -102
- data/test_support/features/step_definitions/atrium_exhibit_steps.rb +0 -53
- data/test_support/features/step_definitions/bookmarks_steps.rb +0 -6
- data/test_support/features/step_definitions/error_steps.rb +0 -5
- data/test_support/features/step_definitions/folder_steps.rb +0 -27
- data/test_support/features/step_definitions/general_steps.rb +0 -50
- data/test_support/features/step_definitions/record_view_steps.rb +0 -12
- data/test_support/features/step_definitions/saved_searches_steps.rb +0 -22
- data/test_support/features/step_definitions/search_facets_steps.rb +0 -29
- data/test_support/features/step_definitions/search_history_steps.rb +0 -9
- data/test_support/features/step_definitions/search_result_steps.rb +0 -114
- data/test_support/features/step_definitions/search_steps.rb +0 -103
- data/test_support/features/step_definitions/user_steps.rb +0 -5
- data/test_support/features/step_definitions/web_steps.rb +0 -213
- data/test_support/features/support/env.rb +0 -67
- data/test_support/features/support/paths.rb +0 -76
- data/test_support/features/support/selectors.rb +0 -40
- data/test_support/fixtures/atrium_exhibits.yml +0 -3
- data/test_support/spec/controllers/atrium/base_controller_spec.rb +0 -13
- data/test_support/spec/controllers/atrium/collection_exhibit_order_controller_spec.rb +0 -29
- data/test_support/spec/controllers/atrium/collections_controller_spec.rb +0 -185
- data/test_support/spec/controllers/atrium/customization_controller_spec.rb +0 -38
- data/test_support/spec/controllers/atrium/descriptions_controller_spec.rb +0 -150
- data/test_support/spec/controllers/atrium/exhibit_facet_order_controller_spec.rb +0 -36
- data/test_support/spec/controllers/atrium/exhibits_controller_spec.rb +0 -192
- data/test_support/spec/controllers/atrium/showcases_controller_spec.rb +0 -219
- data/test_support/spec/helpers/atrium_collections_helper_spec.rb +0 -147
- data/test_support/spec/helpers/atrium_description_helper_spec.rb +0 -47
- data/test_support/spec/helpers/atrium_solr_helper_spec.rb +0 -522
- data/test_support/spec/models/atrium/browse_level_spec.rb +0 -31
- data/test_support/spec/models/atrium/collection_spec.rb +0 -30
- data/test_support/spec/models/atrium/description_spec.rb +0 -67
- data/test_support/spec/models/atrium/essay_spec.rb +0 -12
- data/test_support/spec/models/atrium/exhibit_spec.rb +0 -76
- data/test_support/spec/models/atrium/search/facet_selection_spec.rb +0 -24
- data/test_support/spec/models/atrium/search_facet_spec.rb +0 -54
- data/test_support/spec/models/atrium/showcase/item_spec.rb +0 -12
- data/test_support/spec/models/atrium/showcase_facet_selection_spec.rb +0 -65
- data/test_support/spec/models/atrium/showcase_spec.rb +0 -134
- data/test_support/spec/rcov.opts +0 -3
- data/test_support/spec/routing/atrium/collections_routing_spec.rb +0 -33
- data/test_support/spec/spec.opts +0 -4
- data/test_support/spec/spec_helper.rb +0 -47
- data/test_support/tmp/step_definitions/catalog_index_steps.rb +0 -14
- data/test_support/tmp/step_definitions/edit_document_steps.rb +0 -67
- data/test_support/tmp/step_definitions/hydra_metadata_steps.rb +0 -3
- data/test_support/tmp/step_definitions/hydra_steps.rb +0 -8
- data/test_support/tmp/step_definitions/search_steps.rb +0 -86
- data/test_support/tmp/step_definitions/searching_steps.rb +0 -22
- data/test_support/tmp/step_definitions/select_steps.rb +0 -8
- data/test_support/tmp/step_definitions/show_document_steps.rb +0 -73
- data/test_support/tmp/step_definitions/user_steps.rb +0 -15
- data/test_support/tmp/step_definitions/web_steps.rb +0 -273
- data/test_support/tmp/support/env.rb +0 -54
- data/test_support/tmp/support/paths.rb +0 -57
@@ -0,0 +1,12 @@
|
|
1
|
+
module Atrium
|
2
|
+
class ApplicationController < ActionController::Base
|
3
|
+
include Atrium::ApplicationHelper
|
4
|
+
include Atrium::CollectionsHelper
|
5
|
+
include Atrium::ShowcasesHelper
|
6
|
+
|
7
|
+
def atrium_config
|
8
|
+
Atrium.config
|
9
|
+
end
|
10
|
+
helper_method :atrium_config
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require_dependency "atrium/application_controller"
|
2
|
+
|
3
|
+
module Atrium
|
4
|
+
class BrowseLevelsController < ApplicationController
|
5
|
+
def new
|
6
|
+
|
7
|
+
end
|
8
|
+
|
9
|
+
def create
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
def index
|
14
|
+
end
|
15
|
+
|
16
|
+
def edit
|
17
|
+
end
|
18
|
+
|
19
|
+
def show
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -1,155 +1,59 @@
|
|
1
|
-
|
1
|
+
require_dependency "atrium/application_controller"
|
2
2
|
|
3
|
-
|
3
|
+
module Atrium
|
4
|
+
class CollectionsController < ApplicationController
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
def create
|
10
|
-
@atrium_collection = Atrium::Collection.new
|
11
|
-
@atrium_collection.save
|
12
|
-
redirect_to :action => "edit", :id=>@atrium_collection.id
|
13
|
-
end
|
14
|
-
|
15
|
-
#def update_embedded_search
|
16
|
-
# render :partial => "shared/featured_search", :locals=>{:content=>params[:content_type]}
|
17
|
-
#end
|
18
|
-
|
19
|
-
def home_page_text_config
|
20
|
-
@atrium_collection= Atrium::Collection.find(params[:id])
|
21
|
-
end
|
22
|
-
|
23
|
-
def set_collection_scope
|
24
|
-
session[:copy_folder_document_ids] = session[:folder_document_ids]
|
25
|
-
session[:folder_document_ids] = []
|
26
|
-
@atrium_collection = Atrium::Collection.find(params[:id])
|
27
|
-
session[:folder_document_ids] = @atrium_collection.filter_query_params[:solr_doc_ids].split(',') if @atrium_collection.filter_query_params && @atrium_collection.filter_query_params[:solr_doc_ids]
|
28
|
-
p = params.dup
|
29
|
-
p.delete :action
|
30
|
-
p.delete :id
|
31
|
-
p.delete :controller
|
32
|
-
#make sure to pass in a search_fields parameter so that it shows search results immediately
|
33
|
-
redirect_to catalog_index_path(p)
|
34
|
-
end
|
35
|
-
|
36
|
-
def unset_collection_scope
|
37
|
-
@atrium_exhibit= Atrium::Exhibit.new
|
38
|
-
@atrium_collection = Atrium::Collection.find(params[:id])
|
39
|
-
@atrium_collection.update_attributes(:filter_query_params=>nil)
|
40
|
-
flash[:notice] = 'Collection scope removed successfully'
|
41
|
-
render :action => "edit"
|
42
|
-
end
|
43
|
-
|
44
|
-
def show
|
45
|
-
@exhibit_navigation_data = get_exhibit_navigation_data
|
6
|
+
def index
|
7
|
+
@collections = Collection.all
|
8
|
+
end
|
46
9
|
|
47
|
-
|
48
|
-
@collection = Atrium::Collection.
|
49
|
-
@atrium_showcase= Atrium::Showcase.with_selected_facets(@collection.id,@collection.class.name, params[:f]).first
|
50
|
-
elsif(params[:id])
|
51
|
-
@atrium_collection= Atrium::Collection.find(params[:id])
|
52
|
-
@atrium_showcase= Atrium::Showcase.with_selected_facets(@atrium_collection.id,@atrium_collection.class.name, params[:f]).first
|
10
|
+
def new
|
11
|
+
@collection = Atrium::Collection.new(params[:collection])
|
53
12
|
end
|
54
|
-
|
55
|
-
|
56
|
-
@
|
13
|
+
|
14
|
+
def create
|
15
|
+
@collection = Atrium::Collection.new(params[:collection])
|
16
|
+
if @collection.save
|
17
|
+
flash[:notice] = "Collection created successfully"
|
18
|
+
redirect_to edit_collection_path(@collection)
|
19
|
+
else
|
20
|
+
flash.now.alert = "Collection not created successfully"
|
21
|
+
render action: "new"
|
22
|
+
end
|
57
23
|
end
|
58
|
-
@featured_response, @featured_documents=get_solr_documents_from_asset(@atrium_showcase) unless @atrium_showcase.nil?
|
59
|
-
@description_hash=get_description_for_showcase(@atrium_showcase) unless @atrium_showcase.nil?
|
60
|
-
end
|
61
24
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
@atrium_exhibit= Atrium::Exhibit.new
|
66
|
-
end
|
25
|
+
def edit
|
26
|
+
collection
|
27
|
+
end
|
67
28
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
29
|
+
def show
|
30
|
+
@exhibits = collection.exhibits
|
31
|
+
respond_to do |format|
|
32
|
+
format.html
|
33
|
+
format.atom { render layout: false }
|
34
|
+
end
|
74
35
|
end
|
75
|
-
|
76
|
-
|
77
|
-
|
36
|
+
|
37
|
+
def update
|
38
|
+
if collection.update_attributes(params[:collection])
|
78
39
|
flash[:notice] = 'Collection was successfully updated.'
|
79
|
-
format.html { render :action => "edit" }
|
80
40
|
else
|
81
|
-
|
41
|
+
flash.now.alert = "Collection Not updated"
|
82
42
|
end
|
43
|
+
render action: "edit"
|
83
44
|
end
|
84
|
-
end
|
85
|
-
|
86
|
-
def destroy
|
87
|
-
@atrium_exhibit= Atrium::Exhibit.new
|
88
|
-
@atrium_collection = Atrium::Collection.find(params[:id])
|
89
|
-
@atrium_collection.destroy
|
90
|
-
flash[:notice] = 'Collection deleted.'
|
91
|
-
redirect_to catalog_index_path
|
92
|
-
end
|
93
|
-
=begin
|
94
|
-
# Just return nil for collection facet limit because we want to display all values for browse links
|
95
|
-
def facet_limit_for(facet_field)
|
96
|
-
return nil
|
97
|
-
end
|
98
|
-
helper_method :facet_limit_for
|
99
|
-
|
100
|
-
# Returns complete hash of key=facet_field, value=limit.
|
101
|
-
# Used by SolrHelper#solr_search_params to add limits to solr
|
102
|
-
# request for all configured facet limits.
|
103
|
-
def facet_limit_hash
|
104
|
-
Blacklight.config[:facet][:limits]
|
105
|
-
end
|
106
|
-
helper_method :facet_limit_hash
|
107
|
-
=end
|
108
|
-
end
|
109
|
-
|
110
|
-
|
111
|
-
def initialize_collection
|
112
|
-
if collection_id = determine_collection_id
|
113
|
-
return __initialize_collection( collection_id )
|
114
|
-
else
|
115
|
-
return false
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
|
-
#protected :initialize_collection
|
120
|
-
|
121
|
-
private
|
122
|
-
|
123
|
-
def determine_collection_id
|
124
|
-
if params.has_key? :collection_id
|
125
|
-
return params[:collection_id]
|
126
|
-
elsif params.has_key? :id
|
127
|
-
return params[:id]
|
128
|
-
elsif params.has_key? :collection_number
|
129
|
-
return params[:collection_number]
|
130
|
-
end
|
131
|
-
end
|
132
45
|
|
133
|
-
def
|
134
|
-
|
135
|
-
|
46
|
+
def destroy
|
47
|
+
collection.destroy
|
48
|
+
flash[:notice] = 'Collection '+ @collection.pretty_title+' was deleted successfully.'
|
49
|
+
redirect_to collections_path
|
50
|
+
end
|
136
51
|
|
137
|
-
def
|
138
|
-
|
139
|
-
params[:atrium_collection][:browse_levels_attributes].each_pair do |index,values|
|
140
|
-
if values[:solr_facet_name] && !values[:label]
|
141
|
-
#reset label if facet changing and other label not supplied
|
142
|
-
new_label = facet_field_labels[values[:solr_facet_name]]
|
143
|
-
unless new_label.nil? || new_label.empty?
|
144
|
-
atrium_collection.browse_levels.each_with_index do |browse_level,index|
|
145
|
-
if browse_level.solr_facet_name == values[:solr_facet_name]
|
146
|
-
atrium_collection.browse_levels[index].label = new_label
|
147
|
-
atrium_collection.save!
|
148
|
-
break
|
149
|
-
end
|
150
|
-
end
|
151
|
-
end
|
152
|
-
end
|
52
|
+
def collection
|
53
|
+
@collection ||= Atrium::Collection.find(params[:id])
|
153
54
|
end
|
55
|
+
protected :collection
|
56
|
+
helper_method :collection
|
57
|
+
|
154
58
|
end
|
155
59
|
end
|
@@ -1,177 +1,58 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
before_filter :initialize_collection, :get_exhibit_navigation_data
|
1
|
+
require_dependency "atrium/application_controller"
|
4
2
|
|
3
|
+
module Atrium
|
4
|
+
class DescriptionsController < ApplicationController
|
5
5
|
def index
|
6
|
-
|
7
|
-
@atrium_descriptions = atrium_showcase.descriptions
|
8
|
-
@description_hash=get_description_for_showcase(atrium_showcase)
|
9
|
-
if params[:no_layout]
|
10
|
-
render :layout=>false
|
11
|
-
end
|
6
|
+
@descriptions = showcase.descriptions
|
12
7
|
end
|
13
8
|
|
14
9
|
def new
|
15
|
-
@
|
16
|
-
@
|
17
|
-
@
|
10
|
+
@description = showcase.descriptions.build(params[:description])
|
11
|
+
@description.build_essay(content_type:"essay")
|
12
|
+
@description.build_summary(content_type:"summary")
|
18
13
|
end
|
19
14
|
|
20
15
|
def create
|
21
|
-
@
|
22
|
-
@
|
23
|
-
if @atrium_description.update_attributes(params[:atrium_description])
|
16
|
+
@description = showcase.descriptions.build(params[:description])
|
17
|
+
if @description.save
|
24
18
|
flash[:notice] = 'Description was successfully created.'
|
25
|
-
redirect_to
|
19
|
+
redirect_to edit_showcase_description_path(showcase, @description)
|
26
20
|
else
|
27
|
-
render :
|
21
|
+
render action: "new"
|
28
22
|
end
|
29
23
|
end
|
30
24
|
|
31
25
|
def edit
|
32
|
-
|
33
|
-
|
34
|
-
#puts "Desc: #{@atrium_description.inspect}, essay = #{@atrium_description.essay.inspect},summary = #{@atrium_description.summary.inspect}"
|
35
|
-
@atrium_description.build_essay(:content_type=>"essay") unless @atrium_description.essay
|
36
|
-
@atrium_description.build_summary(:content_type=>"summary") unless @atrium_description.summary
|
26
|
+
description.build_essay(content_type:"essay") unless description.essay
|
27
|
+
description.build_summary(content_type:"summary") unless description.summary
|
37
28
|
end
|
38
29
|
|
39
30
|
def update
|
40
|
-
|
41
|
-
|
42
|
-
if((params[:atrium_description]) && @atrium_description.update_attributes(params[:atrium_description]))
|
43
|
-
|
44
|
-
|
31
|
+
if description.update_attributes(params[:description])
|
45
32
|
flash[:notice] = 'Description was successfully updated.'
|
46
|
-
|
47
|
-
#if @atrium_description.essay.update_attributes(params[:essay_attributes])
|
48
|
-
#refresh_browse_level_label(@atrium_collection)
|
49
|
-
|
50
|
-
|
51
|
-
flash[:notice] = 'Description was successfully updated.'
|
52
|
-
#end
|
33
|
+
redirect_to edit_showcase_description_path(showcase, @description)
|
53
34
|
else
|
54
|
-
|
55
|
-
|
56
|
-
#refresh_browse_level_label(@atrium_collection)
|
57
|
-
flash[:notice] = 'Exhibit was successfully updated.'
|
58
|
-
end
|
59
|
-
end
|
60
|
-
redirect_to :action => "edit", :id=>@atrium_description.id
|
61
|
-
end
|
62
|
-
|
63
|
-
def show
|
64
|
-
@atrium_description = Atrium::Description.find(params[:id])
|
65
|
-
@description_hash={}
|
66
|
-
unless @atrium_description.description_solr_id.nil?
|
67
|
-
p = params.dup
|
68
|
-
params.delete :f
|
69
|
-
params.delete :q
|
70
|
-
desc_response, desc_documents = get_solr_response_for_field_values("id",@atrium_description.description_solr_id)
|
71
|
-
desc_documents.each do |doc|
|
72
|
-
@description_hash[doc["id"]]= doc["description_content_s"].blank? ? "" : doc["description_content_s"].first
|
73
|
-
end
|
74
|
-
params.merge!(:f=>p[:f])
|
75
|
-
params.merge!(:q=>p[:q])
|
35
|
+
flash.now.alert = 'Description update failed'
|
36
|
+
render action: "edit"
|
76
37
|
end
|
77
38
|
end
|
78
39
|
|
79
|
-
def save_ids_to_descriptions
|
80
|
-
unless session[:folder_document_ids].empty?
|
81
|
-
description_hash={}
|
82
|
-
desc_response, desc_documents = get_solr_response_for_field_values("id",session[:folder_document_ids])
|
83
|
-
desc_documents.each do |doc|
|
84
|
-
desc_hash={}
|
85
|
-
desc_hash["page_display"]= doc["page_display_s"].blank? ? "" : doc["page_display_s"].first
|
86
|
-
desc_hash["title"]= doc["title_s"].blank? ? "" : doc["title_s"].first
|
87
|
-
description_hash[doc["id"]]=desc_hash
|
88
|
-
end
|
89
|
-
session[:folder_document_ids].each do |solr_id|
|
90
|
-
doc = description_hash[solr_id]
|
91
|
-
@atrium_description = Atrium::Description.new(:atrium_showcase_id=>params[:showcase_id], :description_solr_id=>solr_id, :page_display=>doc["page_display"], :title=>doc["title"])
|
92
|
-
@atrium_description.save!
|
93
|
-
end
|
94
|
-
|
95
|
-
session_folder_ids=[] || session[:copy_folder_document_ids]
|
96
|
-
session[:folder_document_ids] = session_folder_ids
|
97
|
-
session[:copy_folder_document_ids]=nil
|
98
|
-
|
99
|
-
end
|
100
|
-
redirect_to :action => "index", :showcase_id=>params[:showcase_id], :no_layout=>true
|
101
|
-
end
|
102
|
-
|
103
40
|
def destroy
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
text = 'Description '+params[:id] +' was deleted successfully.'
|
108
|
-
render :text => text
|
41
|
+
description.destroy
|
42
|
+
flash[:notice] = 'Description '+@description.pretty_title + ' was deleted successfully.'
|
43
|
+
redirect_to edit_showcase_path(@showcase)
|
109
44
|
end
|
110
45
|
|
111
|
-
|
112
|
-
session[:copy_folder_document_ids] = session[:folder_document_ids]
|
113
|
-
session[:folder_document_ids] = []
|
114
|
-
@atrium_showcase=Atrium::Showcase.find(params[:showcase_id])
|
115
|
-
parent = @atrium_showcase.parent if @atrium_showcase.parent
|
116
|
-
if parent.is_a?(Atrium::Collection)
|
117
|
-
collection_id = parent.id
|
118
|
-
elsif parent.is_a?(Atrium::Exhibit)
|
119
|
-
exhibit_id = parent.id
|
120
|
-
collection = parent.collection
|
121
|
-
collection_id = collection.id if collection
|
122
|
-
else
|
123
|
-
logger.error("Atrium showcase parent is invalid. Please check the parent")
|
124
|
-
collection_id = params[:collection_id]
|
125
|
-
exhibit_id = params[:exhibit_id]
|
126
|
-
end
|
127
|
-
solr_desc_arr=[]
|
128
|
-
@atrium_showcase.descriptions.each do |desc|
|
129
|
-
solr_desc_arr<<desc.description_solr_id
|
130
|
-
end
|
131
|
-
session[:folder_document_ids] = solr_desc_arr.uniq
|
132
|
-
#make sure to pass in a search_fields parameter so that it shows search results immediately
|
133
|
-
redirect_to catalog_index_path(:add_description=>true,:collection_id=>collection_id,:exhibit_id=>exhibit_id,:search_field=>"all_fields",:f=>{"active_fedora_model_s"=>["Description"]})
|
134
|
-
end
|
46
|
+
private
|
135
47
|
|
136
|
-
def
|
137
|
-
|
138
|
-
return __initialize_collection( collection_id )
|
139
|
-
else
|
140
|
-
return false
|
141
|
-
end
|
48
|
+
def showcase
|
49
|
+
@showcase ||= Atrium::Showcase.find(params[:showcase_id])
|
142
50
|
end
|
51
|
+
helper_method :showcase
|
143
52
|
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
def determine_collection_id
|
148
|
-
if params[:id]
|
149
|
-
begin
|
150
|
-
@description = Atrium::Description.find(params[:id])
|
151
|
-
if @description
|
152
|
-
@showcase= Atrium::Showcase.find(@description.atrium_showcase_id)
|
153
|
-
end
|
154
|
-
rescue
|
155
|
-
raise "unable to find description or showcase from id"
|
156
|
-
end
|
157
|
-
elsif(params[:showcase_id])
|
158
|
-
@showcase= Atrium::Showcase.find(params[:showcase_id])
|
53
|
+
def description
|
54
|
+
@description ||= showcase.descriptions.find(params[:id])
|
159
55
|
end
|
160
|
-
|
161
|
-
if @showcase && @showcase.parent
|
162
|
-
if @showcase.parent.is_a?(Atrium::Collection)
|
163
|
-
@atrium_collection = @showcase.parent
|
164
|
-
collection_id = @atrium_collection.id
|
165
|
-
elsif @showcase.parent.is_a?(Atrium::Exhibit)
|
166
|
-
@exhibit = @showcase.parent
|
167
|
-
@atrium_collection = @exhibit.collection
|
168
|
-
collection_id = @atrium_collection.id
|
169
|
-
else
|
170
|
-
collection_id = params[:collection_id]
|
171
|
-
end
|
56
|
+
helper_method :description
|
172
57
|
end
|
173
|
-
return collection_id
|
174
|
-
end
|
175
|
-
|
176
|
-
|
177
58
|
end
|
@@ -1,96 +1,70 @@
|
|
1
|
-
|
1
|
+
require_dependency "atrium/application_controller"
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
format.html
|
3
|
+
module Atrium
|
4
|
+
class ExhibitsController < ApplicationController
|
5
|
+
before_filter :find_exhibit, only: [:edit, :update, :destroy, :show]
|
6
|
+
def new
|
7
|
+
@exhibit = collection.exhibits.build(params[:exhibit])
|
9
8
|
end
|
10
|
-
end
|
11
9
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
10
|
+
def create
|
11
|
+
@exhibit = collection.exhibits.build(params[:exhibit])
|
12
|
+
if @exhibit.save!
|
13
|
+
flash[:notice] = 'Exhibit was successfully created.'
|
14
|
+
redirect_to edit_collection_exhibit_path(id:@exhibit.id, collection_id:@collection)
|
15
|
+
else
|
16
|
+
render action: "new"
|
17
|
+
end
|
17
18
|
end
|
18
|
-
end
|
19
19
|
|
20
|
-
|
21
|
-
@exhibit = Atrium::Exhibit.find(params[:id])
|
22
|
-
@atrium_collection = @exhibit.collection
|
23
|
-
@exhibit_navigation_data = get_exhibit_navigation_data
|
24
|
-
end
|
20
|
+
def edit
|
25
21
|
|
26
|
-
def update
|
27
|
-
@exhibit = Atrium::Exhibit.find(params[:id])
|
28
|
-
if @exhibit.update_attributes(params[:atrium_exhibit])
|
29
|
-
flash[:notice] = 'Exhibit was successfully updated.'
|
30
22
|
end
|
31
|
-
redirect_to :action => "edit"
|
32
|
-
end
|
33
23
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
@collection_items_response, @collection_items_documents=get_solr_documents_from_asset(@exhibit)
|
40
|
-
@atrium_showcase=Atrium::Showcase.with_selected_facets(@exhibit.id, @exhibit.class.name, params[:f]).first
|
41
|
-
@featured_response, @featured_documents=get_solr_documents_from_asset(@atrium_showcase) unless @atrium_showcase.nil?
|
42
|
-
@description_hash=get_description_for_showcase(@atrium_showcase) unless @atrium_showcase.nil?
|
43
|
-
if params[:no_layout]
|
44
|
-
render :layout=>false
|
24
|
+
def update
|
25
|
+
if @exhibit.update_attributes(params[:exhibit])
|
26
|
+
flash[:notice] = 'Exhibit was successfully updated.'
|
27
|
+
end
|
28
|
+
render action: "edit"
|
45
29
|
end
|
46
|
-
end
|
47
30
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
session[:folder_document_ids] = []
|
52
|
-
@exhibit = Atrium::Exhibit.find(params[:id])
|
31
|
+
def show
|
32
|
+
@showcases = @exhibit.showcases
|
33
|
+
end
|
53
34
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
#make sure to pass in a search_fields parameter so that it shows search results immediately
|
60
|
-
redirect_to catalog_index_path(p)
|
61
|
-
end
|
35
|
+
def destroy
|
36
|
+
@exhibit.destroy
|
37
|
+
flash[:notice] = 'Exhibit '+params[:id] +' was deleted successfully.'
|
38
|
+
redirect_to edit_collection_path(@collection)
|
39
|
+
end
|
62
40
|
|
63
|
-
def unset_exhibit_scope
|
64
|
-
@exhibit = Atrium::Exhibit.find(params[:id])
|
65
|
-
@exhibit.update_attributes(:filter_query_params=>nil)
|
66
|
-
flash[:notice] = 'Exhibit scope removed successfully'
|
67
|
-
render :action => "edit"
|
68
|
-
end
|
69
41
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
flash[:notice] = 'Exhibit '+params[:id] +' was deleted successfully.'
|
74
|
-
redirect_to edit_atrium_collection_path(@exhibit.atrium_collection_id)
|
75
|
-
end
|
42
|
+
def find_exhibit
|
43
|
+
@exhibit = collection.exhibits.find(params[:id])
|
44
|
+
end
|
76
45
|
|
77
|
-
|
78
|
-
|
79
|
-
return __initialize_collection( collection_id )
|
80
|
-
else
|
81
|
-
return false
|
82
|
-
end
|
83
|
-
end
|
46
|
+
def collection
|
47
|
+
@collection ||= find_collection
|
84
48
|
|
85
49
|
|
86
|
-
|
50
|
+
end
|
87
51
|
|
88
|
-
def
|
89
|
-
|
90
|
-
|
91
|
-
|
52
|
+
def find_collection
|
53
|
+
begin
|
54
|
+
logger.debug("Finding collection")
|
55
|
+
if params[:collection_id]
|
56
|
+
@collection = Atrium::Collection.find(params[:collection_id])
|
57
|
+
elsif params[:id]
|
58
|
+
@exhibit = Atrium::Exhibit.find(params[:id])
|
59
|
+
@collection = @exhibit.collection
|
60
|
+
else
|
61
|
+
raise "Could not find collection_id"
|
62
|
+
end
|
63
|
+
rescue ActiveRecord::RecordNotFound
|
64
|
+
flash.alert = t("Atrium.collection.or.exhibit.not_found")
|
65
|
+
redirect_to redirect_target and return
|
66
|
+
end
|
67
|
+
@collection
|
68
|
+
end
|
92
69
|
end
|
93
|
-
return collection_id
|
94
|
-
end
|
95
|
-
|
96
70
|
end
|