enju_biblio 0.3.13 → 0.4.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (385) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -3
  3. data/app/controllers/agents_controller.rb +6 -0
  4. data/app/controllers/content_types_controller.rb +1 -1
  5. data/app/controllers/items_controller.rb +10 -18
  6. data/app/controllers/manifestations_controller.rb +85 -80
  7. data/app/controllers/resource_import_results_controller.rb +2 -6
  8. data/app/controllers/series_statements_controller.rb +6 -0
  9. data/app/helpers/enju_biblio/application_helper.rb +5 -5
  10. data/app/helpers/manifestations_helper.rb +12 -12
  11. data/app/models/agent.rb +4 -13
  12. data/app/models/agent_import_file.rb +1 -1
  13. data/app/models/agent_relationship_type.rb +8 -7
  14. data/app/models/agent_type.rb +10 -7
  15. data/app/models/carrier_type.rb +14 -11
  16. data/app/models/content_type.rb +10 -7
  17. data/app/models/create_type.rb +8 -7
  18. data/app/models/doi_record.rb +36 -0
  19. data/app/models/form_of_work.rb +11 -8
  20. data/app/models/frequency.rb +11 -8
  21. data/app/models/identifier.rb +1 -1
  22. data/app/models/identifier_type.rb +1 -0
  23. data/app/models/import_request.rb +3 -4
  24. data/app/models/isbn_record.rb +51 -0
  25. data/app/models/isbn_record_and_manifestation.rb +18 -0
  26. data/app/models/issn_record.rb +49 -0
  27. data/app/models/issn_record_and_manifestation.rb +18 -0
  28. data/app/models/item.rb +7 -55
  29. data/app/models/language.rb +10 -9
  30. data/app/models/license.rb +9 -7
  31. data/app/models/manifestation.rb +271 -158
  32. data/app/models/manifestation_relationship_type.rb +9 -7
  33. data/app/models/medium_of_performance.rb +11 -8
  34. data/app/models/periodical.rb +33 -0
  35. data/app/models/periodical_and_manifestation.rb +16 -0
  36. data/app/models/picture_file.rb +2 -0
  37. data/app/models/produce_type.rb +8 -7
  38. data/app/models/realize_type.rb +8 -7
  39. data/app/models/resource_export_file.rb +8 -6
  40. data/app/models/resource_export_file_state_machine.rb +1 -1
  41. data/app/models/resource_import_file.rb +62 -153
  42. data/app/views/agent_import_results/index.txt.erb +3 -0
  43. data/app/views/agent_relationship_types/index.html.erb +1 -1
  44. data/app/views/agent_relationship_types/show.html.erb +1 -1
  45. data/app/views/agent_relationships/_form.html.erb +1 -1
  46. data/app/views/agent_types/index.html.erb +1 -1
  47. data/app/views/agent_types/show.html.erb +1 -1
  48. data/app/views/agents/_agent.html.erb +1 -1
  49. data/app/views/agents/_agent_list.html.erb +2 -2
  50. data/app/views/agents/_form.html.erb +4 -4
  51. data/app/views/agents/_index_agent.html.erb +1 -1
  52. data/app/views/agents/_index_agent_merge_list.html.erb +1 -1
  53. data/app/views/agents/_index_expression.html.erb +2 -2
  54. data/app/views/agents/_index_manifestation.html.erb +2 -2
  55. data/app/views/agents/_index_work.html.erb +2 -2
  56. data/app/views/agents/index.atom.builder +1 -1
  57. data/app/views/agents/index.rss.builder +3 -3
  58. data/app/views/agents/show.html+phone.erb +2 -2
  59. data/app/views/agents/show.html.erb +2 -2
  60. data/app/views/carrier_types/index.html.erb +2 -2
  61. data/app/views/carrier_types/show.html.erb +3 -3
  62. data/app/views/content_types/index.html.erb +1 -1
  63. data/app/views/content_types/show.html.erb +1 -1
  64. data/app/views/countries/index.html.erb +1 -1
  65. data/app/views/countries/show.html.erb +1 -1
  66. data/app/views/create_types/index.html.erb +1 -1
  67. data/app/views/create_types/show.html.erb +1 -1
  68. data/app/views/creates/_form.html.erb +1 -1
  69. data/app/views/form_of_works/index.html.erb +1 -1
  70. data/app/views/form_of_works/show.html.erb +1 -1
  71. data/app/views/frequencies/index.html.erb +1 -1
  72. data/app/views/frequencies/show.html.erb +1 -1
  73. data/app/views/identifier_types/index.html.erb +1 -1
  74. data/app/views/identifier_types/show.html.erb +1 -1
  75. data/app/views/items/_form.html.erb +13 -33
  76. data/app/views/items/index.html+phone.erb +3 -3
  77. data/app/views/items/index.html.erb +3 -3
  78. data/app/views/items/show.html+phone.erb +5 -5
  79. data/app/views/items/show.html.erb +119 -134
  80. data/app/views/languages/index.html.erb +1 -1
  81. data/app/views/languages/show.html.erb +1 -1
  82. data/app/views/layouts/agents.html.erb +2 -2
  83. data/app/views/layouts/items.html.erb +1 -1
  84. data/app/views/layouts/manifestations.html.erb +4 -4
  85. data/app/views/licenses/index.html.erb +1 -1
  86. data/app/views/licenses/show.html.erb +1 -1
  87. data/app/views/manifestation_relationship_types/index.html.erb +1 -1
  88. data/app/views/manifestation_relationship_types/show.html.erb +1 -1
  89. data/app/views/manifestation_relationships/_form.html.erb +1 -1
  90. data/app/views/manifestations/_call_number.html.erb +3 -3
  91. data/app/views/manifestations/_carrier_type_facet.html.erb +1 -1
  92. data/app/views/manifestations/_classification_facet.html.erb +2 -2
  93. data/app/views/manifestations/_export_detail.html.erb +0 -1
  94. data/app/views/manifestations/_export_list.html.erb +3 -4
  95. data/app/views/manifestations/_form.html.erb +8 -31
  96. data/app/views/manifestations/_identifier_fields.html.erb +1 -1
  97. data/app/views/manifestations/_language_facet.html.erb +1 -1
  98. data/app/views/manifestations/_library_facet.html.erb +1 -1
  99. data/app/views/manifestations/_manifestation.txt.erb +1 -1
  100. data/app/views/manifestations/_pub_year_facet.html.erb +1 -1
  101. data/app/views/manifestations/_reservable_facet.html.erb +2 -2
  102. data/app/views/manifestations/_show_creators.html.erb +1 -1
  103. data/app/views/manifestations/_show_detail_librarian.html.erb +13 -37
  104. data/app/views/manifestations/_show_detail_user.html.erb +13 -25
  105. data/app/views/manifestations/_show_holding.html+phone.erb +3 -3
  106. data/app/views/manifestations/_show_holding.html.erb +2 -2
  107. data/app/views/manifestations/explain.sru +9 -0
  108. data/app/views/manifestations/index.atom.builder +1 -1
  109. data/app/views/manifestations/index.html.erb +7 -7
  110. data/app/views/manifestations/index.opds.builder +1 -1
  111. data/app/views/manifestations/index.rdf.builder +3 -3
  112. data/app/views/manifestations/index.rss.builder +3 -3
  113. data/app/views/manifestations/index.sru.builder +101 -0
  114. data/app/views/manifestations/index.txt.erb +1 -0
  115. data/app/views/manifestations/show.txt.erb +1 -0
  116. data/app/views/medium_of_performances/index.html.erb +1 -1
  117. data/app/views/medium_of_performances/show.html.erb +1 -1
  118. data/app/views/notifier/manifestation_info.en.text.erb +1 -1
  119. data/app/views/notifier/manifestation_info.ja.text.erb +1 -1
  120. data/app/views/picture_files/edit.html.erb +0 -4
  121. data/app/views/produce_types/index.html.erb +1 -1
  122. data/app/views/produce_types/show.html.erb +1 -1
  123. data/app/views/produces/_form.html.erb +1 -1
  124. data/app/views/realize_types/index.html.erb +1 -1
  125. data/app/views/realize_types/show.html.erb +1 -1
  126. data/app/views/realizes/_form.html.erb +1 -1
  127. data/app/views/resource_import_files/_results.html.erb +0 -6
  128. data/app/views/resource_import_files/new.html.erb +2 -2
  129. data/app/views/resource_import_results/index.html.erb +11 -0
  130. data/app/views/resource_import_results/index.txt.erb +3 -0
  131. data/app/views/series_statements/_form.html.erb +8 -6
  132. data/app/views/series_statements/show.html.erb +0 -12
  133. data/config/locales/translation_en.yml +1 -28
  134. data/config/locales/translation_ja.yml +3 -30
  135. data/config/routes.rb +0 -2
  136. data/db/migrate/20081027150907_create_picture_files.rb +2 -0
  137. data/db/migrate/20160319144230_create_issn_records.rb +11 -0
  138. data/db/migrate/20160506144040_create_isbn_records.rb +11 -0
  139. data/db/migrate/20170116134107_create_issn_record_and_manifestations.rb +11 -0
  140. data/db/migrate/20170116134120_create_isbn_record_and_manifestations.rb +11 -0
  141. data/db/migrate/20190102034126_create_doi_records.rb +13 -0
  142. data/db/migrate/20190311154610_create_periodicals.rb +10 -0
  143. data/db/migrate/20190312033839_create_periodical_and_manifestations.rb +11 -0
  144. data/db/migrate/20190712163038_add_display_name_translations_to_carrier_type.rb +21 -0
  145. data/lib/enju_biblio/openurl.rb +1 -5
  146. data/lib/enju_biblio/porta_cql.rb +282 -0
  147. data/lib/enju_biblio/sru.rb +83 -0
  148. data/lib/enju_biblio/version.rb +1 -1
  149. data/lib/enju_biblio.rb +2 -0
  150. data/lib/generators/enju_biblio/setup/setup_generator.rb +0 -2
  151. data/lib/generators/enju_biblio/setup/templates/db/fixtures/agent_relationship_types.yml +3 -3
  152. data/lib/generators/enju_biblio/setup/templates/db/fixtures/agent_types.yml +2 -4
  153. data/lib/generators/enju_biblio/setup/templates/db/fixtures/carrier_types.yml +8 -26
  154. data/lib/generators/enju_biblio/setup/templates/db/fixtures/content_types.yml +12 -24
  155. data/lib/generators/enju_biblio/setup/templates/db/fixtures/create_types.yml +4 -22
  156. data/lib/generators/enju_biblio/setup/templates/db/fixtures/form_of_works.yml +1 -1
  157. data/lib/generators/enju_biblio/setup/templates/db/fixtures/frequencies.yml +9 -18
  158. data/lib/generators/enju_biblio/setup/templates/db/fixtures/languages.yml +2 -4
  159. data/lib/generators/enju_biblio/setup/templates/db/fixtures/licenses.yml +2 -2
  160. data/lib/generators/enju_biblio/setup/templates/db/fixtures/manifestation_relationship_types.yml +2 -4
  161. data/lib/generators/enju_biblio/setup/templates/db/fixtures/medium_of_performances.yml +15 -0
  162. data/lib/generators/enju_biblio/setup/templates/db/fixtures/produce_types.yml +2 -19
  163. data/lib/generators/enju_biblio/setup/templates/db/fixtures/realize_types.yml +3 -21
  164. data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_isbn_which_is_already_imported/assigns_a_newly_created_import_request_as_import_request.yml +121 -0
  165. data/spec/controllers/content_types_controller_spec.rb +1 -1
  166. data/spec/controllers/items_controller_spec.rb +1 -59
  167. data/spec/controllers/manifestations_controller_spec.rb +19 -49
  168. data/spec/dummy/app/helpers/application_helper.rb +1 -1
  169. data/spec/dummy/app/models/user.rb +4 -0
  170. data/spec/dummy/bin/bundle +1 -1
  171. data/spec/dummy/bin/setup +1 -3
  172. data/spec/dummy/bin/update +4 -2
  173. data/spec/dummy/bin/yarn +3 -3
  174. data/spec/dummy/config/application.rb +1 -2
  175. data/spec/dummy/config/database.yml +70 -9
  176. data/spec/dummy/config/initializers/assets.rb +2 -2
  177. data/spec/dummy/db/development.sqlite3 +0 -0
  178. data/spec/dummy/db/migrate/002_devise_create_users.rb +1 -0
  179. data/spec/dummy/db/migrate/113_create_events.rb +2 -4
  180. data/spec/dummy/db/migrate/154_create_messages.rb +4 -8
  181. data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +3 -3
  182. data/spec/dummy/db/migrate/20081028093607_create_event_import_files.rb +2 -4
  183. data/spec/dummy/db/migrate/20090519203307_create_participates.rb +2 -4
  184. data/spec/dummy/db/migrate/20100925074639_create_event_import_results.rb +2 -2
  185. data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +1 -0
  186. data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +1 -1
  187. data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +1 -1
  188. data/spec/dummy/db/migrate/20140523171309_create_event_import_file_transitions.rb +1 -1
  189. data/spec/dummy/db/migrate/20140524135607_create_bookmark_stat_transitions.rb +1 -1
  190. data/spec/dummy/db/migrate/20140720192418_add_default_library_id_to_event_import_file.rb +1 -1
  191. data/spec/dummy/db/migrate/20140812152348_create_event_export_files.rb +1 -1
  192. data/spec/dummy/db/migrate/20140812153137_create_event_export_file_transitions.rb +1 -1
  193. data/spec/dummy/db/migrate/20140814070854_add_default_event_category_id_to_event_import_file.rb +1 -1
  194. data/spec/dummy/db/migrate/20151128142913_create_places.rb +14 -0
  195. data/spec/dummy/db/migrate/20151201163718_add_place_id_to_event.rb +5 -0
  196. data/spec/dummy/db/migrate/20160703184258_add_most_recent_to_event_import_file_transitions.rb +9 -0
  197. data/spec/dummy/db/migrate/20160703184311_add_most_recent_to_event_export_file_transitions.rb +9 -0
  198. data/spec/dummy/db/migrate/20160813191533_add_book_jacket_source_to_library_group.rb +1 -1
  199. data/spec/dummy/db/migrate/20160813191820_add_screenshot_generator_to_library_group.rb +1 -1
  200. data/spec/dummy/db/migrate/20160815045420_add_most_recent_to_bookmark_stat_transitions.rb +9 -0
  201. data/spec/dummy/db/migrate/20170116150432_create_jpno_records.rb +10 -0
  202. data/spec/dummy/db/migrate/20171126072934_create_ndla_records.rb +10 -0
  203. data/spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb +13 -0
  204. data/spec/dummy/db/migrate/20180107162711_add_constraints_to_most_recent_for_message_request_transitions.rb +13 -0
  205. data/spec/dummy/db/migrate/20180107164558_add_constraints_to_most_recent_for_event_import_file_transitions.rb +13 -0
  206. data/spec/dummy/db/migrate/20180107164617_add_constraints_to_most_recent_for_event_export_file_transitions.rb +13 -0
  207. data/spec/dummy/db/migrate/20180107172413_add_constraints_to_most_recent_for_bookmark_stat_transitions.rb +13 -0
  208. data/spec/dummy/db/migrate/20180709023035_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +36 -0
  209. data/spec/dummy/db/migrate/20180709023036_add_missing_unique_indices.acts_as_taggable_on_engine.rb +26 -0
  210. data/spec/dummy/db/migrate/20180709023037_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +20 -0
  211. data/spec/dummy/db/migrate/20180709023038_add_missing_taggable_index.acts_as_taggable_on_engine.rb +15 -0
  212. data/spec/dummy/db/migrate/20180709023039_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +15 -0
  213. data/spec/dummy/db/migrate/20180709023040_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb +23 -0
  214. data/spec/dummy/db/migrate/20180709161346_add_created_at_to_tag.rb +6 -0
  215. data/spec/dummy/db/migrate/20181119170645_add_foreign_key_to_events_referencing_event_categories.rb +5 -0
  216. data/spec/dummy/db/migrate/20190501043418_create_ndl_bib_id_records.rb +10 -0
  217. data/spec/dummy/db/migrate/20190508160525_create_retains.rb +10 -0
  218. data/spec/dummy/db/migrate/20190630113817_add_display_name_translations_to_library_group.rb +12 -0
  219. data/spec/dummy/db/migrate/20190630115523_add_login_banner_translations_to_library_group.rb +6 -0
  220. data/spec/dummy/db/migrate/20190630151446_add_display_name_translations_to_role.rb +5 -0
  221. data/spec/dummy/db/migrate/20190630153136_add_display_name_translations_to_event.rb +6 -0
  222. data/spec/dummy/db/migrate/20190706052525_add_display_name_translations_to_circulation_status.rb +5 -0
  223. data/spec/dummy/db/schema.rb +335 -221
  224. data/spec/dummy/db/test.sqlite3 +0 -0
  225. data/spec/factories/create_types.rb +8 -7
  226. data/spec/factories/produce_types.rb +8 -7
  227. data/spec/factories/realize_types.rb +8 -7
  228. data/spec/factories/series_statement.rb +3 -4
  229. data/spec/fixtures/agent_relationship_types.yml +8 -7
  230. data/spec/fixtures/agent_types.yml +11 -10
  231. data/spec/fixtures/carrier_types.yml +16 -15
  232. data/spec/fixtures/content_types.yml +20 -31
  233. data/spec/fixtures/create_types.yml +12 -15
  234. data/spec/fixtures/creates.yml +0 -2
  235. data/spec/fixtures/form_of_works.yml +11 -10
  236. data/spec/fixtures/frequencies.yml +17 -25
  237. data/spec/fixtures/items.yml +11 -12
  238. data/spec/fixtures/languages.yml +11 -11
  239. data/spec/fixtures/libraries.yml +30 -30
  240. data/spec/fixtures/library_groups.yml +11 -6
  241. data/spec/fixtures/licenses.yml +8 -7
  242. data/spec/fixtures/manifestation_relationship_types.yml +12 -11
  243. data/spec/fixtures/manifestations.yml +0 -1
  244. data/spec/fixtures/medium_of_performances.yml +10 -9
  245. data/spec/fixtures/picture_files.yml +2 -0
  246. data/spec/fixtures/produce_types.yml +10 -11
  247. data/spec/fixtures/produces.yml +0 -2
  248. data/spec/fixtures/profiles.yml +8 -5
  249. data/spec/fixtures/realize_types.yml +11 -13
  250. data/spec/fixtures/realizes.yml +0 -2
  251. data/spec/fixtures/request_status_types.yml +14 -14
  252. data/spec/fixtures/request_types.yml +13 -13
  253. data/spec/fixtures/resource_export_files.yml +1 -1
  254. data/spec/fixtures/resource_import_results.yml +2 -2
  255. data/spec/fixtures/roles.yml +22 -5
  256. data/spec/fixtures/shelves.yml +16 -16
  257. data/spec/fixtures/user_groups.yml +12 -12
  258. data/spec/fixtures/user_has_roles.yml +3 -4
  259. data/spec/fixtures/users.yml +0 -3
  260. data/spec/models/agent_relationship_type_spec.rb +8 -7
  261. data/spec/models/agent_type_spec.rb +8 -7
  262. data/spec/models/carrier_type_spec.rb +12 -11
  263. data/spec/models/content_type_spec.rb +8 -7
  264. data/spec/models/create_type_spec.rb +8 -7
  265. data/spec/models/doi_record_spec.rb +19 -0
  266. data/spec/models/form_of_work_spec.rb +8 -7
  267. data/spec/models/frequency_spec.rb +8 -7
  268. data/spec/models/item_spec.rb +0 -7
  269. data/spec/models/language_spec.rb +10 -9
  270. data/spec/models/license_spec.rb +8 -7
  271. data/spec/models/manifestation_relationship_type_spec.rb +8 -7
  272. data/spec/models/manifestation_spec.rb +81 -24
  273. data/spec/models/medium_of_performance_spec.rb +8 -7
  274. data/spec/models/periodical_and_manifestation_spec.rb +17 -0
  275. data/spec/models/periodical_spec.rb +16 -0
  276. data/spec/models/picture_file_spec.rb +2 -0
  277. data/spec/models/produce_type_spec.rb +8 -7
  278. data/spec/models/realize_type_spec.rb +8 -7
  279. data/spec/models/resource_export_file_spec.rb +9 -62
  280. data/spec/models/resource_import_file_spec.rb +14 -44
  281. data/spec/rails_helper.rb +8 -4
  282. data/spec/system/manifestations_spec.rb +0 -30
  283. data/spec/views/items/index.html.erb_spec.rb +6 -7
  284. data/spec/views/manifestations/index.html.erb_spec.rb +1 -1
  285. data/spec/views/manifestations/index.rdf.builder_spec.rb +1 -0
  286. data/spec/views/manifestations/{index.txt.ruby_spec.rb → index.txt.erb_spec.rb} +1 -1
  287. data/spec/views/manifestations/{show.txt.ruby_spec.rb → show.txt.erb_spec.rb} +2 -2
  288. data/spec/views/resource_import_results/show.html.erb_spec.rb +1 -1
  289. metadata +560 -718
  290. data/app/controllers/item_custom_properties_controller.rb +0 -69
  291. data/app/controllers/manifestation_custom_properties_controller.rb +0 -69
  292. data/app/models/item_custom_property.rb +0 -18
  293. data/app/models/item_custom_value.rb +0 -17
  294. data/app/models/manifestation_custom_property.rb +0 -18
  295. data/app/models/manifestation_custom_value.rb +0 -17
  296. data/app/policies/item_custom_property_policy.rb +0 -21
  297. data/app/policies/manifestation_custom_property_policy.rb +0 -21
  298. data/app/views/agent_import_results/index.txt.ruby +0 -5
  299. data/app/views/item_custom_properties/_form.html.erb +0 -32
  300. data/app/views/item_custom_properties/edit.html.erb +0 -13
  301. data/app/views/item_custom_properties/index.html.erb +0 -43
  302. data/app/views/item_custom_properties/new.html.erb +0 -12
  303. data/app/views/item_custom_properties/show.html.erb +0 -28
  304. data/app/views/items/_item.json.jbuilder +0 -17
  305. data/app/views/items/index.json.jbuilder +0 -5
  306. data/app/views/items/show.json.jbuilder +0 -1
  307. data/app/views/manifestation_custom_properties/_form.html.erb +0 -32
  308. data/app/views/manifestation_custom_properties/edit.html.erb +0 -13
  309. data/app/views/manifestation_custom_properties/index.html.erb +0 -43
  310. data/app/views/manifestation_custom_properties/new.html.erb +0 -12
  311. data/app/views/manifestation_custom_properties/show.html.erb +0 -28
  312. data/app/views/manifestations/index.txt.ruby +0 -7
  313. data/app/views/manifestations/show.json.jbuilder +0 -2
  314. data/app/views/manifestations/show.txt.ruby +0 -5
  315. data/app/views/resource_import_results/index.txt.ruby +0 -5
  316. data/db/migrate/20190818075603_add_memo_to_manifestation.rb +0 -5
  317. data/db/migrate/20190818075628_add_memo_to_item.rb +0 -5
  318. data/db/migrate/20200425072340_create_manifestation_custom_properties.rb +0 -12
  319. data/db/migrate/20200425072349_create_item_custom_properties.rb +0 -12
  320. data/db/migrate/20200425074758_create_manifestation_custom_values.rb +0 -12
  321. data/db/migrate/20200425074822_create_item_custom_values.rb +0 -12
  322. data/lib/generators/enju_biblio/setup/templates/db/fixtures/agents.yml +0 -19
  323. data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_import_custom_values.yml +0 -121
  324. data/spec/cassette_library/resource_import_results/index_txt_ruby/renders_a_list_of_resource_import_results.yml +0 -121
  325. data/spec/controllers/item_custom_properties_controller_spec.rb +0 -449
  326. data/spec/controllers/manifestation_custom_properties_controller_spec.rb +0 -449
  327. data/spec/dummy/db/migrate/20081117143156_create_inventory_files.rb +0 -18
  328. data/spec/dummy/db/migrate/20081117143455_create_inventories.rb +0 -17
  329. data/spec/dummy/db/migrate/20090706125521_add_attachments_inventory_to_inventory_file.rb +0 -15
  330. data/spec/dummy/db/migrate/20091202124834_create_versions.rb +0 -18
  331. data/spec/dummy/db/migrate/20100525171356_acts_as_taggable_on_migration.rb +0 -30
  332. data/spec/dummy/db/migrate/20111217234412_add_save_checkout_history_to_user.rb +0 -5
  333. data/spec/dummy/db/migrate/20111218002349_add_checkout_icalendar_token_to_user.rb +0 -6
  334. data/spec/dummy/db/migrate/20120413100431_add_fingerprint_to_inventory_file.rb +0 -5
  335. data/spec/dummy/db/migrate/20150421023923_create_identities.rb +0 -14
  336. data/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb +0 -5
  337. data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +0 -18
  338. data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +0 -22
  339. data/spec/factories/item_custom_property.rb +0 -6
  340. data/spec/factories/item_custom_value.rb +0 -6
  341. data/spec/factories/manifestation_custom_property.rb +0 -6
  342. data/spec/factories/manifestation_custom_value.rb +0 -6
  343. data/spec/fixtures/carrier_type_has_checkout_types.yml +0 -31
  344. data/spec/fixtures/checkout_stat_has_manifestations.yml +0 -24
  345. data/spec/fixtures/checkout_stat_has_users.yml +0 -24
  346. data/spec/fixtures/checkout_types.yml +0 -34
  347. data/spec/fixtures/circulation_statuses.yml +0 -136
  348. data/spec/fixtures/inventory_files.yml +0 -40
  349. data/spec/fixtures/item_custom_properties.yml +0 -24
  350. data/spec/fixtures/manifestation_checkout_stats.yml +0 -29
  351. data/spec/fixtures/manifestation_custom_properties.yml +0 -24
  352. data/spec/fixtures/manifestation_reserve_stats.yml +0 -29
  353. data/spec/fixtures/reserve_stat_has_manifestations.yml +0 -24
  354. data/spec/fixtures/reserve_stat_has_users.yml +0 -24
  355. data/spec/fixtures/reserve_transitions.yml +0 -104
  356. data/spec/fixtures/reserves.yml +0 -143
  357. data/spec/fixtures/use_restrictions.yml +0 -93
  358. data/spec/fixtures/user_checkout_stats.yml +0 -28
  359. data/spec/fixtures/user_group_has_checkout_types.yml +0 -111
  360. data/spec/fixtures/user_reserve_stats.yml +0 -28
  361. data/spec/models/item_custom_property_spec.rb +0 -18
  362. data/spec/models/item_custom_value_spec.rb +0 -17
  363. data/spec/models/manifestation_custom_property_spec.rb +0 -18
  364. data/spec/models/manifestation_custom_value_spec.rb +0 -17
  365. data/spec/requests/item_custom_properties_spec.rb +0 -129
  366. data/spec/requests/manifestation_custom_properties_spec.rb +0 -129
  367. data/spec/routing/item_custom_properties_routing_spec.rb +0 -38
  368. data/spec/routing/manifestation_custom_properties_routing_spec.rb +0 -38
  369. data/spec/system/items_spec.rb +0 -121
  370. data/spec/system/series_statements_spec.rb +0 -16
  371. data/spec/views/agent_import_results/index.html.erb_spec.rb +0 -29
  372. data/spec/views/agent_import_results/index.txt.ruby_spec.rb +0 -20
  373. data/spec/views/agent_import_results/show.html.erb_spec.rb +0 -24
  374. data/spec/views/item_custom_properties/edit.html.erb_spec.rb +0 -21
  375. data/spec/views/item_custom_properties/index.html.erb_spec.rb +0 -25
  376. data/spec/views/item_custom_properties/new.html.erb_spec.rb +0 -21
  377. data/spec/views/item_custom_properties/show.html.erb_spec.rb +0 -16
  378. data/spec/views/items/index.json.jbuilder_spec.rb +0 -15
  379. data/spec/views/items/show.json.jbuilder_spec.rb +0 -15
  380. data/spec/views/manifestation_custom_properties/edit.html.erb_spec.rb +0 -21
  381. data/spec/views/manifestation_custom_properties/index.html.erb_spec.rb +0 -25
  382. data/spec/views/manifestation_custom_properties/new.html.erb_spec.rb +0 -21
  383. data/spec/views/manifestation_custom_properties/show.html.erb_spec.rb +0 -16
  384. data/spec/views/manifestations/show.json.jbuilder_spec.rb +0 -16
  385. data/spec/views/resource_import_results/index.txt.ruby_spec.rb +0 -22
@@ -0,0 +1,101 @@
1
+ if @sru
2
+ unless @sru.extra_response_data.empty?
3
+ @extra_response = true
4
+ @facets = @sru.extra_response_data[:facets]
5
+ @dpid = @sru.extra_response_data[:dpid]
6
+ @webget = @sru.extra_response_data[:webget]
7
+ @digitalize = @sru.extra_response_data[:digitalize]
8
+ @porta_type = @sru.extra_response_data[:porta_type]
9
+ @payment = @sru.extra_response_data[:payment]
10
+ @ndc = @sru.extra_response_data[:ndc]
11
+ @date = @sru.extra_response_data[:date]
12
+ end
13
+
14
+ @version = @sru.version
15
+ @packing = @sru.packing
16
+ @number_of_records = @manifestations.total_count
17
+ @next_record_position = @sru.start + @manifestations.limit_value
18
+ end
19
+
20
+ def search_retrieve_response!(xml)
21
+ xml.searchRetrieveResponse xmlns: "http://www.loc.gov/zing/srw/" do
22
+ xml.version @version
23
+ xml.numberOfRecords @number_of_records
24
+ extra_response_data!(xml) if @extra_response
25
+ xml.records do
26
+ @manifestations.each_with_index do |rec, idx|
27
+ xml.record do
28
+ record!(xml, rec, idx + 1)
29
+ end
30
+ end
31
+ end
32
+ xml.nextRecordPosition @next_record_position
33
+ end
34
+ end
35
+
36
+ def extra_response_data!(xml)
37
+ xml.extraResponseData do
38
+ xml.facets @facets do
39
+ lst_tag!(xml, "REPOSITORY_NO", 'dcndl_porta:dpid', @dpid)
40
+ lst_tag!(xml, "WEBGET_TYPE", 'dcndl_porta:type.Web-get', @webget)
41
+ lst_tag!(xml, "DIGITALIZE_TYPE", 'dcndl_porta:type.Digitalize', @digitalize)
42
+ lst_tag!(xml, "PORTA_TYPE", 'dcndl_porta:PORTAType', @porta_type)
43
+ lst_tag!(xml, "PAYMENT_TYPE", 'dcndl_porta:type.Payment', @payment)
44
+ lst_tag!(xml, "NDC", 'int', @ndc)
45
+ lst_tag!(xml, "ISSUED_DATE", 'int', @date)
46
+ end
47
+ end
48
+ end
49
+
50
+ def lst_tag!(xml, lst_name, tag_name, hash)
51
+ xml.lst name: lst_name do
52
+ value_sort(hash).each do |item|
53
+ xml.tag! tag_name, {name: item[0]}, item[1]
54
+ end
55
+ end
56
+ end
57
+
58
+ def record!(xml, rec, position)
59
+ xml.recordSchema 'info:srw/schema/1/dc-v1.1'
60
+ xml.recordPacking @packing
61
+ xml.recordData{|x| x << (/\Axml\Z/io =~ @packing ? get_record(rec) : CGI::escapeHTML(get_record(rec)))}
62
+ xml.recordPosition position
63
+ end
64
+
65
+ def get_record(manifestation)
66
+ xml = Builder::XmlMarkup.new
67
+ xml.tag! 'srw_dc:dc',
68
+ 'xmlns:dc' => "http://purl.org/dc/elements/1.1/",
69
+ 'xmlns:srw_dc' => "info:srw/schema/1/dc-v1.1",
70
+ 'xmlns:xsi' => "http://www.w3.org/2001/XMLSchema-instance",
71
+ 'xsi:schemaLocation' => "info:srw/schema/1/dc-v1.1 http://www.loc.gov/standards/sru/dc-schema.xsd" do
72
+ cache([manifestation, fragment: 'index_sru', role: current_user_role_name, locale: @locale]) do
73
+ xml.tag! 'dc:title', manifestation.original_title
74
+ manifestation.creators.readable_by(current_user).each do |agent|
75
+ xml.tag! 'dc:creator', agent.full_name
76
+ end
77
+ manifestation.contributors.each do |agent|
78
+ xml.tag! 'dc:contributor', agent.full_name
79
+ end
80
+ manifestation.publishers.each do |agent|
81
+ xml.tag! 'dc:publisher', agent.full_name
82
+ end
83
+ if defined?(EnjuSubject)
84
+ manifestation.subjects.each do |subject|
85
+ xml.tag! "dc:subject", subject.term
86
+ end
87
+ end
88
+ xml.tag! 'dc:description', manifestation.description
89
+ end
90
+ end
91
+ end
92
+
93
+ def value_sort(hash)
94
+ hash.to_a.sort do |a, b|
95
+ (b[1] <=> a[1]) * 2 + (a[0] <=> b[0])
96
+ end
97
+ end
98
+
99
+ xml = Builder::XmlMarkup.new indent: 2
100
+ xml.instruct! directive_tag=:xml, encoding: 'UTF-8'
101
+ search_retrieve_response!(xml)
@@ -0,0 +1 @@
1
+ <%= Manifestation.csv_header(current_user_role_name, col_sep: "\t") -%><%= render @manifestations -%>
@@ -0,0 +1 @@
1
+ <%= Manifestation.csv_header(current_user_role_name, col_sep: "\t") -%><%= render @manifestation -%>
@@ -24,7 +24,7 @@
24
24
  </td>
25
25
  <td><%= medium_of_performance.name -%></td>
26
26
  <td>
27
- <%= link_to medium_of_performance.display_name.localize, medium_of_performance -%>
27
+ <%= link_to medium_of_performance.display_name, medium_of_performance -%>
28
28
  <br />
29
29
  <%= medium_of_performance.note %>
30
30
  </td>
@@ -10,7 +10,7 @@
10
10
 
11
11
  <p>
12
12
  <strong><%= t('activerecord.attributes.medium_of_performance.display_name') -%>:</strong>
13
- <%= @medium_of_performance.display_name.localize -%>
13
+ <%= @medium_of_performance.display_name -%>
14
14
  </p>
15
15
 
16
16
  <p>
@@ -8,7 +8,7 @@ ISBN: <%= @manifestation.identifier_contents(:isbn).join(" ") %>
8
8
  URL: <%= @manifestation.access_address %>
9
9
  Holding:
10
10
  <% @manifestation.items.on_shelf.each do |item| -%>
11
- <%= item.shelf_display_name.localize %> <%= item.call_number %> <%= item.item_identifier %>
11
+ <%= item.shelf_display_name %> <%= item.call_number %> <%= item.item_identifier %>
12
12
  <% end -%>
13
13
 
14
14
  <%= "#{LibraryGroup.site_config.url}manifestations/#{@manifestation.id}" %>
@@ -8,7 +8,7 @@ ISBN: <%= @manifestation.identifier_contents(:isbn).join(" ") %>
8
8
  URL: <%= @manifestation.access_address %>
9
9
  所蔵場所:
10
10
  <% @manifestation.items.on_shelf.each do |item| -%>
11
- <%= item.shelf_display_name.localize %> <%= item.call_number %> <%= item.item_identifier %>
11
+ <%= item.shelf_display_name %> <%= item.call_number %> <%= item.item_identifier %>
12
12
  <% end -%>
13
13
 
14
14
  <%= "#{LibraryGroup.site_config.url}manifestations/#{@manifestation.id}" %>
@@ -10,10 +10,6 @@
10
10
  <%= f.file_field :picture -%>
11
11
  </div>
12
12
 
13
- <div class="field">
14
- <%= render 'picture_files/link', picture_file: @picture_file %>
15
- </div>
16
-
17
13
  <div class="actions">
18
14
  <%= f.submit %>
19
15
  </div>
@@ -24,7 +24,7 @@
24
24
  </td>
25
25
  <td><%= produce_type.name -%></td>
26
26
  <td>
27
- <%= link_to produce_type.display_name.localize, produce_type -%>
27
+ <%= link_to produce_type.display_name, produce_type -%>
28
28
  <br />
29
29
  <%= produce_type.note %>
30
30
  </td>
@@ -10,7 +10,7 @@
10
10
 
11
11
  <p>
12
12
  <strong><%= t('activerecord.attributes.produce_type.display_name') -%>:</strong>
13
- <%= @produce_type.display_name.localize -%>
13
+ <%= @produce_type.display_name -%>
14
14
  </p>
15
15
 
16
16
  <p>
@@ -23,7 +23,7 @@
23
23
 
24
24
  <div class="field">
25
25
  <%= f.label t('activerecord.models.produce_type') -%><br />
26
- <%= f.select :produce_type_id, @produce_types.map{|p| [p.display_name.localize, p.id]} %>
26
+ <%= f.select :produce_type_id, @produce_types.map{|p| [p.display_name, p.id]} %>
27
27
  </div>
28
28
 
29
29
  <div class="actions">
@@ -24,7 +24,7 @@
24
24
  </td>
25
25
  <td><%= realize_type.name -%></td>
26
26
  <td>
27
- <%= link_to realize_type.display_name.localize, realize_type -%>
27
+ <%= link_to realize_type.display_name, realize_type -%>
28
28
  <br />
29
29
  <%= realize_type.note %>
30
30
  </td>
@@ -10,7 +10,7 @@
10
10
 
11
11
  <p>
12
12
  <strong><%= t('activerecord.attributes.realize_type.display_name') -%>:</strong>
13
- <%= @realize_type.display_name.localize -%>
13
+ <%= @realize_type.display_name -%>
14
14
  </p>
15
15
 
16
16
  <p>
@@ -23,7 +23,7 @@
23
23
 
24
24
  <div class="field">
25
25
  <%= f.label t('activerecord.models.realize_type') -%><br />
26
- <%= f.select :realize_type_id, @realize_types.map{|r| [r.display_name.localize, r.id]} %>
26
+ <%= f.select :realize_type_id, @realize_types.map{|r| [r.display_name, r.id]} %>
27
27
  </div>
28
28
 
29
29
  <div class="actions">
@@ -1,10 +1,4 @@
1
1
  <h2><%= t('activerecord.models.resource_import_result') %></h2>
2
-
3
- <p>
4
- <%= link_to((image_tag 'icons/page_white_excel.png', size: '16x16', alt: 'TSV', class: 'enju_icon'), resource_import_results_path(resource_import_file_id: @resource_import_file.id, format: :txt)) -%>
5
- (<%= link_to 'TSV', resource_import_results_path(resource_import_file_id: @resource_import_file.id, format: :txt) -%>)
6
- </p>
7
-
8
2
  <table class="table table-striped index">
9
3
  <tr>
10
4
  <th><%= t('activerecord.attributes.resource_import_result.lineno') %></th>
@@ -38,8 +38,8 @@
38
38
 
39
39
  <div class="field">
40
40
  <%= f.label :default_shelf_id -%>
41
- <%= f.select :library_id, @libraries.map{|l| [l.display_name.localize, l.id]} %>
42
- <%= f.select :default_shelf_id, @shelves.map{|s| [s.display_name.localize, s.id]} %>
41
+ <%= f.select :library_id, @libraries.map{|l| [l.display_name, l.id]} %>
42
+ <%= f.select :default_shelf_id, @shelves.map{|s| [s.display_name, s.id]} %>
43
43
  <%= render 'observe_field' %><br />
44
44
  <%= t('resource_import_file.default_shelf') %>
45
45
  </div>
@@ -13,4 +13,15 @@
13
13
  </div>
14
14
 
15
15
  <div id="submenu" class="ui-corner-all ui-widget-content">
16
+ <ul>
17
+ <li>
18
+ <% if @resource_import_file %>
19
+ <%= link_to((image_tag 'icons/page_white_excel.png', size: '16x16', alt: 'TSV', class: 'enju_icon'), resource_import_results_path(resource_import_file_id: @resource_import_file.id, format: :txt)) -%>
20
+ (<%= link_to 'TSV', resource_import_results_path(resource_import_file_id: @resource_import_file.id, format: :txt) -%>)
21
+ <% else %>
22
+ <%= link_to((image_tag 'icons/page_white_excel.png', size: '16x16', alt: 'TSV', class: 'enju_icon'), resource_import_results_path(format: :txt)) -%>
23
+ (<%= link_to 'TSV', resource_import_results_path(format: :txt) -%>)
24
+ <% end %>
25
+ </li>
26
+ </ul>
16
27
  </div>
@@ -0,0 +1,3 @@
1
+ <%- @resource_import_results.each do |resource_import_result| -%>
2
+ <%= resource_import_result.manifestation_id %> <%= resource_import_result.item_id %> <%= resource_import_result.body %>
3
+ <%- end -%>
@@ -24,18 +24,20 @@
24
24
  <%= f.label :title_subseries_transcription %><br />
25
25
  <%= f.text_field :title_subseries_transcription %>
26
26
  </div>
27
+ <!--
27
28
  <div class="field">
28
- <%= f.label :creator_string %><br />
29
- <%= f.text_field :creator_string %>
29
+ <%= f.label :numbering %><br />
30
+ <%= f.text_field :numbering %>
30
31
  </div>
31
32
  <div class="field">
32
- <%= f.label :volume_number_string %><br />
33
- <%= f.text_field :volume_number_string %>
33
+ <%= f.label :numbering_subseries -%><br />
34
+ <%= f.text_field :numbering_subseries %>
34
35
  </div>
35
36
  <div class="field">
36
- <%= f.label :series_master %><br />
37
- <%= f.check_box :series_master %>
37
+ <%= f.label :series_statement_identifier -%><br />
38
+ <%= f.text_field :series_statement_identifier, class: 'resource_identifier' %>
38
39
  </div>
40
+ -->
39
41
  <div class="field">
40
42
  <%= f.label :note -%><br />
41
43
  <%= f.text_area :note, class: 'resource_textarea' -%>
@@ -23,18 +23,6 @@
23
23
  <% end %>
24
24
  </td>
25
25
  </tr>
26
- <tr>
27
- <td><%= t('activerecord.attributes.series_statement.volume_number_string') -%></td>
28
- <td><%= @series_statement.volume_number_string %></td>
29
- </tr>
30
- <tr>
31
- <td><%= t('activerecord.attributes.series_statement.creator_string') -%></td>
32
- <td><%= @series_statement.creator_string %></td>
33
- </tr>
34
- <tr>
35
- <td><%= t('activerecord.attributes.series_statement.series_master') -%></td>
36
- <td><%= localized_boolean(@series_statement.series_master) %></td>
37
- </tr>
38
26
  <tr>
39
27
  <td><%= t('activerecord.attributes.series_statement.note') -%></td>
40
28
  <td><%= @series_statement.note %></td>
@@ -43,11 +43,6 @@ en:
43
43
  series_statement_merge: Series statement merge
44
44
  series_statement_merge_list: Series statement merge list
45
45
  periodical: Periodical
46
- doi_record: DOI
47
- manifestation_custom_property: Manifestation custom property
48
- manifestation_custom_value: Manifestation custom value
49
- item_custom_property: Item custom property
50
- item_custom_value: Item custom value
51
46
 
52
47
  attributes:
53
48
  manifestation:
@@ -80,15 +75,13 @@ en:
80
75
  edition: Edition (integer)
81
76
  edition_string: Edition
82
77
  note: Note
83
- memo: Memo
84
78
  repository_content: Repository content
85
79
  lock_version: Lock version
86
- carrier_type: Carrier type
80
+ carrier_type: Manifestation form
87
81
  language: Language
88
82
  lccn: LCCN
89
83
  issn: ISSN
90
84
  subscription_master: Subscription master
91
- abstract: Abstract
92
85
  description: Description
93
86
  creator_string: Creator
94
87
  contributor_string: Contributor
@@ -105,23 +98,18 @@ en:
105
98
  extent: Extent
106
99
  dimensions: Dimensions
107
100
  fulltext_content: Fulltext content
108
- date_copyrighted: Date copyrighted
109
101
  manifestation/subjects:
110
102
  term: Subject
111
103
  manifestation/classifications:
112
104
  category: Classification
113
105
  manifestation/identifiers:
114
106
  body: Identifier
115
- manifestation/manifestation_custom_properties:
116
- name: Name
117
- value: Value
118
107
  item:
119
108
  call_number: Call number
120
109
  item_identifier: Item identifier
121
110
  deleted_at: Deleted at
122
111
  include_supplements: Include supplements
123
112
  note: Note
124
- memo: Memo
125
113
  url: URL
126
114
  price: Price
127
115
  lock_version: Lock version
@@ -133,9 +121,6 @@ en:
133
121
  budget_type_id: Budget type
134
122
  bookstore_id: Bookstore
135
123
  required_role_id: Required role
136
- item/item_custom_properties:
137
- name: Name
138
- value: Value
139
124
  agent:
140
125
  last_name: Last name
141
126
  middle_name: Middle name
@@ -346,18 +331,6 @@ en:
346
331
  series_statement_merge_list:
347
332
  title: Title
348
333
  series_statement_merge:
349
- manifestation_custom_property:
350
- name: Property name
351
- display_name: Display name
352
- note: Note
353
- manifestation_custom_value:
354
- value: Value
355
- item_custom_property:
356
- name: Property name
357
- display_name: Display name
358
- note: Note
359
- item_custom_value:
360
- value: Value
361
334
 
362
335
  resource_import_file:
363
336
  update_relationship: Update relationship
@@ -43,11 +43,6 @@ ja:
43
43
  series_statement_merge_list: シリーズ情報統合リスト
44
44
  series_statement_merge: シリーズ情報の統合
45
45
  periodical: 逐次刊行物
46
- doi_record: DOI
47
- manifestation_custom_property: 書誌カスタム項目
48
- manifestation_custom_value: 書誌カスタム項目の値
49
- item_custom_property: 所蔵カスタム項目
50
- item_custom_value: 所蔵カスタム項目の値
51
46
 
52
47
  attributes:
53
48
  manifestation:
@@ -80,7 +75,6 @@ ja:
80
75
  edition: 版(数字)
81
76
  edition_string: 版
82
77
  note: 注記
83
- memo: 業務メモ
84
78
  repository_content: リポジトリのコンテンツ
85
79
  lock_version: ロックバージョン
86
80
  carrier_type: 資料の形態
@@ -88,7 +82,6 @@ ja:
88
82
  lccn: LCCN
89
83
  issn: ISSN
90
84
  subscription_master: 購読マスタ
91
- abstract: 内容細目
92
85
  description: 説明
93
86
  creator_string: 著者
94
87
  contributor_string: 協力者・編者
@@ -105,23 +98,18 @@ ja:
105
98
  extent: ページ数
106
99
  dimensions: 大きさ
107
100
  fulltext_content: 全文あり
108
- date_copyrighted: 著作権発行日
109
101
  manifestation/subjects:
110
- term: 件名
102
+ term: 件名
111
103
  manifestation/classifications:
112
- category: 分類
104
+ category: 分類
113
105
  manifestation/identifiers:
114
- body: 識別子
115
- manifestation/manifesetation_custom_properties:
116
- name: 項目名
117
- value: 値
106
+ body: 識別子
118
107
  item:
119
108
  call_number: 請求記号
120
109
  item_identifier: 所蔵情報ID
121
110
  deleted_at: 削除時刻
122
111
  include_supplements: 付録を含む
123
112
  note: 注記
124
- memo: 業務メモ
125
113
  url: URL
126
114
  price: 購入価格
127
115
  lock_version: ロックバージョン
@@ -133,9 +121,6 @@ ja:
133
121
  budget_type_id: 予算種別
134
122
  bookstore_id: 書店
135
123
  required_role_id: 閲覧に必要な権限
136
- item/item_custom_properties:
137
- name: 項目名
138
- value: 値
139
124
  agent:
140
125
  last_name: 姓
141
126
  middle_name: ミドルネーム
@@ -350,18 +335,6 @@ ja:
350
335
  series_statement_merge_list:
351
336
  title: タイトル
352
337
  series_statement_merge:
353
- manifestation_custom_property:
354
- name: 項目コード
355
- display_name: 項目表示名
356
- note: 注記
357
- manifestation_custom_value:
358
- value: 値
359
- item_custom_property:
360
- name: 項目コード
361
- display_name: 項目表示名
362
- note: 注記
363
- item_custom_value:
364
- value: 値
365
338
 
366
339
  resource_import_file:
367
340
  update_relationship: 関連を更新
data/config/routes.rb CHANGED
@@ -1,6 +1,4 @@
1
1
  Rails.application.routes.draw do
2
- resources :item_custom_properties
3
- resources :manifestation_custom_properties
4
2
  resources :resource_export_files
5
3
 
6
4
  resources :identifier_types
@@ -3,7 +3,9 @@ class CreatePictureFiles < ActiveRecord::Migration[4.2]
3
3
  create_table :picture_files do |t|
4
4
  t.integer :picture_attachable_id
5
5
  t.string :picture_attachable_type
6
+ t.string :content_type
6
7
  t.text :title
8
+ t.string :thumbnail
7
9
  t.integer :position
8
10
 
9
11
  t.timestamps
@@ -0,0 +1,11 @@
1
+ class CreateIssnRecords < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :issn_records do |t|
4
+ t.string :body, index: {unique: true}, null: false
5
+ t.string :issn_type
6
+ t.string :source
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ class CreateIsbnRecords < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :isbn_records do |t|
4
+ t.string :body, index: {unique: true}, null: false
5
+ t.string :isbn_type
6
+ t.string :source
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ class CreateIssnRecordAndManifestations < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :issn_record_and_manifestations do |t|
4
+ t.references :issn_record, foreign_key: true, on_delete: :cascade, null: false
5
+ t.references :manifestation, foreign_key: true, on_delete: :cascade, null: false
6
+ t.integer :position
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ class CreateIsbnRecordAndManifestations < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :isbn_record_and_manifestations do |t|
4
+ t.references :isbn_record, foreign_key: true, on_delete: :cascade, null: false
5
+ t.references :manifestation, foreign_key: true, null: false, on_delete: :cascade
6
+ t.integer :position
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ class CreateDoiRecords < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :doi_records do |t|
4
+ t.string :body, index: {unique: true}, null: false
5
+ t.string :display_body, null: false
6
+ t.string :source
7
+ t.jsonb :response, default: {}, null: false
8
+ t.references :manifestation, foreign_key: true, null: false
9
+
10
+ t.timestamps
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,10 @@
1
+ class CreatePeriodicals < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :periodicals do |t|
4
+ t.text :original_title, null: false
5
+ t.references :frequency, foreign_key: true, null: false
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+ class CreatePeriodicalAndManifestations < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :periodical_and_manifestations do |t|
4
+ t.references :periodical, foreign_key: true, null: false
5
+ t.references :manifestation, foreign_key: true, null: false
6
+ t.boolean :periodical_master, default: false, null: false, index: {where: 'periodical_master IS true', unique: true}
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,21 @@
1
+ class AddDisplayNameTranslationsToCarrierType < ActiveRecord::Migration[5.2]
2
+ def change
3
+ [
4
+ :agent_relationship_types,
5
+ :agent_types,
6
+ :carrier_types,
7
+ :content_types,
8
+ :create_types,
9
+ :form_of_works,
10
+ :frequencies,
11
+ :languages,
12
+ :licenses,
13
+ :manifestation_relationship_types,
14
+ :medium_of_performances,
15
+ :produce_types,
16
+ :realize_types
17
+ ].each do |table|
18
+ add_column table, :display_name_translations, :jsonb, default: {}, null: false
19
+ end
20
+ end
21
+ end
@@ -54,13 +54,9 @@ class Openurl
54
54
  # 検索
55
55
  def search
56
56
  search = Sunspot.new_search(Manifestation)
57
- role = Role.default_role
58
57
  @query_text = build_query
59
58
  query = @query_text
60
- search.build do
61
- fulltext query
62
- with(:required_role_id).less_than_or_equal_to role.id
63
- end
59
+ search.build{ fulltext query }
64
60
  search.execute!.results
65
61
  end
66
62