enju_biblio 0.1.0.pre59 → 0.1.0.pre60
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/agents_controller.rb +9 -13
- data/app/controllers/items_controller.rb +2 -2
- data/app/controllers/manifestations_controller.rb +25 -25
- data/app/controllers/picture_files_controller.rb +3 -3
- data/app/helpers/picture_files_helper.rb +4 -4
- data/app/models/agent_import_file.rb +13 -11
- data/app/models/agent_merge_list.rb +4 -4
- data/app/models/item.rb +3 -3
- data/app/models/language.rb +1 -1
- data/app/models/manifestation.rb +1 -0
- data/app/models/produce.rb +1 -1
- data/app/models/resource_export_file.rb +1 -0
- data/app/models/resource_import_file.rb +8 -5
- data/app/views/agent_merge_lists/edit.html.erb +2 -2
- data/app/views/agent_merge_lists/index.html.erb +2 -2
- data/app/views/agent_merge_lists/new.html.erb +2 -2
- data/app/views/agent_merge_lists/show.html.erb +2 -2
- data/app/views/agent_merges/edit.html.erb +2 -2
- data/app/views/agent_merges/index.html.erb +2 -2
- data/app/views/agent_merges/new.html.erb +2 -2
- data/app/views/agent_merges/show.html.erb +2 -2
- data/app/views/agent_types/index.html.erb +1 -1
- data/app/views/agents/_form.html.erb +3 -3
- data/app/views/agents/_index_expression.html.erb +1 -1
- data/app/views/agents/_index_work.html.erb +1 -1
- data/app/views/agents/index.html.erb +1 -1
- data/app/views/creates/_index_agent.html.erb +2 -2
- data/app/views/creates/index.html.erb +2 -2
- data/app/views/items/_shelf_picture.html.erb +2 -2
- data/app/views/items/_shelf_picture.mobile.erb +2 -2
- data/app/views/manifestations/_show.mods.builder +6 -6
- data/app/views/manifestations/_show.rdf.builder +6 -6
- data/app/views/picture_files/index.html.erb +1 -1
- data/app/views/produces/index.html.erb +1 -1
- data/app/views/realizes/index.html.erb +2 -2
- data/app/views/series_statement_merge_lists/edit.html.erb +2 -2
- data/app/views/series_statement_merge_lists/index.html.erb +2 -2
- data/app/views/series_statement_merge_lists/new.html.erb +2 -2
- data/app/views/series_statement_merge_lists/show.html.erb +2 -2
- data/app/views/series_statement_merges/edit.html.erb +2 -2
- data/app/views/series_statement_merges/index.html.erb +2 -2
- data/app/views/series_statement_merges/new.html.erb +2 -2
- data/app/views/series_statement_merges/show.html.erb +2 -2
- data/config/locales/translation_en.yml +4 -4
- data/config/locales/translation_ja.yml +4 -4
- data/config/routes.rb +0 -1
- data/lib/enju_biblio/engine.rb +2 -0
- data/lib/enju_biblio/version.rb +1 -1
- data/spec/cassette_library/ImportRequest/import/should_import_bibliographic_record.yml +428 -403
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_isbn_which_is_already_imported/redirects_to_the_created_import_request.yml +367 -379
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_valid_params/assigns_a_newly_created_import_request_as_import_request.yml +368 -380
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_valid_params/redirects_to_the_created_import_request.yml +366 -378
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/assigns_a_newly_created_import_request_as_import_request.yml +366 -378
- data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/redirects_to_the_created_import_request.yml +368 -380
- data/spec/cassette_library/ResourceImportFile/should_import_in_background.yml +47 -51
- data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_has_only_isbn/should_be_imported.yml +386 -370
- data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_shift_jis/should_be_imported.yml +49 -53
- data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_be_imported.yml +49 -53
- data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_send_message_when_import_is_completed.yml +50 -52
- data/spec/controllers/agent_import_files_controller_spec.rb +1 -1
- data/spec/controllers/agent_merges_controller_spec.rb +2 -2
- data/spec/controllers/agent_relationships_controller_spec.rb +4 -4
- data/spec/controllers/carrier_types_controller_spec.rb +1 -1
- data/spec/controllers/creates_controller_spec.rb +4 -4
- data/spec/controllers/import_requests_controller_spec.rb +2 -2
- data/spec/controllers/manifestation_relationships_controller_spec.rb +4 -4
- data/spec/controllers/picture_files_controller_spec.rb +4 -4
- data/spec/controllers/series_statement_merges_controller_spec.rb +2 -2
- data/spec/dummy/config/boot.rb +2 -2
- data/spec/dummy/config/initializers/friendly_id.rb +90 -0
- data/spec/dummy/config/routes.rb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20140821151023_create_colors.rb +14 -0
- data/spec/dummy/db/schema.rb +11 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/private/system/agent_import_files/agent_imports/000/000/004/original/agent_import_file_sample2.tsv +5 -8
- data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/005/original/isbn_sample.txt +3 -0
- data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/005/original/item_delete_file.tsv +11 -0
- data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/005/original/item_update_file.tsv +5 -0
- data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/005/original/resource_import_file_sample1.tsv +21 -0
- data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/005/original/resource_import_file_sample2.tsv +21 -0
- data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/005/original/update_series_statement.tsv +2 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140702-50651-14mi4s9.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140702-50742-1fdbjo6.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140704-12784-ozvvo.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140705-18550-cc3qx2.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140705-19313-rlc624.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140705-20440-1o0htch.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140705-28145-o9qcd4.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140722-98727-1jesse9.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140816-17115-1c1tv13.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140816-18348-14d01b3.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-53863-1jz1wlr.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-55246-1rvhs1s.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-60268-1psjqua.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-60996-1cy28m2.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-67507-19qjhj3.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-69234-1cllrec.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-76875-1os6joy.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-1148-136brhb.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-473-1c326dm.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-93795-1x882ik.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-94274-1xr9d9e.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-94643-1fjcept.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-97947-mfqh5b.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-98488-126cvb4.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-98849-1lg47mm.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140820-19805-1p3heid.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140823-19171-195vl18.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140823-24110-2wemza.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140823-24478-1rqkpll.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140823-24833-1fntwk6.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140823-29350-iur7lj.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140823-30228-of1sjk.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140823-30991-ms017y.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/{resource_export_file_20140824-71278-o9rcl2.txt → resource_export_file_20140915-63442-scn8od.txt} +0 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/{resource_export_file_20140824-76052-14e2vr0.txt → resource_export_file_20140915-63958-4qz9os.txt} +0 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140921-56515-11jgy6r.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140921-57036-1opk8n4.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140921-78112-1eqhp8c.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140922-79341-gwp7yl.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140922-81494-1gel4gw.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140922-81864-1agnhn5.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140922-86803-vwti58.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140922-87377-hsgr6g.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140922-87799-1u21frt.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140927-1491-aa9gnz.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140927-16368-smpqon.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20141001-47075-1ok3w6c.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20141001-47518-1b5vwo.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20141001-48049-bvmbrd.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20141001-52685-15ksnld.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20141001-53041-111y1ft.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20141003-78308-1277797.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20141003-83448-1lr67op.txt +147 -0
- data/spec/dummy/solr/default/data/index/segments.gen +0 -0
- data/spec/dummy/solr/default/data/index/segments_1 +0 -0
- data/spec/dummy/solr/test/data/index/segments.gen +0 -0
- data/spec/dummy/solr/test/data/index/segments_9ue +0 -0
- data/spec/dummy/solr/test/data/tlog/{tlog.0000000000000005178 → tlog.0000000000000012751} +0 -0
- data/spec/dummy/solr/test/data/tlog/{tlog.0000000000000005179 → tlog.0000000000000012752} +0 -0
- data/spec/dummy/solr/test/data/tlog/{tlog.0000000000000005180 → tlog.0000000000000012753} +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000012754 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000012755 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000012756 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/006a5adcd278a9c5c9df80a7a2b414e6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/00a6cf2442f0e06a50f5c5f44d7aff65 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/{9c500035359d42d1d6eb3152407753da → 016f86e39ffdee229513e167e190373b} +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/05f72c583123850e7713799db24b8697 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/15c63c779d77f568944696ca9fb59a78 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/{ea20f8df525b74f3cb6581c9c8c10831 → 1867899076fb1e0b90ad8e952258ceb6} +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1ceecf05e4ceca986935ce907a215db8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2949dd35829c9ab495755e90c2b8d04e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/36313cc65eb9cf1e2e3e4966e4369218 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/39f93c92c6d9a659893c5bb606288695 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4ad82a84d06e894ca28fdb88d8ff674e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/{5401d1bbdbcca869f9ec530be8954c7b → 4ecf36f5d128c6330e7bc2e85ea7945e} +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5528932a185aa7fe1fdf6134edb1d587 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/594720ac03214ad6fdef3c5d2b9dfb38 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5c2c7b9031d58985499b9a301f1b2c8b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5fbec17e2971d733f33cd80aa7ca044b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/67565528560062a46655ddd9d226e508 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6f790d63a397ed071913413ba89b8063 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/{4d6ee78c9b5a731d2770590bdca965db → 745924db42b40105e420b9b2c58f5fb5} +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/75678ce109514b0cdad8a78502a216f8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/75a69bb28a2f0aac5401bd0e5f65effc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/{768618b68fc55616affb09d1366839bf → 78d9e6b88dd9b2d16ba27b6817de761f} +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7f32d8eff550af4e90c3b1b70cb758ef +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/{ffb98f25d690ed017b364714434126e5 → 90453e0e28686c374df46268d089c661} +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/91738506ff9b460e5506c884c305060d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/{120d4c2662a2d695d86719703963cbc2 → a610938f83f00918342e4d967261dfdb} +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b749443539804a92c3f81f954b738205 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/bfe2ae17cc46ad37422059d62e8e0b10 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c2e04ddf9cd817354d17c2fad3896bdb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c435e3bb82d15fc22ac6f75d891939d7 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/{524145c58d27d8645853427057c8e352 → c825eb1005e380e6621e279944105c3a} +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/{5657f9c72ff547052db9db89e95d1758 → d64f6a19d7d6eae24ba85799e805881a} +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/dd2cea0e7f54f6d71643516c361b0b4b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/{94fe70b1fcf11d0f4ba62fd956b13410 → ea46ac214596411ffb5b765d5cabb383} +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/eac329fd2902cb11c57212facfa7dc66 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/{8c36936509297e044c5353b3c57148f9 → fa36be28948b64b82117be61d1712366} +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/{9a11ac4cf3c8597981773b8ea1c36659 → fa4b5ef72fdd7177be700d42fed03757} +0 -0
- data/spec/dummy/tmp/cache/stdout +140 -238
- data/spec/dummy/tmp/pids/redis-test.pid +1 -1
- data/spec/factories/create_types.rb +1 -1
- data/spec/factories/produce_types.rb +1 -1
- data/spec/factories/realize_types.rb +1 -1
- data/spec/fixtures/medium_of_performances.yml +2 -2
- data/spec/fixtures/users.yml +1 -1
- data/spec/models/agent_import_file_spec.rb +2 -1
- data/spec/models/resource_import_file_spec.rb +5 -4
- data/spec/spec_helper.rb +1 -1
- metadata +239 -251
- data/spec/dummy/solr/default/data/index/_n.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_n.fdx +0 -0
- data/spec/dummy/solr/default/data/index/_n.fnm +0 -0
- data/spec/dummy/solr/default/data/index/_n.nvd +0 -0
- data/spec/dummy/solr/default/data/index/_n.nvm +0 -0
- data/spec/dummy/solr/default/data/index/_n.si +0 -0
- data/spec/dummy/solr/default/data/index/_n_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/default/data/index/_n_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/default/data/index/_n_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/default/data/index/_n_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/default/data/index/_o.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_o.fdx +0 -0
- data/spec/dummy/solr/default/data/index/_o.fnm +0 -0
- data/spec/dummy/solr/default/data/index/_o.nvd +0 -0
- data/spec/dummy/solr/default/data/index/_o.nvm +0 -0
- data/spec/dummy/solr/default/data/index/_o.si +0 -0
- data/spec/dummy/solr/default/data/index/_o_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/default/data/index/_o_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/default/data/index/_o_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/default/data/index/_o_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/default/data/index/segments_15 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000030 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000031 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000032 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000033 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000034 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000035 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000036 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000037 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000038 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000039 +0 -0
- data/spec/dummy/solr/test/data/index/segments_401 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000005181 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000005182 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000005183 +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/dummy/tmp/cache/ACB/B20/manifestation_search_total +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/016035697c13f20f5d2b52792d85c604 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/016f9220091ee2a634e3a6c7fbe9c147 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/052185a11dac17697ab8119d0eae969d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/091f6b71beeef71345e4cb87e0e0f60e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0e3e358e4fe4601ba5e435f6d0c86f12 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/11bb992144d5d72e1251e5d4cf370f86 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/12c4795597f72ed1be53a24203b9605a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1462d348fc6af4ed5164bd969f65ef40 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1ba5d9cae60d012a67e6c857c0f5aa3c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1c1fbab93e4552626da626e0dbe70c74 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/27e1b4616976bb325e2963da52263610 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/29755b7a6522fd2bd21a5821dcc1024c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2a4804739761c332dbea9b545ebdc90b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3013236b88f48eb1a0e36f7ce20e9278 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/306cf2727f2c4d5bcc3318fdf704f9f8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3137d593e6b38d7364165258707ba168 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3417713460df81bb2349531adec5f348 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3ef32f79b6e9b4487b09c38d17e96c5b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/45f3c74e1e31b58d9bda6908d5623290 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4982460b51d59b2a6ca1a2a62f578883 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4c00935da384db345e9d75e427a6ecfd +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4ec967e0b0aa8965b00d8d02580cb1e8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/53f3ea63c7f59d989da4e7299c5ebef6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5762cca052dd5d3eb8bb35e2ed9a59b8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5e6bfa8ff735312df3c6e3ab5e4544dd +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/617d3692a7e14d57d7d7c18e62988c56 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6a45e3c9461983dc78a7a4f06326d98a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6ef07ba38c3fb7876f0dd5a9580ddb09 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/726c9190898ab9d89a285df9f73fc835 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7cf6f7130d3eca66452321d70d360864 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7e097aef96e9d7a3f16e013b6f612b68 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/84c8a64682205dba3f8edd60fc1ec8e5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8fe57feab5051fd40f4878b7a740486f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/9757a9437821225e1c033c19725d7f29 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/9872a7a2c1dbfa71b55ebcf97dfa07b1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/9ad166e60e3d477c78328181979a7b77 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a0d32bfbf69edb9affa96b926037041a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/aa0c14240f47d6746cd5d3bf2fe4b936 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/aff11c6f1bdcce6d91baf69968f93ad6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b1cfee6085e55e41f311c5dfeda8661b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b4125d2c5630528bd1587b244a3303d6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b4857dbfaac3e3d5aeb45b1beff2b88b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b4f5eca040699a5d38403ce80236bc12 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b530f21ccf5882027bf2aff5502dc79e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b6fec44e6e93be3375951dad4faa2c14 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b943165df1109f3c68280a04e5e960f8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c48a5c8c0b091de16e629df2f6145f67 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c5602b825ee6f6e1946e61a5c607d444 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ca2bbe58fd1ca1ca98a242a18b3f4ef3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cdad6edc528defc97cc803f9b28f4a71 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cfb9cef7d320ba59870855aa2306bddd +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d626bad4b5037b4ffa8b7f7d15d76a53 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d648a0b0abb7fd7ff579d72ffe033d50 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d8e283e15fd77782ae12f9b18e5be456 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ddcad094e1d77a1ec8d17b77f1161b47 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e18b88fcf05f32d6b7e22c426144a580 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e1cad328d04e160bea05772ab16eacbc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e1fcfb0faa3c12467a1c35251e04c8b1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e52bd8c13070b84565f76938fe68458c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f02885699e51e1515eb7fd0a2f17cef7 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f6a963700cd75861fcdc6fd9474e5e77 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f70653c23b5a12c74bf82c0e9afe906b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/fb4d31a0ce2d585e276e7e5fc9407aba +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ffb3c7ae1ec3a76cac3e94303559fe51 +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77e66722d8f410327b55342e07cc4b22dc248689
|
4
|
+
data.tar.gz: bf6130dc2db15b7f330b4c1144ce7d533878e46e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4450a5220552ed75a7336f672ba935b2336e9165553c2ecc78c227f53a7e3ea74b6a3c48007f81847c914439c2ddfb76fd16acf09aba81171ec09df6ffbb99ae
|
7
|
+
data.tar.gz: 69a0a4f258bbdf77d691ecd8fae88f67f8cdbcae6a0c6fd5a5d00844db90424d98c9665a576e7b550fa3240cbd49328ae75bd9d532c80583ed986923e560f1c7
|
@@ -12,10 +12,6 @@ class AgentsController < ApplicationController
|
|
12
12
|
# GET /agents
|
13
13
|
# GET /agents.json
|
14
14
|
def index
|
15
|
-
#session[:params] = {} unless session[:params]
|
16
|
-
#session[:params][:agent] = params
|
17
|
-
# 最近追加されたパトロン
|
18
|
-
#@query = params[:query] ||= "[* TO *]"
|
19
15
|
if params[:mode] == 'add'
|
20
16
|
unless current_user.try(:has_role?, 'Librarian')
|
21
17
|
access_denied; return
|
@@ -32,7 +28,7 @@ class AgentsController < ApplicationController
|
|
32
28
|
order = nil
|
33
29
|
@count = {}
|
34
30
|
|
35
|
-
search = Agent.search(:
|
31
|
+
search = Agent.search(include: [:agent_type, :required_role])
|
36
32
|
search.data_accessor_for(Agent).select = [
|
37
33
|
:id,
|
38
34
|
:full_name,
|
@@ -79,11 +75,11 @@ class AgentsController < ApplicationController
|
|
79
75
|
search.query.paginate(page, Agent.default_per_page)
|
80
76
|
@agents = search.execute!.results
|
81
77
|
|
82
|
-
flash[:page_info] = {:
|
78
|
+
flash[:page_info] = { page: page, query: query }
|
83
79
|
|
84
80
|
respond_to do |format|
|
85
81
|
format.html # index.html.erb
|
86
|
-
format.xml { render :
|
82
|
+
format.xml { render xml: @agents }
|
87
83
|
format.rss { render layout: false }
|
88
84
|
format.atom
|
89
85
|
format.json { render json: @agents }
|
@@ -112,17 +108,17 @@ class AgentsController < ApplicationController
|
|
112
108
|
@works = Manifestation.search do
|
113
109
|
with(:creator_ids).equal_to agent.id
|
114
110
|
with(:required_role_id).less_than_or_equal_to role.id
|
115
|
-
paginate :
|
111
|
+
paginate page: params[:work_list_page], per_page: Manifestation.default_per_page
|
116
112
|
end.results
|
117
113
|
@expressions = Manifestation.search do
|
118
114
|
with(:contributor_ids).equal_to agent.id
|
119
115
|
with(:required_role_id).less_than_or_equal_to role.id
|
120
|
-
paginate :
|
116
|
+
paginate page: params[:expression_list_page], per_page: Manifestation.default_per_page
|
121
117
|
end.results
|
122
118
|
@manifestations = Manifestation.search do
|
123
119
|
with(:publisher_ids).equal_to agent.id
|
124
120
|
with(:required_role_id).less_than_or_equal_to role.id
|
125
|
-
paginate :
|
121
|
+
paginate page: params[:manifestation_list_page], per_page: Manifestation.default_per_page
|
126
122
|
end.results
|
127
123
|
|
128
124
|
respond_to do |format|
|
@@ -138,7 +134,7 @@ class AgentsController < ApplicationController
|
|
138
134
|
def new
|
139
135
|
@agent = Agent.new
|
140
136
|
@agent.required_role = Role.where(name: 'Guest').first
|
141
|
-
@agent.language = Language.where(:
|
137
|
+
@agent.language = Language.where(iso_639_1: I18n.default_locale.to_s).first || Language.first
|
142
138
|
@agent.country = current_user.profile.library.country
|
143
139
|
prepare_options
|
144
140
|
|
@@ -217,7 +213,7 @@ class AgentsController < ApplicationController
|
|
217
213
|
@countries = Country.all_cache
|
218
214
|
@agent_types = AgentType.all
|
219
215
|
@roles = Role.all
|
220
|
-
@languages = Language.
|
221
|
-
@agent_type = AgentType.where(name: '
|
216
|
+
@languages = Language.all
|
217
|
+
@agent_type = AgentType.where(name: 'person').first
|
222
218
|
end
|
223
219
|
end
|
@@ -116,7 +116,7 @@ class ItemsController < ApplicationController
|
|
116
116
|
end
|
117
117
|
end
|
118
118
|
|
119
|
-
flash[:page_info] = {:
|
119
|
+
flash[:page_info] = { page: page, query: query }
|
120
120
|
|
121
121
|
respond_to do |format|
|
122
122
|
format.html # index.html.erb
|
@@ -250,7 +250,7 @@ class ItemsController < ApplicationController
|
|
250
250
|
def prepare_options
|
251
251
|
@libraries = Library.real << Library.web
|
252
252
|
if @item.new_record?
|
253
|
-
@library = Library.real.
|
253
|
+
@library = Library.real.includes(:shelves).order(:position).first
|
254
254
|
else
|
255
255
|
@library = @item.shelf.library
|
256
256
|
end
|
@@ -53,10 +53,10 @@ class ManifestationsController < ApplicationController
|
|
53
53
|
@manifestation = Manifestation.find_by_oai_identifier(params[:identifier])
|
54
54
|
rescue ActiveRecord::RecordNotFound
|
55
55
|
@oai[:errors] << "idDoesNotExist"
|
56
|
-
render :
|
56
|
+
render formats: :oai, layout: false
|
57
57
|
return
|
58
58
|
end
|
59
|
-
render template: 'manifestations/show', :
|
59
|
+
render template: 'manifestations/show', formats: :oai, layout: false
|
60
60
|
return
|
61
61
|
end
|
62
62
|
end
|
@@ -98,7 +98,7 @@ class ManifestationsController < ApplicationController
|
|
98
98
|
|
99
99
|
includes = [:carrier_type, :series_statements]
|
100
100
|
includes << :bookmarks if defined?(EnjuBookmark)
|
101
|
-
search = Manifestation.search(:
|
101
|
+
search = Manifestation.search(include: includes)
|
102
102
|
role = current_user.try(:role) || Role.default_role
|
103
103
|
case @reservable
|
104
104
|
when 'true'
|
@@ -113,7 +113,7 @@ class ManifestationsController < ApplicationController
|
|
113
113
|
@index_agent = agent
|
114
114
|
manifestation = @manifestation if @manifestation
|
115
115
|
series_statement = @series_statement if @series_statement
|
116
|
-
parent = @parent = Manifestation.where(:
|
116
|
+
parent = @parent = Manifestation.where(id: params[:parent_id]).first if params[:parent_id].present?
|
117
117
|
|
118
118
|
if defined?(EnjuSubject)
|
119
119
|
subject = @subject if @subject
|
@@ -209,7 +209,7 @@ class ManifestationsController < ApplicationController
|
|
209
209
|
else
|
210
210
|
flash[:search_query] = @search_query
|
211
211
|
@manifestation_ids = search.build do
|
212
|
-
paginate :
|
212
|
+
paginate page: 1, per_page: Setting.max_number_of_results
|
213
213
|
end.execute.raw_results.collect(&:primary_key).map{|id| id.to_i}
|
214
214
|
end
|
215
215
|
end
|
@@ -218,11 +218,11 @@ class ManifestationsController < ApplicationController
|
|
218
218
|
if params[:view] == 'tag_cloud'
|
219
219
|
unless @manifestation_ids
|
220
220
|
@manifestation_ids = search.build do
|
221
|
-
paginate :
|
221
|
+
paginate page: 1, per_page: Setting.max_number_of_results
|
222
222
|
end.execute.raw_results.collect(&:primary_key).map{|id| id.to_i}
|
223
223
|
end
|
224
|
-
#bookmark_ids = Bookmark.where(:
|
225
|
-
bookmark_ids = Bookmark.where(:
|
224
|
+
#bookmark_ids = Bookmark.where(manifestation_id: flash[:manifestation_ids]).limit(1000).pluck(:id)
|
225
|
+
bookmark_ids = Bookmark.where(manifestation_id: @manifestation_ids).limit(1000).pluck(:id)
|
226
226
|
@tags = Tag.bookmarked(bookmark_ids)
|
227
227
|
render partial: 'manifestations/tag_cloud'
|
228
228
|
return
|
@@ -258,9 +258,9 @@ class ManifestationsController < ApplicationController
|
|
258
258
|
facet :carrier_type
|
259
259
|
facet :library
|
260
260
|
facet :language
|
261
|
-
facet :pub_year, :
|
261
|
+
facet :pub_year, range: pub_date_range[:from]..pub_date_range[:to], range_interval: pub_year_range_interval
|
262
262
|
facet :subject_ids if defined?(EnjuSubject)
|
263
|
-
paginate :
|
263
|
+
paginate page: page.to_i, per_page: per_page
|
264
264
|
end
|
265
265
|
end
|
266
266
|
search_result = search.execute
|
@@ -270,7 +270,7 @@ class ManifestationsController < ApplicationController
|
|
270
270
|
max_count = @count[:query_result]
|
271
271
|
end
|
272
272
|
@manifestations = Kaminari.paginate_array(
|
273
|
-
search_result.results, :
|
273
|
+
search_result.results, total_count: max_count
|
274
274
|
).page(page)
|
275
275
|
|
276
276
|
if params[:format].blank? or params[:format] == 'html'
|
@@ -280,7 +280,7 @@ class ManifestationsController < ApplicationController
|
|
280
280
|
@pub_year_facet = search_result.facet(:pub_year).rows.reverse
|
281
281
|
end
|
282
282
|
|
283
|
-
@search_engines =
|
283
|
+
@search_engines = SearchEngine.order(:position)
|
284
284
|
|
285
285
|
if defined?(EnjuBookmark)
|
286
286
|
# TODO: 検索結果が少ない場合にも表示させる
|
@@ -318,7 +318,7 @@ class ManifestationsController < ApplicationController
|
|
318
318
|
respond_to do |format|
|
319
319
|
format.html
|
320
320
|
format.mobile
|
321
|
-
format.xml { render :
|
321
|
+
format.xml { render xml: @manifestations }
|
322
322
|
format.sru { render layout: false }
|
323
323
|
format.rss { render layout: false }
|
324
324
|
format.txt { render layout: false }
|
@@ -374,22 +374,22 @@ class ManifestationsController < ApplicationController
|
|
374
374
|
if @manifestation.series_master?
|
375
375
|
flash.keep(:notice) if flash[:notice]
|
376
376
|
flash[:manifestation_id] = @manifestation.id
|
377
|
-
redirect_to manifestations_url(:
|
377
|
+
redirect_to manifestations_url(parent_id: @manifestation.id)
|
378
378
|
return
|
379
379
|
end
|
380
380
|
|
381
381
|
if defined?(EnjuCirculation)
|
382
|
-
@reserved_count = Reserve.waiting.where(:
|
383
|
-
@reserve = current_user.reserves.where(:
|
382
|
+
@reserved_count = Reserve.waiting.where(manifestation_id: @manifestation.id, checked_out_at: nil).count
|
383
|
+
@reserve = current_user.reserves.where(manifestation_id: @manifestation.id).first if user_signed_in?
|
384
384
|
end
|
385
385
|
|
386
386
|
if defined?(EnjuQuestion)
|
387
|
-
@questions = @manifestation.questions(:
|
387
|
+
@questions = @manifestation.questions(user: current_user, page: params[:question_page])
|
388
388
|
end
|
389
389
|
|
390
390
|
if @manifestation.attachment.path
|
391
391
|
if Setting.uploaded_file.storage == :s3
|
392
|
-
data =
|
392
|
+
data = Faraday.get(@manifestation.attachment.url).body.force_encoding('UTF-8')
|
393
393
|
else
|
394
394
|
file = @manifestation.attachment.path
|
395
395
|
end
|
@@ -403,7 +403,7 @@ class ManifestationsController < ApplicationController
|
|
403
403
|
when 'related'
|
404
404
|
render template: 'manifestations/related'
|
405
405
|
else
|
406
|
-
render :
|
406
|
+
render xml: @manifestation
|
407
407
|
end
|
408
408
|
}
|
409
409
|
format.rdf
|
@@ -414,7 +414,7 @@ class ManifestationsController < ApplicationController
|
|
414
414
|
format.download {
|
415
415
|
if @manifestation.attachment.path
|
416
416
|
if Setting.uploaded_file.storage == :s3
|
417
|
-
send_data
|
417
|
+
send_data data, filename: File.basename(@manifestation.attachment_file_name), type: 'application/octet-stream'
|
418
418
|
else
|
419
419
|
if File.exist?(file) && File.file?(file)
|
420
420
|
send_file file, filename: File.basename(@manifestation.attachment_file_name), type: 'application/octet-stream'
|
@@ -434,8 +434,8 @@ class ManifestationsController < ApplicationController
|
|
434
434
|
# GET /manifestations/new.json
|
435
435
|
def new
|
436
436
|
@manifestation = Manifestation.new
|
437
|
-
@manifestation.language = Language.where(:
|
438
|
-
@parent = Manifestation.where(:
|
437
|
+
@manifestation.language = Language.where(iso_639_1: @locale).first
|
438
|
+
@parent = Manifestation.where(id: params[:parent_id]).first if params[:parent_id].present?
|
439
439
|
if @parent
|
440
440
|
@manifestation.parent_id = @parent.id
|
441
441
|
@manifestation.original_title = @parent.original_title
|
@@ -458,7 +458,7 @@ class ManifestationsController < ApplicationController
|
|
458
458
|
end
|
459
459
|
if defined?(EnjuBookmark)
|
460
460
|
if params[:mode] == 'tag_edit'
|
461
|
-
@bookmark = current_user.bookmarks.where(:
|
461
|
+
@bookmark = current_user.bookmarks.where(manifestation_id: @manifestation.id).first if @manifestation rescue nil
|
462
462
|
render partial: 'manifestations/tag_edit', locals: {manifestation: @manifestation}
|
463
463
|
end
|
464
464
|
store_location unless params[:mode] == 'tag_edit'
|
@@ -469,7 +469,7 @@ class ManifestationsController < ApplicationController
|
|
469
469
|
# POST /manifestations.json
|
470
470
|
def create
|
471
471
|
@manifestation = Manifestation.new(params[:manifestation])
|
472
|
-
parent = Manifestation.where(:
|
472
|
+
parent = Manifestation.where(id: @manifestation.parent_id).first
|
473
473
|
unless @manifestation.original_title?
|
474
474
|
@manifestation.original_title = @manifestation.attachment_file_name
|
475
475
|
end
|
@@ -654,7 +654,7 @@ class ManifestationsController < ApplicationController
|
|
654
654
|
when 'barcode'
|
655
655
|
if defined?(EnjuBarcode)
|
656
656
|
barcode = Barby::QrCode.new(@manifestation.id)
|
657
|
-
send_data(barcode.to_svg, :
|
657
|
+
send_data(barcode.to_svg, disposition: 'inline', type: 'image/svg+xml')
|
658
658
|
end
|
659
659
|
when 'tag_edit'
|
660
660
|
if defined?(EnjuBookmark)
|
@@ -31,7 +31,7 @@ class PictureFilesController < ApplicationController
|
|
31
31
|
|
32
32
|
if @picture_file.picture.path
|
33
33
|
if Setting.uploaded_file.storage == :s3
|
34
|
-
file =
|
34
|
+
file = Faraday.get(@picture_file.picture.expiring_url).body.force_encoding('UTF-8')
|
35
35
|
else
|
36
36
|
file = @picture_file.picture.path(size)
|
37
37
|
end
|
@@ -190,10 +190,10 @@ class PictureFilesController < ApplicationController
|
|
190
190
|
|
191
191
|
if @picture_file.picture.path
|
192
192
|
if Setting.uploaded_file.storage == :s3
|
193
|
-
send_data file, filename: File.basename(@picture_file.picture_file_name), type: @picture_file.picture_content_type, :
|
193
|
+
send_data file, filename: File.basename(@picture_file.picture_file_name), type: @picture_file.picture_content_type, disposition: disposition
|
194
194
|
else
|
195
195
|
if File.exist?(file) && File.file?(file)
|
196
|
-
send_file file, filename: File.basename(@picture_file.picture_file_name), type: @picture_file.picture_content_type, :
|
196
|
+
send_file file, filename: File.basename(@picture_file.picture_file_name), type: @picture_file.picture_content_type, disposition: disposition
|
197
197
|
end
|
198
198
|
end
|
199
199
|
end
|
@@ -1,15 +1,15 @@
|
|
1
1
|
module PictureFilesHelper
|
2
|
-
def show_image(picture_file, options = {:
|
2
|
+
def show_image(picture_file, options = {size: :medium})
|
3
3
|
case options[:size]
|
4
4
|
when :medium
|
5
5
|
if picture_file.picture.width.to_i >= 600
|
6
|
-
return image_tag picture_file_path(picture_file, :
|
6
|
+
return image_tag picture_file_path(picture_file, format: :download, size: :medium), alt: "*", width: picture_file.picture.width(:medium), height: picture_file.picture.height(:medium)
|
7
7
|
end
|
8
8
|
when :thumb
|
9
9
|
if picture_file.picture.width.to_i >= 100
|
10
|
-
return image_tag picture_file_path(picture_file, :
|
10
|
+
return image_tag picture_file_path(picture_file, format: :download, size: :thumb), alt: "*", width: picture_file.picture.width(:thumb), height: picture_file.picture.height(:thumb)
|
11
11
|
end
|
12
12
|
end
|
13
|
-
image_tag picture_file_path(picture_file, :
|
13
|
+
image_tag picture_file_path(picture_file, format: :download, size: :original), alt: "*", width: picture_file.picture.width, height: picture_file.picture.height
|
14
14
|
end
|
15
15
|
end
|
@@ -7,13 +7,13 @@ class AgentImportFile < ActiveRecord::Base
|
|
7
7
|
scope :stucked, -> { in_state(:pending).where('agent_import_files.created_at < ?', 1.hour.ago) }
|
8
8
|
|
9
9
|
if Setting.uploaded_file.storage == :s3
|
10
|
-
has_attached_file :agent_import, :
|
11
|
-
:
|
10
|
+
has_attached_file :agent_import, storage: :s3, s3_credentials: "#{Setting.amazon}",
|
11
|
+
s3_permissions: :private
|
12
12
|
else
|
13
13
|
has_attached_file :agent_import,
|
14
14
|
path: ":rails_root/private/system/:class/:attachment/:id_partition/:style/:filename"
|
15
15
|
end
|
16
|
-
validates_attachment_content_type :agent_import, :
|
16
|
+
validates_attachment_content_type :agent_import, content_type: [
|
17
17
|
'text/csv',
|
18
18
|
'text/plain',
|
19
19
|
'text/tab-separated-values',
|
@@ -51,19 +51,20 @@ class AgentImportFile < ActiveRecord::Base
|
|
51
51
|
|
52
52
|
def import
|
53
53
|
transition_to!(:started)
|
54
|
-
num = {:
|
55
|
-
row_num = 1
|
54
|
+
num = { agent_imported: 0, user_imported: 0, failed: 0 }
|
56
55
|
rows = open_import_file
|
57
56
|
field = rows.first
|
57
|
+
row_num = 1
|
58
58
|
if [field['first_name'], field['last_name'], field['full_name']].reject{|field| field.to_s.strip == ""}.empty?
|
59
59
|
raise "You should specify first_name, last_name or full_name in the first line"
|
60
60
|
end
|
61
61
|
#rows.shift
|
62
62
|
|
63
|
+
AgentImportResult.create!(agent_import_file_id: id, body: rows.headers.join("\t"))
|
63
64
|
rows.each do |row|
|
64
65
|
row_num += 1
|
66
|
+
import_result = AgentImportResult.create!(agent_import_file_id: id, body: row.fields.join("\t"))
|
65
67
|
next if row['dummy'].to_s.strip.present?
|
66
|
-
import_result = AgentImportResult.create!(:agent_import_file_id => self.id, body: row.fields.join("\t"))
|
67
68
|
|
68
69
|
agent = Agent.new
|
69
70
|
agent = set_agent_value(agent, row)
|
@@ -100,6 +101,7 @@ class AgentImportFile < ActiveRecord::Base
|
|
100
101
|
def modify
|
101
102
|
transition_to!(:started)
|
102
103
|
rows = open_import_file
|
104
|
+
rows.shift
|
103
105
|
row_num = 1
|
104
106
|
|
105
107
|
rows.each do |row|
|
@@ -130,6 +132,7 @@ class AgentImportFile < ActiveRecord::Base
|
|
130
132
|
def remove
|
131
133
|
transition_to!(:started)
|
132
134
|
rows = open_import_file
|
135
|
+
rows.shift
|
133
136
|
row_num = 1
|
134
137
|
|
135
138
|
rows.each do |row|
|
@@ -171,7 +174,6 @@ class AgentImportFile < ActiveRecord::Base
|
|
171
174
|
file = CSV.open(tempfile, col_sep: "\t")
|
172
175
|
header = file.first
|
173
176
|
rows = CSV.open(tempfile, headers: header, col_sep: "\t")
|
174
|
-
AgentImportResult.create!(:agent_import_file_id => self.id, body: header.join("\t"))
|
175
177
|
tempfile.close(true)
|
176
178
|
file.close
|
177
179
|
rows
|
@@ -202,13 +204,13 @@ class AgentImportFile < ActiveRecord::Base
|
|
202
204
|
|
203
205
|
#if row['username'].to_s.strip.blank?
|
204
206
|
agent.email = row['email'].to_s.strip
|
205
|
-
agent.required_role = Role.where(name: row['required_role'].to_s.strip.camelize).first || Role.
|
207
|
+
agent.required_role = Role.where(name: row['required_role'].to_s.strip.camelize).first || Role.where(name: 'Guest').first
|
206
208
|
#else
|
207
|
-
# agent.required_role = Role.where(name: row['required_role'].to_s.strip.camelize).first || Role.
|
209
|
+
# agent.required_role = Role.where(name: row['required_role'].to_s.strip.camelize).first || Role.where('Librarian').first
|
208
210
|
#end
|
209
211
|
language = Language.where(name: row['language'].to_s.strip.camelize).first
|
210
|
-
language = Language.where(:
|
211
|
-
language = Language.where(:
|
212
|
+
language = Language.where(iso_639_2: row['language'].to_s.strip.downcase).first unless language
|
213
|
+
language = Language.where(iso_639_1: row['language'].to_s.strip.downcase).first unless language
|
212
214
|
agent.language = language if language
|
213
215
|
country = Country.where(name: row['country'].to_s.strip).first
|
214
216
|
agent.country = country if country
|
@@ -8,10 +8,10 @@ class AgentMergeList < ActiveRecord::Base
|
|
8
8
|
|
9
9
|
def merge_agents(selected_agent)
|
10
10
|
self.agents.each do |agent|
|
11
|
-
Create.
|
12
|
-
Produce.
|
13
|
-
Own.
|
14
|
-
Donate.
|
11
|
+
Create.where(agent_id: selected_agent.id).update_all(agent_id: agent.id)
|
12
|
+
Produce.where(agent_id: selected_agent.id).update_all(agent_id: agent.id)
|
13
|
+
Own.where(agent_id: selected_agent.id).update_all(agent_id: agent.id)
|
14
|
+
Donate.where(agent_id: selected_agent.id).update_all(agent_id: agent.id)
|
15
15
|
agent.destroy unless agent == selected_agent
|
16
16
|
end
|
17
17
|
end
|
data/app/models/item.rb
CHANGED
@@ -12,8 +12,8 @@ class Item < ActiveRecord::Base
|
|
12
12
|
:manifestation_id, :library_id, :required_role_id,
|
13
13
|
:binding_item_identifier, :binding_call_number, :binded_at
|
14
14
|
scope :on_shelf, -> { where('shelf_id != 1') }
|
15
|
-
scope :on_web, -> { where(:
|
16
|
-
delegate :display_name, :
|
15
|
+
scope :on_web, -> { where(shelf_id: 1) }
|
16
|
+
delegate :display_name, to: :shelf, prefix: true
|
17
17
|
has_many :owns
|
18
18
|
has_many :agents, through: :owns
|
19
19
|
has_many :donates
|
@@ -30,7 +30,7 @@ class Item < ActiveRecord::Base
|
|
30
30
|
format: {with: /\A[0-9A-Za-z_]+\Z/}
|
31
31
|
validates :binding_item_identifier, allow_blank: true,
|
32
32
|
format: {with: /\A[0-9A-Za-z_]+\Z/}
|
33
|
-
validates :url, url: true, allow_blank: true, length: {:
|
33
|
+
validates :url, url: true, allow_blank: true, length: { maximum: 255 }
|
34
34
|
validates_date :acquired_at, allow_blank: true
|
35
35
|
|
36
36
|
normalize_attributes :item_identifier, :binding_item_identifier,
|
data/app/models/language.rb
CHANGED
@@ -28,7 +28,7 @@ class Language < ActiveRecord::Base
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def self.available_languages
|
31
|
-
Language.where(:
|
31
|
+
Language.where(iso_639_1: I18n.available_locales.map{|l| l.to_s}).order(:position)
|
32
32
|
end
|
33
33
|
|
34
34
|
private
|
data/app/models/manifestation.rb
CHANGED
data/app/models/produce.rb
CHANGED
@@ -3,7 +3,7 @@ class Produce < ActiveRecord::Base
|
|
3
3
|
belongs_to :agent
|
4
4
|
belongs_to :manifestation, touch: true
|
5
5
|
belongs_to :produce_type
|
6
|
-
delegate :original_title, :
|
6
|
+
delegate :original_title, to: :manifestation, prefix: true
|
7
7
|
|
8
8
|
validates_associated :agent, :manifestation
|
9
9
|
validates_presence_of :agent, :manifestation
|
@@ -63,15 +63,15 @@ class ResourceImportFile < ActiveRecord::Base
|
|
63
63
|
failed: 0
|
64
64
|
}
|
65
65
|
rows = open_import_file(create_import_temp_file(resource_import))
|
66
|
-
|
67
|
-
|
68
|
-
#field = rows.first
|
66
|
+
rows.shift
|
69
67
|
#if [field['manifestation_id'], field['manifestation_identifier'], field['isbn'], field['original_title']].reject{|f|
|
70
68
|
# f.to_s.strip == ''
|
71
69
|
#}.empty?
|
72
70
|
# raise "You should specify isbn or original_title in the first line"
|
73
71
|
#end
|
72
|
+
row_num = 1
|
74
73
|
|
74
|
+
ResourceImportResult.create!(resource_import_file_id: id, body: rows.headers.join("\t"))
|
75
75
|
rows.each do |row|
|
76
76
|
row_num += 1
|
77
77
|
import_result = ResourceImportResult.create!(resource_import_file_id: id, body: row.fields.join("\t"))
|
@@ -270,6 +270,7 @@ class ResourceImportFile < ActiveRecord::Base
|
|
270
270
|
def modify
|
271
271
|
transition_to!(:started)
|
272
272
|
rows = open_import_file(create_import_temp_file(resource_import))
|
273
|
+
rows.shift
|
273
274
|
row_num = 1
|
274
275
|
|
275
276
|
rows.each do |row|
|
@@ -340,6 +341,7 @@ class ResourceImportFile < ActiveRecord::Base
|
|
340
341
|
def remove
|
341
342
|
transition_to!(:started)
|
342
343
|
rows = open_import_file(create_import_temp_file(resource_import))
|
344
|
+
rows.shift
|
343
345
|
row_num = 1
|
344
346
|
|
345
347
|
rows.each do |row|
|
@@ -361,7 +363,8 @@ class ResourceImportFile < ActiveRecord::Base
|
|
361
363
|
def update_relationship
|
362
364
|
transition_to!(:started)
|
363
365
|
rows = open_import_file(create_import_temp_file(resource_import))
|
364
|
-
|
366
|
+
rows.shift
|
367
|
+
row_num = 1
|
365
368
|
|
366
369
|
rows.each do |row|
|
367
370
|
item_identifier = row['item_identifier'].to_s.strip
|
@@ -423,7 +426,7 @@ class ResourceImportFile < ActiveRecord::Base
|
|
423
426
|
save!
|
424
427
|
end
|
425
428
|
rows = CSV.open(tempfile, headers: header, col_sep: "\t")
|
426
|
-
ResourceImportResult.create!(resource_import_file_id: id, body: header.join("\t"))
|
429
|
+
#ResourceImportResult.create!(resource_import_file_id: id, body: header.join("\t"))
|
427
430
|
tempfile.close(true)
|
428
431
|
file.close
|
429
432
|
rows
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
2
|
<h1 class="title"><%= t('page.editing', model: t('activerecord.models.agent_merge_list')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<%= render 'form' %>
|
5
5
|
</div>
|
6
6
|
</div>
|
7
7
|
|
8
|
-
<div id="submenu" class="ui-corner-all">
|
8
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
9
9
|
<ul>
|
10
10
|
<li><%= link_to t('page.show'), @agent_merge_list -%></li>
|
11
11
|
<li><%= link_to t('page.back'), agent_merge_lists_path -%></li>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
2
|
<h1 class="title"><%= t('page.listing', model: t('activerecord.models.agent_merge_list')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
|
@@ -26,7 +26,7 @@
|
|
26
26
|
</div>
|
27
27
|
</div>
|
28
28
|
|
29
|
-
<div id="submenu" class="ui-corner-all">
|
29
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
30
30
|
<ul>
|
31
31
|
<li><%= link_to t('page.new', model: t('activerecord.models.agent_merge_list')), new_agent_merge_list_path -%></li>
|
32
32
|
</ul>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
2
|
<h1 class="title"><%= t('page.new', model: t('activerecord.models.agent_merge_list')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<%= render 'form' %>
|
5
5
|
</div>
|
6
6
|
</div>
|
7
7
|
|
8
|
-
<div id="submenu" class="ui-corner-all">
|
8
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
9
9
|
<ul>
|
10
10
|
<li><%= link_to t('page.back'), :back -%></li>
|
11
11
|
</ul>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
2
|
<h1 class="title"><%= t('page.showing', model: t('activerecord.models.agent_merge_list')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<p id="notice"><%= notice %></p>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
</div>
|
23
23
|
</div>
|
24
24
|
|
25
|
-
<div id="submenu" class="ui-corner-all">
|
25
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
26
26
|
<ul>
|
27
27
|
<li><%= link_to t('page.listing', model: t('activerecord.models.agent')), agent_merge_list_agents_path(@agent_merge_list) -%></li>
|
28
28
|
<li><%= link_to t('page.edit'), edit_agent_merge_list_path(@agent_merge_list) -%></li>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
2
|
<h1 class="title"><%= t('page.editing', model: t('activerecord.models.agent_merge')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
|
@@ -23,7 +23,7 @@
|
|
23
23
|
</div>
|
24
24
|
</div>
|
25
25
|
|
26
|
-
<div id="submenu" class="ui-corner-all">
|
26
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
27
27
|
<ul>
|
28
28
|
<li><%= link_to t('page.show'), @agent_merge -%></li>
|
29
29
|
<li><%= link_to t('page.back'), agent_merges_path -%></li>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
2
|
<h1 class="title"><%= t('page.listing', model: t('activerecord.models.agent_merge')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
|
@@ -23,7 +23,7 @@
|
|
23
23
|
</div>
|
24
24
|
</div>
|
25
25
|
|
26
|
-
<div id="submenu" class="ui-corner-all">
|
26
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
27
27
|
<ul>
|
28
28
|
<%- if @agent_merge_list -%>
|
29
29
|
<li><%= link_to t('page.add', model: t('activerecord.models.agent')), agent_merge_list_agents_path(@agent_merge_list) -%></li>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
2
|
<h1 class="title"><%= t('page.new', model: t('activerecord.models.agent_merge')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
|
@@ -32,7 +32,7 @@
|
|
32
32
|
</div>
|
33
33
|
</div>
|
34
34
|
|
35
|
-
<div id="submenu" class="ui-corner-all">
|
35
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
36
36
|
<ul>
|
37
37
|
<li><%= link_to t('page.back'), agent_merges_path -%></li>
|
38
38
|
</ul>
|