enju_biblio 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +46 -0
- data/app/controllers/carrier_types_controller.rb +13 -0
- data/app/controllers/content_types_controller.rb +17 -0
- data/app/controllers/countries_controller.rb +17 -0
- data/app/controllers/create_types_controller.rb +13 -0
- data/app/controllers/creates_controller.rb +118 -0
- data/app/controllers/donates_controller.rb +79 -0
- data/app/controllers/exemplifies_controller.rb +103 -0
- data/app/controllers/extents_controller.rb +17 -0
- data/app/controllers/form_of_works_controller.rb +13 -0
- data/app/controllers/frequencies_controller.rb +13 -0
- data/app/controllers/import_requests_controller.rb +92 -0
- data/app/controllers/items_controller.rb +245 -0
- data/app/controllers/languages_controller.rb +17 -0
- data/app/controllers/licenses_controller.rb +17 -0
- data/app/controllers/manifestation_relationship_types_controller.rb +13 -0
- data/app/controllers/manifestation_relationships_controller.rb +23 -0
- data/app/controllers/manifestations_controller.rb +727 -0
- data/app/controllers/medium_of_performances_controller.rb +17 -0
- data/app/controllers/owns_controller.rb +108 -0
- data/app/controllers/patron_import_files_controller.rb +93 -0
- data/app/controllers/patron_import_results_controller.rb +15 -0
- data/app/controllers/patron_relationship_types_controller.rb +13 -0
- data/app/controllers/patron_relationships_controller.rb +23 -0
- data/app/controllers/patron_types_controller.rb +17 -0
- data/app/controllers/patrons_controller.rb +211 -0
- data/app/controllers/picture_files_controller.rb +169 -0
- data/app/controllers/produce_types_controller.rb +13 -0
- data/app/controllers/produces_controller.rb +122 -0
- data/app/controllers/realize_types_controller.rb +13 -0
- data/app/controllers/realizes_controller.rb +118 -0
- data/app/controllers/resource_import_files_controller.rb +93 -0
- data/app/controllers/resource_import_results_controller.rb +19 -0
- data/app/controllers/series_has_manifestations_controller.rb +95 -0
- data/app/controllers/series_statements_controller.rb +125 -0
- data/app/helpers/manifestations_helper.rb +160 -0
- data/app/helpers/owns_helper.rb +3 -0
- data/app/helpers/patrons_helper.rb +16 -0
- data/app/helpers/picture_files_helper.rb +15 -0
- data/app/helpers/series_statements_helper.rb +3 -0
- data/app/models/carrier_type.rb +34 -0
- data/app/models/content_type.rb +20 -0
- data/app/models/country.rb +45 -0
- data/app/models/create.rb +38 -0
- data/app/models/create_type.rb +19 -0
- data/app/models/donate.rb +23 -0
- data/app/models/exemplify.rb +46 -0
- data/app/models/extent.rb +20 -0
- data/app/models/form_of_work.rb +20 -0
- data/app/models/frequency.rb +20 -0
- data/app/models/import_request.rb +72 -0
- data/app/models/item.rb +277 -0
- data/app/models/item_sweeper.rb +19 -0
- data/app/models/language.rb +48 -0
- data/app/models/license.rb +19 -0
- data/app/models/manifestation.rb +642 -0
- data/app/models/manifestation_relationship.rb +30 -0
- data/app/models/manifestation_relationship_type.rb +20 -0
- data/app/models/manifestation_sweeper.rb +24 -0
- data/app/models/medium_of_performance.rb +20 -0
- data/app/models/own.rb +36 -0
- data/app/models/page_sweeper.rb +40 -0
- data/app/models/patron.rb +308 -0
- data/app/models/patron_import_file.rb +285 -0
- data/app/models/patron_import_result.rb +26 -0
- data/app/models/patron_relationship.rb +27 -0
- data/app/models/patron_relationship_type.rb +20 -0
- data/app/models/patron_sweeper.rb +30 -0
- data/app/models/patron_type.rb +20 -0
- data/app/models/picture_file.rb +48 -0
- data/app/models/produce.rb +39 -0
- data/app/models/produce_type.rb +19 -0
- data/app/models/realize.rb +38 -0
- data/app/models/realize_type.rb +19 -0
- data/app/models/resource_import_file.rb +585 -0
- data/app/models/resource_import_result.rb +26 -0
- data/app/models/series_has_manifestation.rb +38 -0
- data/app/models/series_statement.rb +105 -0
- data/app/views/carrier_types/_form.html.erb +19 -0
- data/app/views/carrier_types/edit.html.erb +13 -0
- data/app/views/carrier_types/index.html.erb +45 -0
- data/app/views/carrier_types/new.html.erb +12 -0
- data/app/views/carrier_types/show.html.erb +24 -0
- data/app/views/content_types/_form.html.erb +22 -0
- data/app/views/content_types/edit.html.erb +13 -0
- data/app/views/content_types/index.html.erb +45 -0
- data/app/views/content_types/new.html.erb +12 -0
- data/app/views/content_types/show.html.erb +24 -0
- data/app/views/countries/_form.html.erb +22 -0
- data/app/views/countries/edit.html.erb +13 -0
- data/app/views/countries/index.html.erb +43 -0
- data/app/views/countries/new.html.erb +12 -0
- data/app/views/countries/show.html.erb +24 -0
- data/app/views/create_types/_form.html.erb +19 -0
- data/app/views/create_types/edit.html.erb +13 -0
- data/app/views/create_types/index.html.erb +43 -0
- data/app/views/create_types/new.html.erb +12 -0
- data/app/views/create_types/show.html.erb +29 -0
- data/app/views/creates/_form.html.erb +32 -0
- data/app/views/creates/_index.html.erb +36 -0
- data/app/views/creates/_index_patron.html.erb +48 -0
- data/app/views/creates/_index_work.html.erb +48 -0
- data/app/views/creates/edit.html.erb +13 -0
- data/app/views/creates/index.html.erb +7 -0
- data/app/views/creates/new.html.erb +17 -0
- data/app/views/creates/show.html.erb +24 -0
- data/app/views/donates/edit.html.erb +30 -0
- data/app/views/donates/index.html.erb +45 -0
- data/app/views/donates/new.html.erb +29 -0
- data/app/views/donates/show.html.erb +25 -0
- data/app/views/exemplifies/_form.html.erb +27 -0
- data/app/views/exemplifies/edit.html.erb +13 -0
- data/app/views/exemplifies/index.html.erb +38 -0
- data/app/views/exemplifies/new.html.erb +12 -0
- data/app/views/exemplifies/show.html.erb +24 -0
- data/app/views/extents/_form.html.erb +19 -0
- data/app/views/extents/edit.html.erb +13 -0
- data/app/views/extents/index.html.erb +47 -0
- data/app/views/extents/new.html.erb +12 -0
- data/app/views/extents/show.html.erb +29 -0
- data/app/views/form_of_works/_form.html.erb +19 -0
- data/app/views/form_of_works/edit.html.erb +13 -0
- data/app/views/form_of_works/index.html.erb +45 -0
- data/app/views/form_of_works/new.html.erb +12 -0
- data/app/views/form_of_works/show.html.erb +29 -0
- data/app/views/frequencies/_form.html.erb +19 -0
- data/app/views/frequencies/edit.html.erb +13 -0
- data/app/views/frequencies/index.html.erb +43 -0
- data/app/views/frequencies/new.html.erb +12 -0
- data/app/views/frequencies/show.html.erb +24 -0
- data/app/views/import_requests/_form.html.erb +32 -0
- data/app/views/import_requests/edit.html.erb +24 -0
- data/app/views/import_requests/index.html.erb +41 -0
- data/app/views/import_requests/new.html.erb +27 -0
- data/app/views/import_requests/show.html.erb +43 -0
- data/app/views/items/_form.html.erb +86 -0
- data/app/views/items/_observe_field.html.erb +7 -0
- data/app/views/items/_qtip.html.erb +25 -0
- data/app/views/items/_shelf_picture.html.erb +8 -0
- data/app/views/items/_shelf_picture.mobile.erb +8 -0
- data/app/views/items/edit.html.erb +18 -0
- data/app/views/items/index.csv.erb +4 -0
- data/app/views/items/index.html.erb +74 -0
- data/app/views/items/index.mobile.erb +53 -0
- data/app/views/items/new.html.erb +21 -0
- data/app/views/items/show.html.erb +160 -0
- data/app/views/items/show.mobile.erb +88 -0
- data/app/views/languages/_form.html.erb +27 -0
- data/app/views/languages/edit.html.erb +13 -0
- data/app/views/languages/index.html.erb +49 -0
- data/app/views/languages/new.html.erb +12 -0
- data/app/views/languages/show.html.erb +34 -0
- data/app/views/licenses/_form.html.erb +19 -0
- data/app/views/licenses/edit.html.erb +13 -0
- data/app/views/licenses/index.html.erb +46 -0
- data/app/views/licenses/new.html.erb +12 -0
- data/app/views/licenses/show.html.erb +29 -0
- data/app/views/manifestation_relationship_types/_form.html.erb +19 -0
- data/app/views/manifestation_relationship_types/edit.html.erb +13 -0
- data/app/views/manifestation_relationship_types/index.html.erb +43 -0
- data/app/views/manifestation_relationship_types/new.html.erb +12 -0
- data/app/views/manifestation_relationship_types/show.html.erb +29 -0
- data/app/views/manifestation_relationships/_form.html.erb +31 -0
- data/app/views/manifestation_relationships/edit.html.erb +13 -0
- data/app/views/manifestation_relationships/index.html.erb +34 -0
- data/app/views/manifestation_relationships/new.html.erb +12 -0
- data/app/views/manifestation_relationships/show.html.erb +24 -0
- data/app/views/manifestations/_all_facet.html.erb +7 -0
- data/app/views/manifestations/_attachment_file.html.erb +6 -0
- data/app/views/manifestations/_book_jacket.html.erb +5 -0
- data/app/views/manifestations/_call_number.html.erb +25 -0
- data/app/views/manifestations/_carrier_type_facet.html.erb +9 -0
- data/app/views/manifestations/_edition_and_number.html.erb +22 -0
- data/app/views/manifestations/_form.html.erb +154 -0
- data/app/views/manifestations/_form.html.erb.osakac +153 -0
- data/app/views/manifestations/_history_list.html.erb +12 -0
- data/app/views/manifestations/_holding.html.erb +3 -0
- data/app/views/manifestations/_index_form.html.erb +12 -0
- data/app/views/manifestations/_index_form_contributor.html.erb +15 -0
- data/app/views/manifestations/_index_form_creator.html.erb +15 -0
- data/app/views/manifestations/_index_form_item.html.erb +14 -0
- data/app/views/manifestations/_index_form_manifestation.html.erb +13 -0
- data/app/views/manifestations/_index_form_publisher.html.erb +15 -0
- data/app/views/manifestations/_index_form_series_statement.html.erb +20 -0
- data/app/views/manifestations/_language_facet.html.erb +16 -0
- data/app/views/manifestations/_library_facet.html.erb +16 -0
- data/app/views/manifestations/_list.html.erb +21 -0
- data/app/views/manifestations/_manifestation.html.erb +69 -0
- data/app/views/manifestations/_manifestation_list.html.erb +32 -0
- data/app/views/manifestations/_not_found.html.erb +7 -0
- data/app/views/manifestations/_paginate_id_link.html.erb +10 -0
- data/app/views/manifestations/_pickup.html.erb +30 -0
- data/app/views/manifestations/_pubdate_facet.html.erb +9 -0
- data/app/views/manifestations/_question_list.html.erb +13 -0
- data/app/views/manifestations/_reservable_facet.html.erb +14 -0
- data/app/views/manifestations/_search_engine.html.erb +16 -0
- data/app/views/manifestations/_serial_form.html.erb +14 -0
- data/app/views/manifestations/_show.mods.builder +86 -0
- data/app/views/manifestations/_show.rdf.builder +63 -0
- data/app/views/manifestations/_show_creators.html.erb +17 -0
- data/app/views/manifestations/_show_creators.mobile.erb +17 -0
- data/app/views/manifestations/_show_detail_librarian.html.erb +136 -0
- data/app/views/manifestations/_show_detail_user.html.erb +131 -0
- data/app/views/manifestations/_show_group.html.erb +2 -0
- data/app/views/manifestations/_show_holding.html.erb +62 -0
- data/app/views/manifestations/_show_holding.mobile.erb +38 -0
- data/app/views/manifestations/_show_index.html.erb +15 -0
- data/app/views/manifestations/_show_index.mobile.erb +14 -0
- data/app/views/manifestations/_show_periodical_master.html.erb +40 -0
- data/app/views/manifestations/_tab_list.html.erb +11 -0
- data/app/views/manifestations/_tab_menu.html.erb +14 -0
- data/app/views/manifestations/_title.html.erb +27 -0
- data/app/views/manifestations/_title.mobile.erb +27 -0
- data/app/views/manifestations/edit.html.erb +21 -0
- data/app/views/manifestations/error.xml +7 -0
- data/app/views/manifestations/explain.sru +9 -0
- data/app/views/manifestations/index.atom.builder +19 -0
- data/app/views/manifestations/index.csv.erb +4 -0
- data/app/views/manifestations/index.html.erb +101 -0
- data/app/views/manifestations/index.mobile.erb +21 -0
- data/app/views/manifestations/index.mods.builder +8 -0
- data/app/views/manifestations/index.rdf.builder +28 -0
- data/app/views/manifestations/index.rss.builder +43 -0
- data/app/views/manifestations/index.sru.builder +101 -0
- data/app/views/manifestations/new.html.erb +16 -0
- data/app/views/manifestations/show.html.erb +108 -0
- data/app/views/manifestations/show.mobile.erb +20 -0
- data/app/views/manifestations/show.mods.builder +6 -0
- data/app/views/manifestations/show.rdf.builder +11 -0
- data/app/views/medium_of_performances/_form.html.erb +19 -0
- data/app/views/medium_of_performances/edit.html.erb +13 -0
- data/app/views/medium_of_performances/index.html.erb +44 -0
- data/app/views/medium_of_performances/new.html.erb +12 -0
- data/app/views/medium_of_performances/show.html.erb +29 -0
- data/app/views/owns/_form.html.erb +17 -0
- data/app/views/owns/edit.html.erb +13 -0
- data/app/views/owns/index.html.erb +46 -0
- data/app/views/owns/new.html.erb +12 -0
- data/app/views/owns/show.html.erb +25 -0
- data/app/views/patron_import_files/edit.html.erb +25 -0
- data/app/views/patron_import_files/index.html.erb +40 -0
- data/app/views/patron_import_files/new.html.erb +35 -0
- data/app/views/patron_import_files/show.html.erb +69 -0
- data/app/views/patron_import_results/index.csv.erb +3 -0
- data/app/views/patron_import_results/index.html.erb +52 -0
- data/app/views/patron_import_results/show.html.erb +38 -0
- data/app/views/patron_relationship_types/_form.html.erb +19 -0
- data/app/views/patron_relationship_types/edit.html.erb +13 -0
- data/app/views/patron_relationship_types/index.html.erb +43 -0
- data/app/views/patron_relationship_types/new.html.erb +12 -0
- data/app/views/patron_relationship_types/show.html.erb +29 -0
- data/app/views/patron_relationships/_form.html.erb +31 -0
- data/app/views/patron_relationships/edit.html.erb +13 -0
- data/app/views/patron_relationships/index.html.erb +34 -0
- data/app/views/patron_relationships/new.html.erb +12 -0
- data/app/views/patron_relationships/show.html.erb +24 -0
- data/app/views/patron_types/_form.html.erb +19 -0
- data/app/views/patron_types/edit.html.erb +13 -0
- data/app/views/patron_types/index.html.erb +43 -0
- data/app/views/patron_types/new.html.erb +12 -0
- data/app/views/patron_types/show.html.erb +29 -0
- data/app/views/patrons/_expression_list.html.erb +20 -0
- data/app/views/patrons/_form.html.erb +153 -0
- data/app/views/patrons/_form_family_name_first.html.erb +8 -0
- data/app/views/patrons/_form_family_name_last.html.erb +8 -0
- data/app/views/patrons/_history_list.html.erb +12 -0
- data/app/views/patrons/_index.html.erb +38 -0
- data/app/views/patrons/_index_expression.html.erb +58 -0
- data/app/views/patrons/_index_manifestation.html.erb +58 -0
- data/app/views/patrons/_index_patron.html.erb +71 -0
- data/app/views/patrons/_index_patron_merge_list.html.erb +53 -0
- data/app/views/patrons/_index_work.html.erb +63 -0
- data/app/views/patrons/_manifestation_list.html.erb +19 -0
- data/app/views/patrons/_patron.html.erb +17 -0
- data/app/views/patrons/_patron_list.html.erb +18 -0
- data/app/views/patrons/_work_list.html.erb +14 -0
- data/app/views/patrons/edit.html.erb +16 -0
- data/app/views/patrons/index.atom.builder +10 -0
- data/app/views/patrons/index.html.erb +14 -0
- data/app/views/patrons/index.mobile.erb +23 -0
- data/app/views/patrons/index.rss.builder +34 -0
- data/app/views/patrons/new.html.erb +12 -0
- data/app/views/patrons/show.html.erb +204 -0
- data/app/views/patrons/show.js.erb +3 -0
- data/app/views/patrons/show.mobile.erb +121 -0
- data/app/views/picture_files/_index.html.erb +52 -0
- data/app/views/picture_files/_index_event.html.erb +53 -0
- data/app/views/picture_files/_index_manifestation.html.erb +55 -0
- data/app/views/picture_files/_index_patron.html.erb +55 -0
- data/app/views/picture_files/_index_shelf.html.erb +53 -0
- data/app/views/picture_files/_link.html.erb +3 -0
- data/app/views/picture_files/edit.html.erb +56 -0
- data/app/views/picture_files/index.html.erb +11 -0
- data/app/views/picture_files/new.html.erb +33 -0
- data/app/views/picture_files/show.html.erb +67 -0
- data/app/views/produce_types/_form.html.erb +19 -0
- data/app/views/produce_types/edit.html.erb +13 -0
- data/app/views/produce_types/index.html.erb +43 -0
- data/app/views/produce_types/new.html.erb +12 -0
- data/app/views/produce_types/show.html.erb +29 -0
- data/app/views/produces/_form.html.erb +32 -0
- data/app/views/produces/_index.html.erb +36 -0
- data/app/views/produces/_index_manifestation.html.erb +49 -0
- data/app/views/produces/_index_patron.html.erb +40 -0
- data/app/views/produces/edit.html.erb +13 -0
- data/app/views/produces/index.html.erb +7 -0
- data/app/views/produces/new.html.erb +17 -0
- data/app/views/produces/show.html.erb +24 -0
- data/app/views/realize_types/_form.html.erb +19 -0
- data/app/views/realize_types/edit.html.erb +13 -0
- data/app/views/realize_types/index.html.erb +43 -0
- data/app/views/realize_types/new.html.erb +12 -0
- data/app/views/realize_types/show.html.erb +29 -0
- data/app/views/realizes/_form.html.erb +32 -0
- data/app/views/realizes/_index.html.erb +36 -0
- data/app/views/realizes/_index_expression.html.erb +49 -0
- data/app/views/realizes/_index_patron.html.erb +40 -0
- data/app/views/realizes/edit.html.erb +13 -0
- data/app/views/realizes/index.html.erb +7 -0
- data/app/views/realizes/new.html.erb +17 -0
- data/app/views/realizes/show.html.erb +24 -0
- data/app/views/resource_import_files/_show_object_list.html.erb +26 -0
- data/app/views/resource_import_files/edit.html.erb +25 -0
- data/app/views/resource_import_files/index.html.erb +40 -0
- data/app/views/resource_import_files/new.html.erb +37 -0
- data/app/views/resource_import_files/show.html.erb +69 -0
- data/app/views/resource_import_results/index.csv.erb +4 -0
- data/app/views/resource_import_results/index.html.erb +52 -0
- data/app/views/resource_import_results/show.html.erb +38 -0
- data/app/views/series_has_manifestations/_form.html.erb +27 -0
- data/app/views/series_has_manifestations/edit.html.erb +15 -0
- data/app/views/series_has_manifestations/index.html.erb +34 -0
- data/app/views/series_has_manifestations/new.html.erb +14 -0
- data/app/views/series_has_manifestations/show.html.erb +23 -0
- data/app/views/series_statements/_form.html.erb +57 -0
- data/app/views/series_statements/_index.html.erb +55 -0
- data/app/views/series_statements/_index_manifestation.html.erb +59 -0
- data/app/views/series_statements/_index_series_statement_merge_list.html.erb +53 -0
- data/app/views/series_statements/_manifestation_list.html.erb +17 -0
- data/app/views/series_statements/_merge.html.erb +27 -0
- data/app/views/series_statements/_refine_search_form.html.erb +9 -0
- data/app/views/series_statements/_tab_menu.html.erb +3 -0
- data/app/views/series_statements/edit.html.erb +13 -0
- data/app/views/series_statements/index.html.erb +7 -0
- data/app/views/series_statements/new.html.erb +12 -0
- data/app/views/series_statements/show.html.erb +65 -0
- data/app/views/series_statements/show.js.erb +1 -0
- data/config/locales/translation_en.yml +5 -0
- data/config/locales/translation_ja.yml +5 -0
- data/config/routes.rb +100 -0
- data/db/migrate/001_create_patrons.rb +53 -0
- data/db/migrate/005_create_manifestations.rb +56 -0
- data/db/migrate/006_create_items.rb +28 -0
- data/db/migrate/012_create_owns.rb +12 -0
- data/db/migrate/015_create_creates.rb +12 -0
- data/db/migrate/047_create_produces.rb +12 -0
- data/db/migrate/073_create_carrier_types.rb +11 -0
- data/db/migrate/112_create_frequencies.rb +12 -0
- data/db/migrate/117_create_form_of_works.rb +12 -0
- data/db/migrate/125_create_donates.rb +12 -0
- data/db/migrate/20080830154109_create_realizes.rb +13 -0
- data/db/migrate/20080830172106_create_exemplifies.rb +13 -0
- data/db/migrate/20080905191442_create_patron_types.rb +12 -0
- data/db/migrate/20081025083323_create_countries.rb +28 -0
- data/db/migrate/20081025083905_create_languages.rb +23 -0
- data/db/migrate/20081027150907_create_picture_files.rb +15 -0
- data/db/migrate/20081028083142_create_patron_import_files.rb +22 -0
- data/db/migrate/20081028083208_create_resource_import_files.rb +22 -0
- data/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb +15 -0
- data/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +15 -0
- data/db/migrate/20090719201843_create_extents.rb +12 -0
- data/db/migrate/20090720091106_create_medium_of_performances.rb +12 -0
- data/db/migrate/20090720091429_create_content_types.rb +12 -0
- data/db/migrate/20090812151902_create_patron_relationship_types.rb +12 -0
- data/db/migrate/20091012101112_add_dcndl_schema.rb +27 -0
- data/db/migrate/20091025080447_create_licenses.rb +12 -0
- data/db/migrate/20091214131723_create_series_statements.rb +13 -0
- data/db/migrate/20100129142347_create_import_requests.rb +15 -0
- data/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +13 -0
- data/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +10 -0
- data/db/migrate/20100525124311_create_manifestation_relationships.rb +13 -0
- data/db/migrate/20100606073747_create_patron_relationships.rb +13 -0
- data/db/migrate/20100607044753_create_manifestation_relationship_types.rb +12 -0
- data/db/migrate/20100814091104_add_position_to_patron_relationship.rb +11 -0
- data/db/migrate/20100925043847_create_resource_import_results.rb +15 -0
- data/db/migrate/20100925074559_create_patron_import_results.rb +12 -0
- data/db/migrate/20101212070145_add_acquired_at_to_item.rb +9 -0
- data/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +9 -0
- data/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb +11 -0
- data/db/migrate/20110425133109_add_issn_to_series_statement.rb +9 -0
- data/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +9 -0
- data/db/migrate/20110618091240_add_periodical_to_series_statement.rb +9 -0
- data/db/migrate/20110619064807_add_edition_string_to_manifestation.rb +9 -0
- data/db/migrate/20110620173525_add_bookstore_id_to_item.rb +11 -0
- data/db/migrate/20110627034940_create_series_statement_merge_lists.rb +9 -0
- data/db/migrate/20110627035057_create_series_statement_merges.rb +12 -0
- data/db/migrate/20110820131417_create_series_has_manifestations.rb +13 -0
- data/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb +13 -0
- data/db/migrate/20110916091020_add_volume_number_to_manifestation.rb +13 -0
- data/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb +10 -0
- data/db/migrate/20110918161853_rename_series_statement_manifestation_id_to_root_manifestation_id.rb +13 -0
- data/db/migrate/20110918162329_add_note_to_series_statement.rb +9 -0
- data/db/migrate/20111009183423_add_ndc_to_manifestation.rb +9 -0
- data/db/migrate/20111124110059_create_create_types.rb +12 -0
- data/db/migrate/20111124110319_create_realize_types.rb +12 -0
- data/db/migrate/20111124110355_create_produce_types.rb +12 -0
- data/db/migrate/20111124112131_add_create_type_to_create.rb +7 -0
- data/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +6 -0
- data/db/migrate/20120129020544_add_budget_type_id_to_item.rb +6 -0
- data/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +6 -0
- data/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +5 -0
- data/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +5 -0
- data/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +5 -0
- data/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb +5 -0
- data/db/migrate/20120413161403_add_fingerprint_to_patron_import_file.rb +5 -0
- data/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb +5 -0
- data/db/migrate/20120413170720_add_error_message_to_patron_import_file.rb +5 -0
- data/db/migrate/20120415060308_rename_resource_import_file_imported_at_to_executed_at.rb +9 -0
- data/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb +9 -0
- data/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +5 -0
- data/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb +5 -0
- data/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb +5 -0
- data/lib/enju_biblio/engine.rb +23 -0
- data/lib/enju_biblio/expire_editable_fragment.rb +30 -0
- data/lib/enju_biblio/expire_fragment_cache.rb +17 -0
- data/lib/enju_biblio/import_file.rb +13 -0
- data/lib/enju_biblio/master_model.rb +19 -0
- data/lib/enju_biblio/url_validator.rb +10 -0
- data/lib/enju_biblio/version.rb +3 -0
- data/lib/enju_biblio.rb +57 -0
- data/lib/tasks/enju_biblio_tasks.rake +4 -0
- data/spec/cassette_library/enju_ndl/manifestation.yml +523 -0
- data/spec/cassette_library/enju_ndl/ndl_search.yml +1140 -0
- data/spec/controllers/content_types_controller_spec.rb +445 -0
- data/spec/controllers/countries_controller_spec.rb +454 -0
- data/spec/controllers/create_types_controller_spec.rb +167 -0
- data/spec/controllers/creates_controller_spec.rb +450 -0
- data/spec/controllers/donates_controller_spec.rb +439 -0
- data/spec/controllers/exemplifies_controller_spec.rb +446 -0
- data/spec/controllers/extents_controller_spec.rb +445 -0
- data/spec/controllers/form_of_works_controller_spec.rb +445 -0
- data/spec/controllers/frequencies_controller_spec.rb +445 -0
- data/spec/controllers/import_requests_controller_spec.rb +448 -0
- data/spec/controllers/items_controller_spec.rb +549 -0
- data/spec/controllers/languages_controller_spec.rb +316 -0
- data/spec/controllers/licenses_controller_spec.rb +445 -0
- data/spec/controllers/manifestation_relationship_types_controller_spec.rb +445 -0
- data/spec/controllers/manifestation_relationships_controller_spec.rb +446 -0
- data/spec/controllers/manifestations_controller_spec.rb +722 -0
- data/spec/controllers/medium_of_performances_controller_spec.rb +445 -0
- data/spec/controllers/owns_controller_spec.rb +446 -0
- data/spec/controllers/patron_relationship_types_controller_spec.rb +445 -0
- data/spec/controllers/patron_relationships_controller_spec.rb +446 -0
- data/spec/controllers/patron_types_controller_spec.rb +447 -0
- data/spec/controllers/patrons_controller_spec.rb +636 -0
- data/spec/controllers/picture_files_controller_spec.rb +442 -0
- data/spec/controllers/produce_types_controller_spec.rb +166 -0
- data/spec/controllers/produces_controller_spec.rb +446 -0
- data/spec/controllers/realize_types_controller_spec.rb +166 -0
- data/spec/controllers/realizes_controller_spec.rb +447 -0
- data/spec/controllers/resource_import_files_controller_spec.rb +292 -0
- data/spec/controllers/resource_import_results_controller_spec.rb +137 -0
- data/spec/controllers/series_has_manifestations_controller_spec.rb +443 -0
- data/spec/controllers/series_statements_controller_spec.rb +441 -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 +176 -0
- data/spec/dummy/app/helpers/application_helper.rb +227 -0
- data/spec/dummy/app/mailers/notifier.rb +36 -0
- data/spec/dummy/app/models/ability.rb +184 -0
- data/spec/dummy/app/models/library_group.rb +86 -0
- data/spec/dummy/app/models/role.rb +46 -0
- data/spec/dummy/app/models/user.rb +94 -0
- data/spec/dummy/app/models/user_group.rb +40 -0
- data/spec/dummy/app/models/user_has_role.rb +5 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/views/page/403.html.erb +9 -0
- data/spec/dummy/app/views/page/403.mobile.erb +5 -0
- data/spec/dummy/app/views/page/403.xml.erb +4 -0
- data/spec/dummy/app/views/page/404.html.erb +9 -0
- data/spec/dummy/app/views/page/404.mobile.erb +5 -0
- data/spec/dummy/app/views/page/404.xml.erb +4 -0
- data/spec/dummy/config/application.rb +57 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/configatron/defaults.rb +28 -0
- data/spec/dummy/config/configatron/development.rb +4 -0
- data/spec/dummy/config/configatron/production.rb +12 -0
- data/spec/dummy/config/configatron/production.rb.sample +12 -0
- data/spec/dummy/config/configatron/test.rb +7 -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/configatron.rb +2 -0
- data/spec/dummy/config/initializers/devise.rb +205 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +10 -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/active_support_en.yml +36 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/locales/ja.yml +149 -0
- data/spec/dummy/config/routes.rb +60 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/032_create_checkins.rb +17 -0
- data/spec/dummy/db/migrate/033_create_checkouts.rb +25 -0
- data/spec/dummy/db/migrate/035_create_reserves.rb +27 -0
- data/spec/dummy/db/migrate/055_create_bookmarks.rb +22 -0
- data/spec/dummy/db/migrate/059_create_libraries.rb +28 -0
- data/spec/dummy/db/migrate/069_create_shelves.rb +15 -0
- data/spec/dummy/db/migrate/077_create_user_groups.rb +16 -0
- data/spec/dummy/db/migrate/080_create_library_groups.rb +20 -0
- data/spec/dummy/db/migrate/113_create_events.rb +23 -0
- data/spec/dummy/db/migrate/114_create_event_categories.rb +16 -0
- data/spec/dummy/db/migrate/120_create_baskets.rb +12 -0
- data/spec/dummy/db/migrate/121_create_checked_items.rb +17 -0
- data/spec/dummy/db/migrate/124_create_bookstores.rb +17 -0
- data/spec/dummy/db/migrate/127_create_use_restrictions.rb +16 -0
- data/spec/dummy/db/migrate/129_create_item_has_use_restrictions.rb +16 -0
- data/spec/dummy/db/migrate/130_create_request_status_types.rb +12 -0
- data/spec/dummy/db/migrate/131_create_request_types.rb +12 -0
- data/spec/dummy/db/migrate/132_create_circulation_statuses.rb +16 -0
- data/spec/dummy/db/migrate/149_create_message_templates.rb +18 -0
- data/spec/dummy/db/migrate/154_create_messages.rb +24 -0
- data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +20 -0
- data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +17 -0
- data/spec/dummy/db/migrate/20081028093607_create_event_import_files.rb +27 -0
- data/spec/dummy/db/migrate/20081030023412_create_checkout_types.rb +17 -0
- data/spec/dummy/db/migrate/20081030023518_create_user_group_has_checkout_types.rb +25 -0
- data/spec/dummy/db/migrate/20081030023615_create_carrier_type_has_checkout_types.rb +18 -0
- data/spec/dummy/db/migrate/20081117143156_create_inventory_files.rb +18 -0
- data/spec/dummy/db/migrate/20081117143455_create_inventories.rb +17 -0
- data/spec/dummy/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb +17 -0
- data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +16 -0
- data/spec/dummy/db/migrate/20081212151614_create_bookmark_stats.rb +16 -0
- data/spec/dummy/db/migrate/20081212151820_create_bookmark_stat_has_manifestations.rb +13 -0
- data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +16 -0
- data/spec/dummy/db/migrate/20081215094955_create_checkout_stat_has_users.rb +17 -0
- data/spec/dummy/db/migrate/20081216190517_create_reserve_stat_has_manifestations.rb +17 -0
- data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +16 -0
- data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +16 -0
- data/spec/dummy/db/migrate/20081220034117_create_reserve_stat_has_users.rb +17 -0
- data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +27 -0
- data/spec/dummy/db/migrate/20090519203307_create_participates.rb +17 -0
- data/spec/dummy/db/migrate/20090706125521_add_attachments_inventory_to_inventory_file.rb +15 -0
- data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +21 -0
- data/spec/dummy/db/migrate/20091202124834_create_versions.rb +18 -0
- data/spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb +9 -0
- data/spec/dummy/db/migrate/20100525171356_acts_as_taggable_on_migration.rb +30 -0
- data/spec/dummy/db/migrate/20100527113752_create_delayed_jobs.rb +21 -0
- data/spec/dummy/db/migrate/20100925074639_create_event_import_results.rb +15 -0
- data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +9 -0
- data/spec/dummy/db/migrate/20110301134521_add_expire_date_to_reserve.rb +9 -0
- data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +13 -0
- data/spec/dummy/db/migrate/20110328130826_add_current_checkout_count_to_user_group_has_checkout_type.rb +9 -0
- data/spec/dummy/db/migrate/20110621093332_remove_expire_date_from_reserve.rb +9 -0
- data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +13 -0
- data/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +11 -0
- data/spec/dummy/db/migrate/20111201121844_create_roles.rb +12 -0
- data/spec/dummy/db/migrate/20111201155456_create_users.rb +16 -0
- data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +44 -0
- data/spec/dummy/db/migrate/20111201163718_create_user_has_roles.rb +10 -0
- data/spec/dummy/db/migrate/20111217234412_add_save_checkout_history_to_user.rb +5 -0
- data/spec/dummy/db/migrate/20111218002349_add_checkout_icalendar_token_to_user.rb +6 -0
- data/spec/dummy/db/migrate/20111231145823_add_share_bookmarks_to_user.rb +5 -0
- data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +5 -0
- data/spec/dummy/db/migrate/20120105101944_add_queue_to_delayed_jobs.rb +9 -0
- data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +6 -0
- data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +12 -0
- data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +14 -0
- data/spec/dummy/db/migrate/20120413051535_add_event_import_fingerprint_to_event_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413100431_add_fingerprint_to_inventory_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413170734_add_error_message_to_event_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120415060342_rename_event_import_file_imported_at_to_executed_at.rb +9 -0
- data/spec/dummy/db/migrate/20120424103932_add_librarian_id_to_checked_item.rb +5 -0
- data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +5 -0
- data/spec/dummy/db/schema.rb +1240 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/enju_leaf/calculate_stat.rb +30 -0
- data/spec/dummy/lib/enju_leaf/localized_name.rb +15 -0
- data/spec/dummy/lib/enju_leaf/openurl.rb +156 -0
- data/spec/dummy/lib/enju_leaf/porta_cql.rb +283 -0
- data/spec/dummy/lib/enju_leaf/sru.rb +84 -0
- data/spec/dummy/lib/enju_leaf.rb +12 -0
- data/spec/dummy/lib/plugins/ext/event-calendar.rb +38 -0
- data/spec/dummy/lib/plugins/ext/sunspot/abstract_search.rb +12 -0
- data/spec/dummy/lib/plugins/ext/sunspot/dismax.rb +41 -0
- data/spec/dummy/lib/plugins/ext/sunspot/start_record.rb +55 -0
- data/spec/dummy/lib/plugins/ext/sunspot.rb +3 -0
- data/spec/dummy/lib/plugins/ext/will_paginate.rb +64 -0
- data/spec/dummy/lib/plugins/ext.rb +3 -0
- data/spec/dummy/lib/plugins.rb +2 -0
- data/spec/dummy/private/system/patron_import_files/patron_imports/000/000/004/original/patron_delete_file.tsv +8 -0
- data/spec/dummy/private/system/patron_import_files/patron_imports/000/000/004/original/patron_import_file_sample1.tsv +5 -0
- data/spec/dummy/private/system/patron_import_files/patron_imports/000/000/004/original/patron_import_file_sample3.tsv +5 -0
- data/spec/dummy/private/system/patron_import_files/patron_imports/000/000/004/original/patron_update_file.tsv +3 -0
- data/spec/dummy/private/system/picture_files/pictures/000/000/005/medium/spinner.gif +0 -0
- data/spec/dummy/private/system/picture_files/pictures/000/000/005/original/spinner.gif +0 -0
- data/spec/dummy/private/system/picture_files/pictures/000/000/005/thumb/spinner.gif +0 -0
- data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/isbn_sample.txt +3 -0
- data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/item_delete_file.tsv +11 -0
- data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/item_update_file.tsv +4 -0
- data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/resource_import_file_sample1.tsv +19 -0
- data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/resource_import_file_sample2.tsv +19 -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/solr/conf/admin-extra.html +31 -0
- data/spec/dummy/solr/conf/elevate.xml +36 -0
- data/spec/dummy/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/spec/dummy/solr/conf/protwords.txt +21 -0
- data/spec/dummy/solr/conf/schema.xml +244 -0
- data/spec/dummy/solr/conf/scripts.conf +24 -0
- data/spec/dummy/solr/conf/solrconfig.xml +934 -0
- data/spec/dummy/solr/conf/spellings.txt +2 -0
- data/spec/dummy/solr/conf/stopwords.txt +58 -0
- data/spec/dummy/solr/conf/synonyms.txt +31 -0
- data/spec/dummy/solr/data/test/index/_0.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_0.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_0.fnm +7 -0
- data/spec/dummy/solr/data/test/index/_0.frq +0 -0
- data/spec/dummy/solr/data/test/index/_0.nrm +1 -0
- data/spec/dummy/solr/data/test/index/_0.prx +0 -0
- data/spec/dummy/solr/data/test/index/_0.tii +0 -0
- data/spec/dummy/solr/data/test/index/_0.tis +0 -0
- data/spec/dummy/solr/data/test/index/_1.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_1.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_1.fnm +7 -0
- data/spec/dummy/solr/data/test/index/_1.frq +0 -0
- data/spec/dummy/solr/data/test/index/_1.nrm +1 -0
- data/spec/dummy/solr/data/test/index/_1.prx +0 -0
- data/spec/dummy/solr/data/test/index/_1.tii +0 -0
- data/spec/dummy/solr/data/test/index/_1.tis +0 -0
- data/spec/dummy/solr/data/test/index/_2.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_2.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_2.fnm +7 -0
- data/spec/dummy/solr/data/test/index/_2.frq +0 -0
- data/spec/dummy/solr/data/test/index/_2.nrm +1 -0
- data/spec/dummy/solr/data/test/index/_2.prx +0 -0
- data/spec/dummy/solr/data/test/index/_2.tii +0 -0
- data/spec/dummy/solr/data/test/index/_2.tis +0 -0
- data/spec/dummy/solr/data/test/index/_3.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_3.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_3.fnm +8 -0
- data/spec/dummy/solr/data/test/index/_3.frq +0 -0
- data/spec/dummy/solr/data/test/index/_3.nrm +1 -0
- data/spec/dummy/solr/data/test/index/_3.prx +0 -0
- data/spec/dummy/solr/data/test/index/_3.tii +0 -0
- data/spec/dummy/solr/data/test/index/_3.tis +0 -0
- data/spec/dummy/solr/data/test/index/_4.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_4.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_4.fnm +9 -0
- data/spec/dummy/solr/data/test/index/_4.frq +0 -0
- data/spec/dummy/solr/data/test/index/_4.nrm +1 -0
- data/spec/dummy/solr/data/test/index/_4.prx +0 -0
- data/spec/dummy/solr/data/test/index/_4.tii +0 -0
- data/spec/dummy/solr/data/test/index/_4.tis +0 -0
- data/spec/dummy/solr/data/test/index/_6.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_6.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_6.fnm +10 -0
- data/spec/dummy/solr/data/test/index/_6.frq +0 -0
- data/spec/dummy/solr/data/test/index/_6.nrm +1 -0
- data/spec/dummy/solr/data/test/index/_6.prx +0 -0
- data/spec/dummy/solr/data/test/index/_6.tii +0 -0
- data/spec/dummy/solr/data/test/index/_6.tis +0 -0
- data/spec/dummy/solr/data/test/index/_6_1.del +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_8 +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments.gen +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
- data/spec/dummy/tmp/cache/4F7/F90/default_role +0 -0
- data/spec/dummy/tmp/cache/6E4/420/search_engine_all +0 -0
- data/spec/factories/carrier_type.rb +5 -0
- data/spec/factories/content_type.rb +5 -0
- data/spec/factories/country.rb +8 -0
- data/spec/factories/create.rb +6 -0
- data/spec/factories/create_types.rb +9 -0
- data/spec/factories/donate.rb +6 -0
- data/spec/factories/exemplify.rb +6 -0
- data/spec/factories/extent.rb +5 -0
- data/spec/factories/form_of_work.rb +5 -0
- data/spec/factories/frequency.rb +5 -0
- data/spec/factories/import_request.rb +5 -0
- data/spec/factories/item.rb +7 -0
- data/spec/factories/language.rb +8 -0
- data/spec/factories/license.rb +5 -0
- data/spec/factories/manifestation.rb +6 -0
- data/spec/factories/manifestation_relationship.rb +6 -0
- data/spec/factories/manifestation_relationship_type.rb +5 -0
- data/spec/factories/medium_of_performance.rb +5 -0
- data/spec/factories/own.rb +6 -0
- data/spec/factories/patron.rb +13 -0
- data/spec/factories/patron_relationship.rb +6 -0
- data/spec/factories/patron_relationship_type.rb +5 -0
- data/spec/factories/patron_type.rb +5 -0
- data/spec/factories/produce.rb +6 -0
- data/spec/factories/produce_types.rb +9 -0
- data/spec/factories/realize.rb +6 -0
- data/spec/factories/realize_types.rb +9 -0
- data/spec/factories/series_has_manifestation.rb +6 -0
- data/spec/factories/series_statement.rb +5 -0
- data/spec/factories/user.rb +37 -0
- data/spec/fixtures/baskets.yml +80 -0
- data/spec/fixtures/bookstores.yml +107 -0
- data/spec/fixtures/budget_types.yml +29 -0
- data/spec/fixtures/carrier_type_has_checkout_types.yml +31 -0
- data/spec/fixtures/carrier_types.yml +51 -0
- data/spec/fixtures/checked_items.yml +35 -0
- data/spec/fixtures/checkins.yml +48 -0
- data/spec/fixtures/checkout_stat_has_manifestations.yml +24 -0
- data/spec/fixtures/checkout_stat_has_users.yml +24 -0
- data/spec/fixtures/checkout_types.yml +34 -0
- data/spec/fixtures/checkouts.yml +162 -0
- data/spec/fixtures/circulation_statuses.yml +136 -0
- data/spec/fixtures/content_types.yml +36 -0
- data/spec/fixtures/countries.yml +2059 -0
- data/spec/fixtures/create_types.yml +47 -0
- data/spec/fixtures/creates.yml +65 -0
- data/spec/fixtures/donates.yml +31 -0
- data/spec/fixtures/event_categories.yml +55 -0
- data/spec/fixtures/events.yml +142 -0
- data/spec/fixtures/exemplifies.yml +155 -0
- data/spec/fixtures/extents.yml +29 -0
- data/spec/fixtures/form_of_works.yml +39 -0
- data/spec/fixtures/frequencies.yml +85 -0
- data/spec/fixtures/import_requests.yml +27 -0
- data/spec/fixtures/inventory_files.yml +40 -0
- data/spec/fixtures/item_has_use_restrictions.yml +61 -0
- data/spec/fixtures/items.yml +257 -0
- data/spec/fixtures/languages.yml +1901 -0
- data/spec/fixtures/lending_policies.yml +92 -0
- data/spec/fixtures/libraries.yml +102 -0
- data/spec/fixtures/library_groups.yml +33 -0
- data/spec/fixtures/licenses.yml +29 -0
- data/spec/fixtures/manifestation_checkout_stats.yml +31 -0
- data/spec/fixtures/manifestation_relationship_types.yml +29 -0
- data/spec/fixtures/manifestation_relationships.yml +30 -0
- data/spec/fixtures/manifestation_reserve_stats.yml +31 -0
- data/spec/fixtures/manifestations.yml +2020 -0
- data/spec/fixtures/medium_of_performances.yml +29 -0
- data/spec/fixtures/message_requests.yml +30 -0
- data/spec/fixtures/message_templates.yml +70 -0
- data/spec/fixtures/messages.yml +62 -0
- data/spec/fixtures/owns.yml +26 -0
- data/spec/fixtures/patron_import_files.yml +47 -0
- data/spec/fixtures/patron_import_results.yml +29 -0
- data/spec/fixtures/patron_relationship_types.yml +34 -0
- data/spec/fixtures/patron_relationships.yml +25 -0
- data/spec/fixtures/patron_types.yml +35 -0
- data/spec/fixtures/patrons.yml +338 -0
- data/spec/fixtures/picture_files.yml +63 -0
- data/spec/fixtures/produce_types.yml +31 -0
- data/spec/fixtures/produces.yml +149 -0
- data/spec/fixtures/realize_types.yml +39 -0
- data/spec/fixtures/realizes.yml +86 -0
- data/spec/fixtures/request_status_types.yml +63 -0
- data/spec/fixtures/request_types.yml +55 -0
- data/spec/fixtures/reserve_stat_has_manifestations.yml +24 -0
- data/spec/fixtures/reserve_stat_has_users.yml +24 -0
- data/spec/fixtures/reserves.yml +158 -0
- data/spec/fixtures/resource_import_files.yml +47 -0
- data/spec/fixtures/resource_import_results.yml +29 -0
- data/spec/fixtures/roles.yml +21 -0
- data/spec/fixtures/series_has_manifestations.yml +35 -0
- data/spec/fixtures/series_statements.yml +45 -0
- data/spec/fixtures/shelves.yml +47 -0
- data/spec/fixtures/use_restrictions.yml +93 -0
- data/spec/fixtures/user_checkout_stats.yml +30 -0
- data/spec/fixtures/user_group_has_checkout_types.yml +111 -0
- data/spec/fixtures/user_groups.yml +51 -0
- data/spec/fixtures/user_has_roles.yml +41 -0
- data/spec/fixtures/user_reserve_stats.yml +30 -0
- data/spec/fixtures/users.yml +106 -0
- data/spec/models/carrier_type_spec.rb +25 -0
- data/spec/models/content_type_spec.rb +21 -0
- data/spec/models/country_spec.rb +22 -0
- data/spec/models/create_spec.rb +22 -0
- data/spec/models/create_type_spec.rb +21 -0
- data/spec/models/donate_spec.rb +19 -0
- data/spec/models/exemplify_spec.rb +29 -0
- data/spec/models/extent_spec.rb +21 -0
- data/spec/models/form_of_work_spec.rb +21 -0
- data/spec/models/frequency_spec.rb +24 -0
- data/spec/models/import_request_spec.rb +21 -0
- data/spec/models/item_spec.rb +70 -0
- data/spec/models/language_spec.rb +23 -0
- data/spec/models/license_spec.rb +21 -0
- data/spec/models/manifestation_relationship_spec.rb +21 -0
- data/spec/models/manifestation_relationship_type_spec.rb +21 -0
- data/spec/models/manifestation_spec.rb +292 -0
- data/spec/models/medium_of_performance_spec.rb +21 -0
- data/spec/models/own_spec.rb +20 -0
- data/spec/models/patron_import_file_spec.rb +96 -0
- data/spec/models/patron_import_result_spec.rb +21 -0
- data/spec/models/patron_relationship_spec.rb +21 -0
- data/spec/models/patron_relationship_type_spec.rb +21 -0
- data/spec/models/patron_spec.rb +103 -0
- data/spec/models/patron_type_spec.rb +21 -0
- data/spec/models/picture_file_spec.rb +29 -0
- data/spec/models/produce_spec.rb +22 -0
- data/spec/models/produce_type_spec.rb +21 -0
- data/spec/models/realize_spec.rb +22 -0
- data/spec/models/realize_type_spec.rb +21 -0
- data/spec/models/resource_import_file_spec.rb +166 -0
- data/spec/models/resource_import_result_spec.rb +21 -0
- data/spec/models/series_has_manifestation_spec.rb +21 -0
- data/spec/models/series_statement_spec.rb +38 -0
- data/spec/requests/create_types_spec.rb +11 -0
- data/spec/requests/items_spec.rb +9 -0
- data/spec/requests/manifestations_spec.rb +9 -0
- data/spec/requests/patrons_spec.rb +9 -0
- data/spec/requests/produce_types_spec.rb +11 -0
- data/spec/requests/realize_types_spec.rb +11 -0
- data/spec/routing/content_types_routing_spec.rb +35 -0
- data/spec/routing/create_types_routing_spec.rb +35 -0
- data/spec/routing/creates_routing_spec.rb +35 -0
- data/spec/routing/items_routing_spec.rb +35 -0
- data/spec/routing/licenses_routing_spec.rb +35 -0
- data/spec/routing/manifestation_relationship_types_routing_spec.rb +35 -0
- data/spec/routing/manifestation_relationships_routing_spec.rb +35 -0
- data/spec/routing/manifestations_routing_spec.rb +39 -0
- data/spec/routing/patron_relationship_types_routing_spec.rb +35 -0
- data/spec/routing/patron_relationships_routing_spec.rb +35 -0
- data/spec/routing/patrons_routing_spec.rb +35 -0
- data/spec/routing/produce_types_routing_spec.rb +35 -0
- data/spec/routing/realize_types_routing_spec.rb +35 -0
- data/spec/routing/realizes_routing_spec.rb +35 -0
- data/spec/routing/series_has_manifestations_routing_spec.rb +35 -0
- data/spec/spec_helper.rb +54 -0
- data/spec/support/controller_macros.rb +46 -0
- data/spec/support/devise.rb +4 -0
- data/spec/support/vcr.rb +9 -0
- data/spec/views/create_types/edit.html.erb_spec.rb +23 -0
- data/spec/views/create_types/index.html.erb_spec.rb +31 -0
- data/spec/views/create_types/new.html.erb_spec.rb +23 -0
- data/spec/views/create_types/show.html.erb_spec.rb +24 -0
- data/spec/views/creates/edit.html.erb_spec.rb +25 -0
- data/spec/views/creates/index.html.erb_spec.rb +25 -0
- data/spec/views/creates/new.html.erb_spec.rb +25 -0
- data/spec/views/creates/show.html.erb_spec.rb +19 -0
- data/spec/views/exemplifies/edit.html.erb_spec.rb +22 -0
- data/spec/views/exemplifies/index.html.erb_spec.rb +25 -0
- data/spec/views/exemplifies/new.html.erb_spec.rb +22 -0
- data/spec/views/exemplifies/show.html.erb_spec.rb +19 -0
- data/spec/views/manifestations/show.html.erb_spec.rb +16 -0
- data/spec/views/owns/edit.html.erb_spec.rb +22 -0
- data/spec/views/owns/index.html.erb_spec.rb +25 -0
- data/spec/views/owns/new.html.erb_spec.rb +22 -0
- data/spec/views/owns/show.html.erb_spec.rb +19 -0
- data/spec/views/produce_types/edit.html.erb_spec.rb +23 -0
- data/spec/views/produce_types/index.html.erb_spec.rb +31 -0
- data/spec/views/produce_types/new.html.erb_spec.rb +23 -0
- data/spec/views/produce_types/show.html.erb_spec.rb +24 -0
- data/spec/views/produces/edit.html.erb_spec.rb +26 -0
- data/spec/views/produces/index.html.erb_spec.rb +25 -0
- data/spec/views/produces/new.html.erb_spec.rb +26 -0
- data/spec/views/produces/show.html.erb_spec.rb +19 -0
- data/spec/views/realize_types/edit.html.erb_spec.rb +23 -0
- data/spec/views/realize_types/index.html.erb_spec.rb +31 -0
- data/spec/views/realize_types/new.html.erb_spec.rb +23 -0
- data/spec/views/realize_types/show.html.erb_spec.rb +24 -0
- data/spec/views/realizes/edit.html.erb_spec.rb +26 -0
- data/spec/views/realizes/index.html.erb_spec.rb +25 -0
- data/spec/views/realizes/new.html.erb_spec.rb +26 -0
- data/spec/views/realizes/show.html.erb_spec.rb +19 -0
- data/spec/views/series_has_manifestations/edit.html.erb_spec.rb +21 -0
- data/spec/views/series_has_manifestations/index.html.erb_spec.rb +31 -0
- data/spec/views/series_has_manifestations/new.html.erb_spec.rb +21 -0
- data/spec/views/series_has_manifestations/show.html.erb_spec.rb +21 -0
- metadata +1930 -0
@@ -0,0 +1,727 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
class ManifestationsController < ApplicationController
|
3
|
+
load_and_authorize_resource :except => :index
|
4
|
+
authorize_resource :only => :index
|
5
|
+
before_filter :authenticate_user!, :only => :edit
|
6
|
+
before_filter :get_patron, :get_manifestation, :except => [:create, :update, :destroy]
|
7
|
+
before_filter :get_expression, :only => :new
|
8
|
+
if defined?(EnjuSubject)
|
9
|
+
before_filter :get_subject, :except => [:create, :update, :destroy]
|
10
|
+
end
|
11
|
+
before_filter :get_series_statement, :only => [:index, :new, :edit]
|
12
|
+
before_filter :get_item, :get_libraries, :only => :index
|
13
|
+
before_filter :prepare_options, :only => [:new, :edit]
|
14
|
+
before_filter :get_version, :only => [:show]
|
15
|
+
after_filter :solr_commit, :only => [:create, :update, :destroy]
|
16
|
+
after_filter :convert_charset, :only => :index
|
17
|
+
cache_sweeper :manifestation_sweeper, :only => [:create, :update, :destroy]
|
18
|
+
include EnjuOai::OaiController if defined?(EnjuOai)
|
19
|
+
include EnjuSearchLog if defined?(EnjuSearchLog)
|
20
|
+
|
21
|
+
# GET /manifestations
|
22
|
+
# GET /manifestations.json
|
23
|
+
def index
|
24
|
+
mode = params[:mode]
|
25
|
+
if mode == 'add'
|
26
|
+
unless current_user.try(:has_role?, 'Librarian')
|
27
|
+
access_denied; return
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
@seconds = Benchmark.realtime do
|
32
|
+
if defined?(EnjuOai)
|
33
|
+
@oai = check_oai_params(params)
|
34
|
+
next if @oai[:need_not_to_search]
|
35
|
+
if params[:format] == 'oai'
|
36
|
+
oai_search = true
|
37
|
+
from_and_until_times = set_from_and_until(Manifestation, params[:from], params[:until])
|
38
|
+
from_time = @from_time = from_and_until_times[:from]
|
39
|
+
until_time = @until_time = from_and_until_times[:until]
|
40
|
+
# OAI-PMHのデフォルトの件数
|
41
|
+
per_page = 200
|
42
|
+
if params[:resumptionToken]
|
43
|
+
current_token = get_resumption_token(params[:resumptionToken])
|
44
|
+
if current_token
|
45
|
+
page = (current_token[:cursor].to_i + per_page).div(per_page) + 1
|
46
|
+
else
|
47
|
+
@oai[:errors] << 'badResumptionToken'
|
48
|
+
end
|
49
|
+
end
|
50
|
+
page ||= 1
|
51
|
+
|
52
|
+
if params[:verb] == 'GetRecord' and params[:identifier]
|
53
|
+
begin
|
54
|
+
@manifestation = Manifestation.find_by_oai_identifier(params[:identifier])
|
55
|
+
rescue ActiveRecord::RecordNotFound
|
56
|
+
@oai[:errors] << "idDoesNotExist"
|
57
|
+
render :formats => :oai, :layout => false
|
58
|
+
return
|
59
|
+
end
|
60
|
+
render :template => 'manifestations/show', :formats => :oai, :layout => false
|
61
|
+
return
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
set_reservable if defined?(EnjuCirculation)
|
67
|
+
|
68
|
+
manifestations, sort, @count = {}, {}, {}
|
69
|
+
query = ""
|
70
|
+
|
71
|
+
if params[:format] == 'csv'
|
72
|
+
per_page = 65534
|
73
|
+
end
|
74
|
+
|
75
|
+
if params[:format] == 'sru'
|
76
|
+
if params[:operation] == 'searchRetrieve'
|
77
|
+
sru = Sru.new(params)
|
78
|
+
query = sru.cql.to_sunspot
|
79
|
+
sort = sru.sort_by
|
80
|
+
else
|
81
|
+
render :template => 'manifestations/explain', :layout => false
|
82
|
+
return
|
83
|
+
end
|
84
|
+
else
|
85
|
+
if params[:api] == 'openurl'
|
86
|
+
openurl = Openurl.new(params)
|
87
|
+
@manifestations = openurl.search
|
88
|
+
query = openurl.query_text
|
89
|
+
sort = set_search_result_order(params[:sort_by], params[:order])
|
90
|
+
else
|
91
|
+
query = make_query(params[:query], params)
|
92
|
+
sort = set_search_result_order(params[:sort_by], params[:order])
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
# 絞り込みを行わない状態のクエリ
|
97
|
+
@query = query.dup
|
98
|
+
query = query.gsub(' ', ' ')
|
99
|
+
|
100
|
+
includes = [:carrier_type, :required_role, :items, :creators, :contributors, :publishers]
|
101
|
+
includes << :bookmarks if defined?(EnjuBookmark)
|
102
|
+
search = Manifestation.search(:include => includes)
|
103
|
+
role = current_user.try(:role) || Role.default_role
|
104
|
+
case @reservable
|
105
|
+
when 'true'
|
106
|
+
reservable = true
|
107
|
+
when 'false'
|
108
|
+
reservable = false
|
109
|
+
else
|
110
|
+
reservable = nil
|
111
|
+
end
|
112
|
+
|
113
|
+
patron = get_index_patron
|
114
|
+
@index_patron = patron
|
115
|
+
manifestation = @manifestation if @manifestation
|
116
|
+
series_statement = @series_statement if @series_statement
|
117
|
+
|
118
|
+
if defined?(EnjuSubject)
|
119
|
+
subject = @subject if @subject
|
120
|
+
end
|
121
|
+
|
122
|
+
unless mode == 'add'
|
123
|
+
search.build do
|
124
|
+
with(:creator_ids).equal_to patron[:creator].id if patron[:creator]
|
125
|
+
with(:contributor_ids).equal_to patron[:contributor].id if patron[:contributor]
|
126
|
+
with(:publisher_ids).equal_to patron[:publisher].id if patron[:publisher]
|
127
|
+
with(:original_manifestation_ids).equal_to manifestation.id if manifestation
|
128
|
+
with(:series_statement_id).equal_to series_statement.id if series_statement
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
search.build do
|
133
|
+
fulltext query unless query.blank?
|
134
|
+
order_by sort[:sort_by], sort[:order] unless oai_search
|
135
|
+
order_by :updated_at, :desc if oai_search
|
136
|
+
if defined?(EnjuSubject)
|
137
|
+
with(:subject_ids).equal_to subject.id if subject
|
138
|
+
end
|
139
|
+
if series_statement
|
140
|
+
with(:periodical_master).equal_to false
|
141
|
+
if mode != 'add'
|
142
|
+
with(:periodical).equal_to true
|
143
|
+
end
|
144
|
+
else
|
145
|
+
if mode != 'add'
|
146
|
+
with(:periodical).equal_to false
|
147
|
+
end
|
148
|
+
end
|
149
|
+
facet :reservable if defined?(EnjuCirculation)
|
150
|
+
end
|
151
|
+
search = make_internal_query(search)
|
152
|
+
search.data_accessor_for(Manifestation).select = [
|
153
|
+
:id,
|
154
|
+
:original_title,
|
155
|
+
:title_transcription,
|
156
|
+
:required_role_id,
|
157
|
+
:carrier_type_id,
|
158
|
+
:access_address,
|
159
|
+
:volume_number_string,
|
160
|
+
:issue_number_string,
|
161
|
+
:serial_number_string,
|
162
|
+
:date_of_publication,
|
163
|
+
:pub_date,
|
164
|
+
:language_id,
|
165
|
+
:created_at,
|
166
|
+
:updated_at,
|
167
|
+
:volume_number_string,
|
168
|
+
:volume_number,
|
169
|
+
:issue_number_string,
|
170
|
+
:issue_number,
|
171
|
+
:serial_number,
|
172
|
+
:edition_string,
|
173
|
+
:edition
|
174
|
+
] if params[:format] == 'html' or params[:format].nil?
|
175
|
+
all_result = search.execute
|
176
|
+
@count[:query_result] = all_result.total
|
177
|
+
@reservable_facet = all_result.facet(:reservable).rows if defined?(EnjuCirculation)
|
178
|
+
|
179
|
+
if session[:search_params]
|
180
|
+
unless search.query.to_params == session[:search_params]
|
181
|
+
clear_search_sessions
|
182
|
+
end
|
183
|
+
else
|
184
|
+
clear_search_sessions
|
185
|
+
session[:params] = params
|
186
|
+
session[:search_params] == search.query.to_params
|
187
|
+
session[:query] = @query
|
188
|
+
end
|
189
|
+
|
190
|
+
unless session[:manifestation_ids]
|
191
|
+
manifestation_ids = search.build do
|
192
|
+
paginate :page => 1, :per_page => configatron.max_number_of_results
|
193
|
+
end.execute.raw_results.collect(&:primary_key).map{|id| id.to_i}
|
194
|
+
session[:manifestation_ids] = manifestation_ids
|
195
|
+
end
|
196
|
+
|
197
|
+
if defined?(EnjuBookmark)
|
198
|
+
if session[:manifestation_ids]
|
199
|
+
if params[:view] == 'tag_cloud'
|
200
|
+
bookmark_ids = Bookmark.where(:manifestation_id => session[:manifestation_ids]).limit(1000).select(:id).collect(&:id)
|
201
|
+
@tags = Tag.bookmarked(bookmark_ids)
|
202
|
+
render :partial => 'manifestations/tag_cloud'
|
203
|
+
#session[:manifestation_ids] = nil
|
204
|
+
return
|
205
|
+
end
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
page ||= params[:page] || 1
|
210
|
+
per_page ||= Manifestation.per_page
|
211
|
+
if params[:format] == 'sru'
|
212
|
+
search.query.start_record(params[:startRecord] || 1, params[:maximumRecords] || 200)
|
213
|
+
else
|
214
|
+
search.build do
|
215
|
+
facet :reservable if defined?(EnjuCirculation)
|
216
|
+
facet :carrier_type
|
217
|
+
facet :library
|
218
|
+
facet :language
|
219
|
+
facet :subject_ids if defined?(EnjuSubject)
|
220
|
+
paginate :page => page.to_i, :per_page => per_page
|
221
|
+
end
|
222
|
+
end
|
223
|
+
search_result = search.execute
|
224
|
+
if @count[:query_result] > configatron.max_number_of_results
|
225
|
+
max_count = configatron.max_number_of_results
|
226
|
+
else
|
227
|
+
max_count = @count[:query_result]
|
228
|
+
end
|
229
|
+
@manifestations = WillPaginate::Collection.create(page, per_page, max_count) do |pager|
|
230
|
+
pager.replace(search_result.results)
|
231
|
+
end
|
232
|
+
|
233
|
+
if params[:format].blank? or params[:format] == 'html'
|
234
|
+
@carrier_type_facet = search_result.facet(:carrier_type).rows
|
235
|
+
@language_facet = search_result.facet(:language).rows
|
236
|
+
@library_facet = search_result.facet(:library).rows
|
237
|
+
end
|
238
|
+
|
239
|
+
@search_engines = Rails.cache.fetch('search_engine_all'){SearchEngine.all}
|
240
|
+
|
241
|
+
if defined?(EnjuBookmark)
|
242
|
+
# TODO: 検索結果が少ない場合にも表示させる
|
243
|
+
if manifestation_ids.blank?
|
244
|
+
if query.respond_to?(:suggest_tags)
|
245
|
+
@suggested_tag = query.suggest_tags.first
|
246
|
+
end
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
if defined?(EnjuSearchLog)
|
251
|
+
save_search_history(query, @manifestations.offset, @count[:query_result], current_user)
|
252
|
+
end
|
253
|
+
|
254
|
+
if defined?(EnjuOai)
|
255
|
+
if params[:format] == 'oai'
|
256
|
+
unless @manifestations.empty?
|
257
|
+
@resumption = set_resumption_token(
|
258
|
+
params[:resumptionToken],
|
259
|
+
@from_time || Manifestation.last.updated_at,
|
260
|
+
@until_time || Manifestation.first.updated_at,
|
261
|
+
@manifestations.per_page
|
262
|
+
)
|
263
|
+
else
|
264
|
+
@oai[:errors] << 'noRecordsMatch'
|
265
|
+
end
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
269
|
+
|
270
|
+
store_location # before_filter ではファセット検索のURLを記憶してしまう
|
271
|
+
|
272
|
+
respond_to do |format|
|
273
|
+
format.html
|
274
|
+
format.mobile
|
275
|
+
format.xml { render :xml => @manifestations }
|
276
|
+
format.sru { render :layout => false }
|
277
|
+
format.rss { render :layout => false }
|
278
|
+
format.csv { render :layout => false }
|
279
|
+
format.rdf { render :layout => false }
|
280
|
+
format.atom
|
281
|
+
format.oai {
|
282
|
+
case params[:verb]
|
283
|
+
when 'Identify'
|
284
|
+
render :template => 'manifestations/identify'
|
285
|
+
when 'ListMetadataFormats'
|
286
|
+
render :template => 'manifestations/list_metadata_formats'
|
287
|
+
when 'ListSets'
|
288
|
+
@series_statements = SeriesStatement.select([:id, :original_title])
|
289
|
+
render :template => 'manifestations/list_sets'
|
290
|
+
when 'ListIdentifiers'
|
291
|
+
render :template => 'manifestations/list_identifiers'
|
292
|
+
when 'ListRecords'
|
293
|
+
render :template => 'manifestations/list_records'
|
294
|
+
end
|
295
|
+
}
|
296
|
+
format.mods
|
297
|
+
format.json { render :json => @manifestations }
|
298
|
+
format.js
|
299
|
+
end
|
300
|
+
end
|
301
|
+
|
302
|
+
# GET /manifestations/1
|
303
|
+
# GET /manifestations/1.json
|
304
|
+
def show
|
305
|
+
if params[:isbn]
|
306
|
+
@manifestation = Manifestation.find_by_isbn(params[:isbn])
|
307
|
+
if @manifestation
|
308
|
+
redirect_to manifestation_url(@manifestation, :format => params[:format])
|
309
|
+
return
|
310
|
+
else
|
311
|
+
raise ActiveRecord::RecordNotFound
|
312
|
+
end
|
313
|
+
else
|
314
|
+
if @version
|
315
|
+
@manifestation = @manifestation.versions.find(@version).item if @version
|
316
|
+
end
|
317
|
+
end
|
318
|
+
|
319
|
+
case params[:mode]
|
320
|
+
when 'send_email'
|
321
|
+
if user_signed_in?
|
322
|
+
Notifier.delay.manifestation_info(current_user, @manifestation)
|
323
|
+
flash[:notice] = t('page.sent_email')
|
324
|
+
redirect_to @manifestation
|
325
|
+
return
|
326
|
+
else
|
327
|
+
access_denied; return
|
328
|
+
end
|
329
|
+
end
|
330
|
+
|
331
|
+
return if render_mode(params[:mode])
|
332
|
+
|
333
|
+
store_location
|
334
|
+
|
335
|
+
if @manifestation.periodical_master?
|
336
|
+
flash.keep(:notice) if flash[:notice]
|
337
|
+
redirect_to series_statement_url(@manifestation.series_statement, :manifestation_id => @manifestation.id)
|
338
|
+
return
|
339
|
+
end
|
340
|
+
|
341
|
+
if defined?(EnjuCirculation)
|
342
|
+
@reserved_count = Reserve.waiting.where(:manifestation_id => @manifestation.id, :checked_out_at => nil).count
|
343
|
+
@reserve = current_user.reserves.where(:manifestation_id => @manifestation.id).first if user_signed_in?
|
344
|
+
end
|
345
|
+
|
346
|
+
if @manifestation.root_of_series?
|
347
|
+
@manifestations = @manifestation.series_statement.manifestations.periodical_children.page(params[:manifestation_page]).per_page(Manifestation.per_page)
|
348
|
+
end
|
349
|
+
|
350
|
+
if @manifestation.attachment.path
|
351
|
+
if configatron.uploaded_file.storage == :s3
|
352
|
+
data = open(@manifestation.attachment.url).read.force_encoding('UTF-8')
|
353
|
+
else
|
354
|
+
file = @manifestation.attachment.path
|
355
|
+
end
|
356
|
+
end
|
357
|
+
|
358
|
+
if session[:manifestation_ids]
|
359
|
+
@manifestation_ids = session[:manifestation_ids]
|
360
|
+
end
|
361
|
+
|
362
|
+
respond_to do |format|
|
363
|
+
format.html # show.html.erb
|
364
|
+
format.mobile
|
365
|
+
format.xml {
|
366
|
+
case params[:mode]
|
367
|
+
when 'related'
|
368
|
+
render :template => 'manifestations/related'
|
369
|
+
else
|
370
|
+
render :xml => @manifestation
|
371
|
+
end
|
372
|
+
}
|
373
|
+
format.rdf
|
374
|
+
format.oai
|
375
|
+
format.mods
|
376
|
+
format.json { render :json => @manifestation }
|
377
|
+
#format.atom { render :template => 'manifestations/oai_ore' }
|
378
|
+
#format.js
|
379
|
+
format.download {
|
380
|
+
if @manifestation.attachment.path
|
381
|
+
if configatron.uploaded_file.storage == :s3
|
382
|
+
send_data @manifestation.attachment.data, :filename => File.basename(@manifestation.attachment_file_name), :type => 'application/octet-stream'
|
383
|
+
else
|
384
|
+
if File.exist?(file) and File.file?(file)
|
385
|
+
send_file file, :filename => File.basename(@manifestation.attachment_file_name), :type => 'application/octet-stream'
|
386
|
+
end
|
387
|
+
end
|
388
|
+
else
|
389
|
+
render :template => 'page/404', :status => 404
|
390
|
+
end
|
391
|
+
}
|
392
|
+
end
|
393
|
+
end
|
394
|
+
|
395
|
+
# GET /manifestations/new
|
396
|
+
# GET /manifestations/new.json
|
397
|
+
def new
|
398
|
+
@manifestation = Manifestation.new
|
399
|
+
@original_manifestation = Manifestation.where(:id => params[:manifestation_id]).first
|
400
|
+
set_title
|
401
|
+
@manifestation.language = Language.where(:iso_639_1 => @locale).first
|
402
|
+
@manifestation.series_has_manifestation = SeriesHasManifestation.new
|
403
|
+
@manifestation.series_has_manifestation.series_statement = @series_statement
|
404
|
+
|
405
|
+
respond_to do |format|
|
406
|
+
format.html # new.html.erb
|
407
|
+
format.json { render :json => @manifestation }
|
408
|
+
end
|
409
|
+
end
|
410
|
+
|
411
|
+
# GET /manifestations/1/edit
|
412
|
+
def edit
|
413
|
+
unless current_user.has_role?('Librarian')
|
414
|
+
unless params[:mode] == 'tag_edit'
|
415
|
+
access_denied; return
|
416
|
+
end
|
417
|
+
end
|
418
|
+
@original_manifestation = Manifestation.where(:id => params[:manifestation_id]).first
|
419
|
+
if defined?(EnjuBookmark)
|
420
|
+
if params[:mode] == 'tag_edit'
|
421
|
+
@bookmark = current_user.bookmarks.where(:manifestation_id => @manifestation.id).first if @manifestation rescue nil
|
422
|
+
render :partial => 'manifestations/tag_edit', :locals => {:manifestation => @manifestation}
|
423
|
+
end
|
424
|
+
store_location unless params[:mode] == 'tag_edit'
|
425
|
+
end
|
426
|
+
end
|
427
|
+
|
428
|
+
# POST /manifestations
|
429
|
+
# POST /manifestations.json
|
430
|
+
def create
|
431
|
+
@manifestation = Manifestation.new(params[:manifestation])
|
432
|
+
@original_manifestation = Manifestation.where(:id => params[:manifestation_id]).first
|
433
|
+
unless @manifestation.original_title?
|
434
|
+
@manifestation.original_title = @manifestation.attachment_file_name
|
435
|
+
end
|
436
|
+
|
437
|
+
respond_to do |format|
|
438
|
+
if @manifestation.save
|
439
|
+
Manifestation.transaction do
|
440
|
+
if @original_manifestation
|
441
|
+
@manifestation.derived_manifestations << @original_manifestation
|
442
|
+
end
|
443
|
+
end
|
444
|
+
|
445
|
+
format.html { redirect_to @manifestation, :notice => t('controller.successfully_created', :model => t('activerecord.models.manifestation')) }
|
446
|
+
format.json { render :json => @manifestation, :status => :created, :location => @manifestation }
|
447
|
+
else
|
448
|
+
prepare_options
|
449
|
+
format.html { render :action => "new" }
|
450
|
+
format.json { render :json => @manifestation.errors, :status => :unprocessable_entity }
|
451
|
+
end
|
452
|
+
end
|
453
|
+
end
|
454
|
+
|
455
|
+
# PUT /manifestations/1
|
456
|
+
# PUT /manifestations/1.json
|
457
|
+
def update
|
458
|
+
respond_to do |format|
|
459
|
+
if @manifestation.update_attributes(params[:manifestation])
|
460
|
+
format.html { redirect_to @manifestation, :notice => t('controller.successfully_updated', :model => t('activerecord.models.manifestation')) }
|
461
|
+
format.json { head :no_content }
|
462
|
+
else
|
463
|
+
prepare_options
|
464
|
+
format.html { render :action => "edit" }
|
465
|
+
format.json { render :json => @manifestation.errors, :status => :unprocessable_entity }
|
466
|
+
end
|
467
|
+
end
|
468
|
+
end
|
469
|
+
|
470
|
+
# DELETE /manifestations/1
|
471
|
+
# DELETE /manifestations/1.json
|
472
|
+
def destroy
|
473
|
+
@manifestation.destroy
|
474
|
+
|
475
|
+
respond_to do |format|
|
476
|
+
format.html { redirect_to manifestations_url, :notice => t('controller.successfully_deleted', :model => t('activerecord.models.manifestation')) }
|
477
|
+
format.json { head :no_content }
|
478
|
+
end
|
479
|
+
end
|
480
|
+
|
481
|
+
private
|
482
|
+
|
483
|
+
def make_query(query, options = {})
|
484
|
+
# TODO: integerやstringもqfに含める
|
485
|
+
query = query.to_s.strip
|
486
|
+
|
487
|
+
if query.size == 1
|
488
|
+
query = "#{query}*"
|
489
|
+
end
|
490
|
+
|
491
|
+
if options[:mode] == 'recent'
|
492
|
+
query = "#{query} created_at_d:[NOW-1MONTH TO NOW]"
|
493
|
+
end
|
494
|
+
|
495
|
+
#unless options[:carrier_type].blank?
|
496
|
+
# query = "#{query} carrier_type_s:#{options[:carrier_type]}"
|
497
|
+
#end
|
498
|
+
|
499
|
+
#unless options[:library].blank?
|
500
|
+
# library_list = options[:library].split.uniq.join(' and ')
|
501
|
+
# query = "#{query} library_sm:#{library_list}"
|
502
|
+
#end
|
503
|
+
|
504
|
+
#unless options[:language].blank?
|
505
|
+
# query = "#{query} language_sm:#{options[:language]}"
|
506
|
+
#end
|
507
|
+
|
508
|
+
#unless options[:subject].blank?
|
509
|
+
# query = "#{query} subject_sm:#{options[:subject]}"
|
510
|
+
#end
|
511
|
+
|
512
|
+
unless options[:tag].blank?
|
513
|
+
query = "#{query} tag_sm:#{options[:tag]}"
|
514
|
+
end
|
515
|
+
|
516
|
+
unless options[:creator].blank?
|
517
|
+
query = "#{query} creator_text:#{options[:creator]}"
|
518
|
+
end
|
519
|
+
|
520
|
+
unless options[:contributor].blank?
|
521
|
+
query = "#{query} contributor_text:#{options[:contributor]}"
|
522
|
+
end
|
523
|
+
|
524
|
+
unless options[:isbn].blank?
|
525
|
+
query = "#{query} isbn_sm:#{options[:isbn].gsub('-', '')}"
|
526
|
+
end
|
527
|
+
|
528
|
+
unless options[:issn].blank?
|
529
|
+
query = "#{query} issn_s:#{options[:issn].gsub('-', '')}"
|
530
|
+
end
|
531
|
+
|
532
|
+
unless options[:lccn].blank?
|
533
|
+
query = "#{query} lccn_s:#{options[:lccn]}"
|
534
|
+
end
|
535
|
+
|
536
|
+
unless options[:nbn].blank?
|
537
|
+
query = "#{query} nbn_s:#{options[:nbn]}"
|
538
|
+
end
|
539
|
+
|
540
|
+
unless options[:publisher].blank?
|
541
|
+
query = "#{query} publisher_text:#{options[:publisher]}"
|
542
|
+
end
|
543
|
+
|
544
|
+
unless options[:item_identifier].blank?
|
545
|
+
query = "#{query} item_identifier_sm:#{options[:item_identifier]}"
|
546
|
+
end
|
547
|
+
|
548
|
+
unless options[:number_of_pages_at_least].blank? and options[:number_of_pages_at_most].blank?
|
549
|
+
number_of_pages = {}
|
550
|
+
number_of_pages[:at_least] = options[:number_of_pages_at_least].to_i
|
551
|
+
number_of_pages[:at_most] = options[:number_of_pages_at_most].to_i
|
552
|
+
number_of_pages[:at_least] = "*" if number_of_pages[:at_least] == 0
|
553
|
+
number_of_pages[:at_most] = "*" if number_of_pages[:at_most] == 0
|
554
|
+
|
555
|
+
query = "#{query} number_of_pages_i:[#{number_of_pages[:at_least]} TO #{number_of_pages[:at_most]}]"
|
556
|
+
end
|
557
|
+
|
558
|
+
query = set_pub_date(query, options)
|
559
|
+
query = set_acquisition_date(query, options)
|
560
|
+
|
561
|
+
query = query.strip
|
562
|
+
if query == '[* TO *]'
|
563
|
+
# unless params[:advanced_search]
|
564
|
+
query = ''
|
565
|
+
# end
|
566
|
+
end
|
567
|
+
|
568
|
+
return query
|
569
|
+
end
|
570
|
+
|
571
|
+
def set_search_result_order(sort_by, order)
|
572
|
+
sort = {}
|
573
|
+
# TODO: ページ数や大きさでの並べ替え
|
574
|
+
case sort_by
|
575
|
+
when 'title'
|
576
|
+
sort[:sort_by] = 'sort_title'
|
577
|
+
sort[:order] = 'asc'
|
578
|
+
when 'pub_date'
|
579
|
+
sort[:sort_by] = 'date_of_publication'
|
580
|
+
sort[:order] = 'desc'
|
581
|
+
else
|
582
|
+
# デフォルトの並び方
|
583
|
+
sort[:sort_by] = 'created_at'
|
584
|
+
sort[:order] = 'desc'
|
585
|
+
end
|
586
|
+
if order == 'asc'
|
587
|
+
sort[:order] = 'asc'
|
588
|
+
elsif order == 'desc'
|
589
|
+
sort[:order] = 'desc'
|
590
|
+
end
|
591
|
+
sort
|
592
|
+
end
|
593
|
+
|
594
|
+
def render_mode(mode)
|
595
|
+
case mode
|
596
|
+
when 'holding'
|
597
|
+
render :partial => 'manifestations/show_holding', :locals => {:manifestation => @manifestation}
|
598
|
+
when 'barcode'
|
599
|
+
if defined?(EnjuBarcode)
|
600
|
+
barcode = Barby::QrCode.new(@manifestation.id)
|
601
|
+
send_data(barcode.to_svg, :disposition => 'inline', :type => 'image/svg+xml')
|
602
|
+
end
|
603
|
+
when 'tag_edit'
|
604
|
+
if defined?(EnjuBookmark)
|
605
|
+
render :partial => 'manifestations/tag_edit', :locals => {:manifestation => @manifestation}
|
606
|
+
end
|
607
|
+
when 'tag_list'
|
608
|
+
if defined?(EnjuBookmark)
|
609
|
+
render :partial => 'manifestations/tag_list', :locals => {:manifestation => @manifestation}
|
610
|
+
end
|
611
|
+
when 'show_index'
|
612
|
+
render :partial => 'manifestations/show_index', :locals => {:manifestation => @manifestation}
|
613
|
+
when 'show_creators'
|
614
|
+
render :partial => 'manifestations/show_creators', :locals => {:manifestation => @manifestation}
|
615
|
+
when 'show_all_creators'
|
616
|
+
render :partial => 'manifestations/show_creators', :locals => {:manifestation => @manifestation}
|
617
|
+
when 'pickup'
|
618
|
+
render :partial => 'manifestations/pickup', :locals => {:manifestation => @manifestation}
|
619
|
+
when 'calil_list'
|
620
|
+
if defined?(EnjuCalil)
|
621
|
+
render :partial => 'manifestations/calil_list', :locals => {:manifestation => @manifestation}
|
622
|
+
end
|
623
|
+
else
|
624
|
+
false
|
625
|
+
end
|
626
|
+
end
|
627
|
+
|
628
|
+
def prepare_options
|
629
|
+
@carrier_types = CarrierType.all
|
630
|
+
@content_types = ContentType.all
|
631
|
+
@roles = Role.all
|
632
|
+
@languages = Language.all_cache
|
633
|
+
@frequencies = Frequency.all
|
634
|
+
@nii_types = NiiType.all if defined?(NiiType)
|
635
|
+
end
|
636
|
+
|
637
|
+
def get_index_patron
|
638
|
+
patron = {}
|
639
|
+
case
|
640
|
+
when params[:patron_id]
|
641
|
+
patron[:patron] = Patron.find(params[:patron_id])
|
642
|
+
when params[:creator_id]
|
643
|
+
patron[:creator] = Patron.find(params[:creator_id])
|
644
|
+
when params[:contributor_id]
|
645
|
+
patron[:contributor] = Patron.find(params[:contributor_id])
|
646
|
+
when params[:publisher_id]
|
647
|
+
patron[:publisher] = Patron.find(params[:publisher_id])
|
648
|
+
end
|
649
|
+
patron
|
650
|
+
end
|
651
|
+
|
652
|
+
def set_reservable
|
653
|
+
case params[:reservable].to_s
|
654
|
+
when 'true'
|
655
|
+
@reservable = true
|
656
|
+
when 'false'
|
657
|
+
@reservable = false
|
658
|
+
else
|
659
|
+
@reservable = nil
|
660
|
+
end
|
661
|
+
end
|
662
|
+
|
663
|
+
def set_pub_date(query, options)
|
664
|
+
unless options[:pub_date_from].blank? and options[:pub_date_to].blank?
|
665
|
+
options[:pub_date_from].to_s.gsub!(/\D/, '')
|
666
|
+
options[:pub_date_to].to_s.gsub!(/\D/, '')
|
667
|
+
|
668
|
+
pub_date = {}
|
669
|
+
if options[:pub_date_from].blank?
|
670
|
+
pub_date[:from] = "*"
|
671
|
+
else
|
672
|
+
pub_date[:from] = Time.zone.parse(options[:pub_date_from]).beginning_of_day.utc.iso8601 rescue nil
|
673
|
+
unless pub_date[:from]
|
674
|
+
pub_date[:from] = Time.zone.parse(Time.mktime(options[:pub_date_from]).to_s).beginning_of_day.utc.iso8601
|
675
|
+
end
|
676
|
+
end
|
677
|
+
|
678
|
+
if options[:pub_date_to].blank?
|
679
|
+
pub_date[:to] = "*"
|
680
|
+
else
|
681
|
+
pub_date[:to] = Time.zone.parse(options[:pub_date_to]).end_of_day.utc.iso8601 rescue nil
|
682
|
+
unless pub_date[:to]
|
683
|
+
pub_date[:to] = Time.zone.parse(Time.mktime(options[:pub_date_to]).to_s).end_of_year.utc.iso8601
|
684
|
+
end
|
685
|
+
end
|
686
|
+
query = "#{query} date_of_publication_d:[#{pub_date[:from]} TO #{pub_date[:to]}]"
|
687
|
+
end
|
688
|
+
query
|
689
|
+
end
|
690
|
+
|
691
|
+
def set_acquisition_date(query, options)
|
692
|
+
unless options[:acquired_from].blank? and options[:acquired_to].blank?
|
693
|
+
options[:acquired_from].to_s.gsub!(/\D/, '')
|
694
|
+
options[:acquired_to].to_s.gsub!(/\D/, '')
|
695
|
+
|
696
|
+
acquisition_date = {}
|
697
|
+
if options[:acquired_from].blank?
|
698
|
+
acquisition_date[:from] = "*"
|
699
|
+
else
|
700
|
+
acquisition_date[:from] = Time.zone.parse(options[:acquired_from]).beginning_of_day.utc.iso8601 rescue nil
|
701
|
+
unless acquisition_date[:from]
|
702
|
+
acquisition_date[:from] = Time.zone.parse(Time.mktime(options[:acquired_from]).to_s).beginning_of_day.utc.iso8601
|
703
|
+
end
|
704
|
+
end
|
705
|
+
|
706
|
+
if options[:acquired_to].blank?
|
707
|
+
acquisition_date[:to] = "*"
|
708
|
+
else
|
709
|
+
acquisition_date[:to] = Time.zone.parse(options[:acquired_to]).end_of_day.utc.iso8601 rescue nil
|
710
|
+
unless acquisition_date[:to]
|
711
|
+
acquisition_date[:to] = Time.zone.parse(Time.mktime(options[:acquired_to]).to_s).end_of_year.utc.iso8601
|
712
|
+
end
|
713
|
+
end
|
714
|
+
query = "#{query} acquired_at_d:[#{acquisition_date[:from]} TO #{acquisition_date[:to]}]"
|
715
|
+
end
|
716
|
+
query
|
717
|
+
end
|
718
|
+
|
719
|
+
def set_title
|
720
|
+
if @series_statement
|
721
|
+
@manifestation.set_series_statement(@series_statement)
|
722
|
+
elsif @original_manifestation
|
723
|
+
@manifestation.original_title = @original_manifestation.original_title
|
724
|
+
@manifestation.title_transcription = @original_manifestation.title_transcription
|
725
|
+
end
|
726
|
+
end
|
727
|
+
end
|