enju_biblio 0.3.18 → 0.4.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (444) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -3
  3. data/app/controllers/agent_import_results_controller.rb +1 -1
  4. data/app/controllers/agents_controller.rb +6 -0
  5. data/app/controllers/content_types_controller.rb +1 -1
  6. data/app/controllers/items_controller.rb +12 -20
  7. data/app/controllers/manifestations_controller.rb +89 -84
  8. data/app/controllers/resource_import_results_controller.rb +3 -7
  9. data/app/controllers/series_statements_controller.rb +6 -0
  10. data/app/helpers/enju_biblio/application_helper.rb +5 -5
  11. data/app/helpers/manifestations_helper.rb +12 -12
  12. data/app/models/agent.rb +4 -13
  13. data/app/models/agent_import_file.rb +1 -1
  14. data/app/models/agent_relationship_type.rb +8 -7
  15. data/app/models/agent_type.rb +10 -7
  16. data/app/models/carrier_type.rb +14 -11
  17. data/app/models/content_type.rb +10 -7
  18. data/app/models/create_type.rb +8 -7
  19. data/app/{models2 → models}/doi_record.rb +0 -0
  20. data/app/models/form_of_work.rb +11 -8
  21. data/app/models/frequency.rb +11 -8
  22. data/app/models/identifier.rb +1 -5
  23. data/app/models/identifier_type.rb +1 -0
  24. data/app/models/import_request.rb +3 -4
  25. data/app/{models2 → models}/isbn_record.rb +1 -1
  26. data/app/{models2 → models}/isbn_record_and_manifestation.rb +0 -0
  27. data/app/{models2 → models}/issn_record.rb +1 -1
  28. data/app/{models2 → models}/issn_record_and_manifestation.rb +0 -0
  29. data/app/models/item.rb +7 -56
  30. data/app/models/language.rb +10 -9
  31. data/app/models/license.rb +9 -7
  32. data/app/models/manifestation.rb +272 -160
  33. data/app/models/manifestation_relationship_type.rb +9 -7
  34. data/app/models/medium_of_performance.rb +11 -8
  35. data/app/{models2 → models}/periodical.rb +0 -0
  36. data/app/{models2 → models}/periodical_and_manifestation.rb +0 -0
  37. data/app/models/picture_file.rb +3 -1
  38. data/app/models/produce_type.rb +8 -7
  39. data/app/models/realize_type.rb +8 -7
  40. data/app/models/resource_export_file.rb +8 -6
  41. data/app/models/resource_export_file_state_machine.rb +1 -1
  42. data/app/models/resource_import_file.rb +66 -161
  43. data/app/views/agent_import_results/index.txt.erb +3 -0
  44. data/app/views/agent_relationship_types/index.html.erb +4 -4
  45. data/app/views/agent_relationship_types/show.html.erb +1 -1
  46. data/app/views/agent_relationships/_form.html.erb +1 -1
  47. data/app/views/agent_types/index.html.erb +1 -1
  48. data/app/views/agent_types/show.html.erb +1 -1
  49. data/app/views/agents/_agent.html.erb +1 -1
  50. data/app/views/agents/_agent_list.html.erb +2 -2
  51. data/app/views/agents/_form.html.erb +4 -4
  52. data/app/views/agents/_index_agent.html.erb +1 -1
  53. data/app/views/agents/_index_agent_merge_list.html.erb +1 -1
  54. data/app/views/agents/_index_expression.html.erb +2 -2
  55. data/app/views/agents/_index_manifestation.html.erb +2 -2
  56. data/app/views/agents/_index_work.html.erb +2 -2
  57. data/app/views/agents/index.atom.builder +1 -1
  58. data/app/views/agents/index.rss.builder +3 -3
  59. data/app/views/agents/show.html+phone.erb +2 -2
  60. data/app/views/agents/show.html.erb +2 -2
  61. data/app/views/carrier_types/index.html.erb +2 -2
  62. data/app/views/carrier_types/show.html.erb +3 -3
  63. data/app/views/content_types/index.html.erb +1 -1
  64. data/app/views/content_types/show.html.erb +1 -1
  65. data/app/views/countries/index.html.erb +1 -1
  66. data/app/views/countries/show.html.erb +1 -1
  67. data/app/views/create_types/index.html.erb +1 -1
  68. data/app/views/create_types/show.html.erb +1 -1
  69. data/app/views/creates/_form.html.erb +1 -1
  70. data/app/views/form_of_works/index.html.erb +1 -1
  71. data/app/views/form_of_works/show.html.erb +1 -1
  72. data/app/views/frequencies/index.html.erb +1 -1
  73. data/app/views/frequencies/show.html.erb +1 -1
  74. data/app/views/identifier_types/index.html.erb +1 -1
  75. data/app/views/identifier_types/show.html.erb +1 -1
  76. data/app/views/items/_form.html.erb +13 -33
  77. data/app/views/items/index.html+phone.erb +3 -3
  78. data/app/views/items/index.html.erb +3 -3
  79. data/app/views/items/index.txt.erb +4 -0
  80. data/app/views/items/show.html+phone.erb +5 -5
  81. data/app/views/items/show.html.erb +119 -134
  82. data/app/views/languages/index.html.erb +1 -1
  83. data/app/views/languages/show.html.erb +1 -1
  84. data/app/views/layouts/agents.html.erb +2 -2
  85. data/app/views/layouts/items.html.erb +1 -1
  86. data/app/views/layouts/manifestations.html.erb +4 -4
  87. data/app/views/licenses/index.html.erb +1 -1
  88. data/app/views/licenses/show.html.erb +1 -1
  89. data/app/views/manifestation_relationship_types/index.html.erb +1 -1
  90. data/app/views/manifestation_relationship_types/show.html.erb +1 -1
  91. data/app/views/manifestation_relationships/_form.html.erb +1 -1
  92. data/app/views/manifestations/_book_jacket.html.erb +5 -9
  93. data/app/views/manifestations/_call_number.html.erb +3 -3
  94. data/app/views/manifestations/_carrier_type_facet.html.erb +1 -1
  95. data/app/views/manifestations/_classification_facet.html.erb +2 -2
  96. data/app/views/manifestations/_colorbox.html.erb +1 -1
  97. data/app/views/manifestations/_export_detail.html.erb +0 -1
  98. data/app/views/manifestations/_export_list.html.erb +3 -4
  99. data/app/views/manifestations/_form.html.erb +8 -31
  100. data/app/views/manifestations/_identifier_fields.html.erb +1 -1
  101. data/app/views/manifestations/_language_facet.html.erb +1 -1
  102. data/app/views/manifestations/_library_facet.html.erb +1 -1
  103. data/app/views/manifestations/_manifestation.txt.erb +1 -1
  104. data/app/views/manifestations/_pickup.html.erb +1 -1
  105. data/app/views/manifestations/_pub_year_facet.html.erb +1 -1
  106. data/app/views/manifestations/_reservable_facet.html.erb +2 -2
  107. data/app/views/manifestations/_show_creators.html.erb +1 -1
  108. data/app/views/manifestations/_show_detail_librarian.html.erb +13 -37
  109. data/app/views/manifestations/_show_detail_user.html.erb +13 -25
  110. data/app/views/manifestations/_show_holding.html+phone.erb +3 -3
  111. data/app/views/manifestations/_show_holding.html.erb +2 -2
  112. data/app/views/manifestations/_title.html.erb +1 -1
  113. data/app/views/manifestations/explain.sru +9 -0
  114. data/app/views/manifestations/index.atom.builder +1 -1
  115. data/app/views/manifestations/index.html.erb +7 -7
  116. data/app/views/manifestations/index.opds.builder +1 -1
  117. data/app/views/manifestations/index.rdf.builder +3 -3
  118. data/app/views/manifestations/index.rss.builder +3 -3
  119. data/app/views/manifestations/index.sru.builder +101 -0
  120. data/app/views/manifestations/index.txt.erb +1 -0
  121. data/app/views/manifestations/show.html.erb +1 -0
  122. data/app/views/manifestations/show.txt.erb +1 -0
  123. data/app/views/medium_of_performances/index.html.erb +1 -1
  124. data/app/views/medium_of_performances/show.html.erb +1 -1
  125. data/app/views/notifier/manifestation_info.en.text.erb +1 -1
  126. data/app/views/notifier/manifestation_info.ja.text.erb +1 -1
  127. data/app/views/picture_files/edit.html.erb +0 -4
  128. data/app/views/produce_types/index.html.erb +1 -1
  129. data/app/views/produce_types/show.html.erb +1 -1
  130. data/app/views/produces/_form.html.erb +1 -1
  131. data/app/views/realize_types/index.html.erb +1 -1
  132. data/app/views/realize_types/show.html.erb +1 -1
  133. data/app/views/realizes/_form.html.erb +1 -1
  134. data/app/views/resource_import_files/_results.html.erb +0 -6
  135. data/app/views/resource_import_files/new.html.erb +2 -2
  136. data/app/views/resource_import_results/index.html.erb +11 -0
  137. data/app/views/resource_import_results/index.txt.erb +3 -0
  138. data/app/views/series_statements/_form.html.erb +8 -6
  139. data/app/views/series_statements/show.html.erb +0 -12
  140. data/config/locales/translation_en.yml +1 -28
  141. data/config/locales/translation_ja.yml +3 -30
  142. data/config/routes.rb +0 -2
  143. data/db/migrate/20081027150907_create_picture_files.rb +2 -0
  144. data/db/migrate/20160319144230_create_issn_records.rb +11 -0
  145. data/db/migrate/20160506144040_create_isbn_records.rb +11 -0
  146. data/db/migrate/20170116134107_create_issn_record_and_manifestations.rb +11 -0
  147. data/db/migrate/20170116134120_create_isbn_record_and_manifestations.rb +11 -0
  148. data/db/migrate/20190102034126_create_doi_records.rb +13 -0
  149. data/db/migrate/20190311154610_create_periodicals.rb +10 -0
  150. data/db/migrate/20190312033839_create_periodical_and_manifestations.rb +11 -0
  151. data/db/migrate/20190712163038_add_display_name_translations_to_carrier_type.rb +21 -0
  152. data/lib/enju_biblio/openurl.rb +1 -5
  153. data/lib/enju_biblio/porta_cql.rb +282 -0
  154. data/lib/enju_biblio/sru.rb +83 -0
  155. data/lib/enju_biblio/version.rb +1 -1
  156. data/lib/enju_biblio.rb +2 -0
  157. data/lib/generators/enju_biblio/setup/setup_generator.rb +0 -2
  158. data/lib/generators/enju_biblio/setup/templates/db/fixtures/agent_relationship_types.yml +3 -3
  159. data/lib/generators/enju_biblio/setup/templates/db/fixtures/agent_types.yml +2 -4
  160. data/lib/generators/enju_biblio/setup/templates/db/fixtures/carrier_types.yml +8 -26
  161. data/lib/generators/enju_biblio/setup/templates/db/fixtures/content_types.yml +12 -24
  162. data/lib/generators/enju_biblio/setup/templates/db/fixtures/create_types.yml +4 -22
  163. data/lib/generators/enju_biblio/setup/templates/db/fixtures/form_of_works.yml +1 -1
  164. data/lib/generators/enju_biblio/setup/templates/db/fixtures/frequencies.yml +9 -18
  165. data/lib/generators/enju_biblio/setup/templates/db/fixtures/languages.yml +2 -4
  166. data/lib/generators/enju_biblio/setup/templates/db/fixtures/licenses.yml +2 -2
  167. data/lib/generators/enju_biblio/setup/templates/db/fixtures/manifestation_relationship_types.yml +2 -4
  168. data/lib/generators/enju_biblio/setup/templates/db/fixtures/medium_of_performances.yml +15 -0
  169. data/lib/generators/enju_biblio/setup/templates/db/fixtures/produce_types.yml +2 -19
  170. data/lib/generators/enju_biblio/setup/templates/db/fixtures/realize_types.yml +3 -21
  171. 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
  172. data/spec/controllers/content_types_controller_spec.rb +1 -1
  173. data/spec/controllers/items_controller_spec.rb +1 -64
  174. data/spec/controllers/manifestations_controller_spec.rb +21 -51
  175. data/spec/dummy/app/helpers/application_helper.rb +1 -1
  176. data/spec/dummy/app/models/user.rb +4 -0
  177. data/spec/dummy/bin/bundle +1 -1
  178. data/spec/dummy/bin/setup +1 -3
  179. data/spec/dummy/bin/update +4 -2
  180. data/spec/dummy/bin/yarn +3 -3
  181. data/spec/dummy/config/application.rb +1 -2
  182. data/spec/dummy/config/database.yml +70 -9
  183. data/spec/dummy/config/initializers/assets.rb +2 -2
  184. data/spec/dummy/db/development.sqlite3 +0 -0
  185. data/spec/dummy/db/migrate/002_devise_create_users.rb +1 -0
  186. data/spec/dummy/db/migrate/113_create_events.rb +2 -4
  187. data/spec/dummy/db/migrate/154_create_messages.rb +4 -8
  188. data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +3 -3
  189. data/spec/dummy/db/migrate/20081028093607_create_event_import_files.rb +2 -4
  190. data/spec/dummy/db/migrate/20090519203307_create_participates.rb +2 -4
  191. data/spec/dummy/db/migrate/20100925074639_create_event_import_results.rb +2 -2
  192. data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +1 -0
  193. data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +1 -1
  194. data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +1 -1
  195. data/spec/dummy/db/migrate/20140523171309_create_event_import_file_transitions.rb +1 -1
  196. data/spec/dummy/db/migrate/20140524135607_create_bookmark_stat_transitions.rb +1 -1
  197. data/spec/dummy/db/migrate/20140720192418_add_default_library_id_to_event_import_file.rb +1 -1
  198. data/spec/dummy/db/migrate/20140812152348_create_event_export_files.rb +1 -1
  199. data/spec/dummy/db/migrate/20140812153137_create_event_export_file_transitions.rb +1 -1
  200. data/spec/dummy/db/migrate/20140814070854_add_default_event_category_id_to_event_import_file.rb +1 -1
  201. data/spec/dummy/db/migrate/20151128142913_create_places.rb +14 -0
  202. data/spec/dummy/db/migrate/20151201163718_add_place_id_to_event.rb +5 -0
  203. data/spec/dummy/db/migrate/20160703184258_add_most_recent_to_event_import_file_transitions.rb +9 -0
  204. data/spec/dummy/db/migrate/20160703184311_add_most_recent_to_event_export_file_transitions.rb +9 -0
  205. data/spec/dummy/db/migrate/20160813191533_add_book_jacket_source_to_library_group.rb +1 -1
  206. data/spec/dummy/db/migrate/20160813191820_add_screenshot_generator_to_library_group.rb +1 -1
  207. data/spec/dummy/db/migrate/20160815045420_add_most_recent_to_bookmark_stat_transitions.rb +9 -0
  208. data/spec/dummy/db/migrate/20170116150432_create_jpno_records.rb +10 -0
  209. data/spec/dummy/db/migrate/20171126072934_create_ndla_records.rb +10 -0
  210. data/spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb +13 -0
  211. data/spec/dummy/db/migrate/20180107162711_add_constraints_to_most_recent_for_message_request_transitions.rb +13 -0
  212. data/spec/dummy/db/migrate/20180107164558_add_constraints_to_most_recent_for_event_import_file_transitions.rb +13 -0
  213. data/spec/dummy/db/migrate/20180107164617_add_constraints_to_most_recent_for_event_export_file_transitions.rb +13 -0
  214. data/spec/dummy/db/migrate/20180107172413_add_constraints_to_most_recent_for_bookmark_stat_transitions.rb +13 -0
  215. data/spec/dummy/db/migrate/20180709023035_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb +36 -0
  216. data/spec/dummy/db/migrate/20180709023036_add_missing_unique_indices.acts_as_taggable_on_engine.rb +26 -0
  217. data/spec/dummy/db/migrate/20180709023037_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +20 -0
  218. data/spec/dummy/db/migrate/20180709023038_add_missing_taggable_index.acts_as_taggable_on_engine.rb +15 -0
  219. data/spec/dummy/db/migrate/20180709023039_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +15 -0
  220. data/spec/dummy/db/migrate/20180709023040_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb +23 -0
  221. data/spec/dummy/db/migrate/20180709161346_add_created_at_to_tag.rb +6 -0
  222. data/spec/dummy/db/migrate/20181119170645_add_foreign_key_to_events_referencing_event_categories.rb +5 -0
  223. data/spec/dummy/db/migrate/20190501043418_create_ndl_bib_id_records.rb +10 -0
  224. data/spec/dummy/db/migrate/20190508160525_create_retains.rb +10 -0
  225. data/spec/dummy/db/migrate/20190630113817_add_display_name_translations_to_library_group.rb +12 -0
  226. data/spec/dummy/db/migrate/20190630115523_add_login_banner_translations_to_library_group.rb +6 -0
  227. data/spec/dummy/db/migrate/20190630151446_add_display_name_translations_to_role.rb +5 -0
  228. data/spec/dummy/db/migrate/20190630153136_add_display_name_translations_to_event.rb +6 -0
  229. data/spec/dummy/db/migrate/20190706052525_add_display_name_translations_to_circulation_status.rb +5 -0
  230. data/spec/dummy/db/schema.rb +335 -221
  231. data/spec/dummy/db/test.sqlite3 +0 -0
  232. data/spec/factories/create_types.rb +8 -7
  233. data/spec/factories/produce_types.rb +8 -7
  234. data/spec/factories/realize_types.rb +8 -7
  235. data/spec/factories/series_statement.rb +3 -4
  236. data/spec/fixtures/agent_relationship_types.yml +8 -7
  237. data/spec/fixtures/agent_types.yml +11 -10
  238. data/spec/fixtures/carrier_types.yml +16 -15
  239. data/spec/fixtures/content_types.yml +20 -31
  240. data/spec/fixtures/create_types.yml +12 -15
  241. data/spec/fixtures/creates.yml +0 -2
  242. data/spec/fixtures/form_of_works.yml +11 -10
  243. data/spec/fixtures/frequencies.yml +17 -25
  244. data/spec/fixtures/items.yml +11 -13
  245. data/spec/fixtures/languages.yml +11 -11
  246. data/spec/fixtures/libraries.yml +30 -30
  247. data/spec/fixtures/library_groups.yml +11 -6
  248. data/spec/fixtures/licenses.yml +8 -7
  249. data/spec/fixtures/manifestation_relationship_types.yml +12 -11
  250. data/spec/fixtures/manifestations.yml +1 -3
  251. data/spec/fixtures/medium_of_performances.yml +10 -9
  252. data/spec/fixtures/picture_files.yml +2 -0
  253. data/spec/fixtures/produce_types.yml +10 -11
  254. data/spec/fixtures/produces.yml +0 -2
  255. data/spec/fixtures/profiles.yml +8 -5
  256. data/spec/fixtures/realize_types.yml +11 -13
  257. data/spec/fixtures/realizes.yml +0 -2
  258. data/spec/fixtures/request_status_types.yml +14 -14
  259. data/spec/fixtures/request_types.yml +13 -13
  260. data/spec/fixtures/resource_export_files.yml +1 -1
  261. data/spec/fixtures/resource_import_results.yml +2 -2
  262. data/spec/fixtures/roles.yml +22 -5
  263. data/spec/fixtures/shelves.yml +16 -16
  264. data/spec/fixtures/user_groups.yml +12 -12
  265. data/spec/fixtures/user_has_roles.yml +3 -4
  266. data/spec/fixtures/users.yml +0 -3
  267. data/spec/models/agent_relationship_type_spec.rb +8 -7
  268. data/spec/models/agent_type_spec.rb +8 -7
  269. data/spec/models/carrier_type_spec.rb +12 -11
  270. data/spec/models/content_type_spec.rb +8 -7
  271. data/spec/models/create_type_spec.rb +8 -7
  272. data/spec/models/doi_record_spec.rb +19 -0
  273. data/spec/models/form_of_work_spec.rb +8 -7
  274. data/spec/models/frequency_spec.rb +8 -7
  275. data/spec/models/item_spec.rb +0 -7
  276. data/spec/models/language_spec.rb +10 -9
  277. data/spec/models/license_spec.rb +8 -7
  278. data/spec/models/manifestation_relationship_type_spec.rb +8 -7
  279. data/spec/models/manifestation_spec.rb +82 -39
  280. data/spec/models/medium_of_performance_spec.rb +8 -7
  281. data/spec/models/periodical_and_manifestation_spec.rb +17 -0
  282. data/spec/models/periodical_spec.rb +16 -0
  283. data/spec/models/picture_file_spec.rb +3 -7
  284. data/spec/models/produce_type_spec.rb +8 -7
  285. data/spec/models/realize_type_spec.rb +8 -7
  286. data/spec/models/resource_export_file_spec.rb +9 -62
  287. data/spec/models/resource_import_file_spec.rb +14 -62
  288. data/spec/rails_helper.rb +8 -4
  289. data/spec/system/manifestations_spec.rb +0 -30
  290. data/spec/views/items/index.html.erb_spec.rb +6 -7
  291. data/spec/views/manifestations/index.html.erb_spec.rb +1 -1
  292. data/spec/views/manifestations/index.rdf.builder_spec.rb +1 -0
  293. data/spec/views/manifestations/{index.text.ruby_spec.rb → index.txt.erb_spec.rb} +1 -1
  294. data/spec/views/manifestations/{show.text.ruby_spec.rb → show.txt.erb_spec.rb} +2 -2
  295. data/spec/views/resource_import_results/show.html.erb_spec.rb +1 -1
  296. metadata +571 -788
  297. data/app/controllers/item_custom_properties_controller.rb +0 -69
  298. data/app/controllers/manifestation_custom_properties_controller.rb +0 -69
  299. data/app/models/item_custom_property.rb +0 -18
  300. data/app/models/item_custom_value.rb +0 -17
  301. data/app/models/manifestation_custom_property.rb +0 -18
  302. data/app/models/manifestation_custom_value.rb +0 -17
  303. data/app/models2/agent.rb +0 -331
  304. data/app/models2/agent_import_file.rb +0 -259
  305. data/app/models2/agent_import_file_state_machine.rb +0 -19
  306. data/app/models2/agent_import_file_transition.rb +0 -20
  307. data/app/models2/agent_import_result.rb +0 -20
  308. data/app/models2/agent_merge.rb +0 -17
  309. data/app/models2/agent_merge_list.rb +0 -27
  310. data/app/models2/agent_relationship.rb +0 -24
  311. data/app/models2/agent_relationship_type.rb +0 -20
  312. data/app/models2/agent_type.rb +0 -19
  313. data/app/models2/carrier_type.rb +0 -50
  314. data/app/models2/content_type.rb +0 -19
  315. data/app/models2/country.rb +0 -47
  316. data/app/models2/create.rb +0 -29
  317. data/app/models2/create_type.rb +0 -19
  318. data/app/models2/donate.rb +0 -15
  319. data/app/models2/form_of_work.rb +0 -19
  320. data/app/models2/frequency.rb +0 -19
  321. data/app/models2/identifier.rb +0 -83
  322. data/app/models2/identifier_type.rb +0 -18
  323. data/app/models2/import_request.rb +0 -77
  324. data/app/models2/import_request_state_machine.rb +0 -9
  325. data/app/models2/import_request_transition.rb +0 -21
  326. data/app/models2/item.rb +0 -173
  327. data/app/models2/item_custom_property.rb +0 -18
  328. data/app/models2/item_custom_value.rb +0 -17
  329. data/app/models2/language.rb +0 -39
  330. data/app/models2/license.rb +0 -18
  331. data/app/models2/manifestation.rb +0 -764
  332. data/app/models2/manifestation_custom_property.rb +0 -18
  333. data/app/models2/manifestation_custom_value.rb +0 -17
  334. data/app/models2/manifestation_relationship.rb +0 -27
  335. data/app/models2/manifestation_relationship_type.rb +0 -20
  336. data/app/models2/medium_of_performance.rb +0 -19
  337. data/app/models2/own.rb +0 -29
  338. data/app/models2/picture_file.rb +0 -60
  339. data/app/models2/produce.rb +0 -30
  340. data/app/models2/produce_type.rb +0 -19
  341. data/app/models2/realize.rb +0 -29
  342. data/app/models2/realize_type.rb +0 -19
  343. data/app/models2/resource_export_file.rb +0 -64
  344. data/app/models2/resource_export_file_state_machine.rb +0 -15
  345. data/app/models2/resource_export_file_transition.rb +0 -21
  346. data/app/models2/resource_import_file.rb +0 -909
  347. data/app/models2/resource_import_file_state_machine.rb +0 -19
  348. data/app/models2/resource_import_file_transition.rb +0 -21
  349. data/app/models2/resource_import_result.rb +0 -24
  350. data/app/models2/series_statement.rb +0 -72
  351. data/app/models2/series_statement_merge.rb +0 -17
  352. data/app/models2/series_statement_merge_list.rb +0 -17
  353. data/app/policies/item_custom_property_policy.rb +0 -21
  354. data/app/policies/manifestation_custom_property_policy.rb +0 -21
  355. data/app/views/agent_import_results/index.text.ruby +0 -5
  356. data/app/views/item_custom_properties/_form.html.erb +0 -32
  357. data/app/views/item_custom_properties/edit.html.erb +0 -13
  358. data/app/views/item_custom_properties/index.html.erb +0 -43
  359. data/app/views/item_custom_properties/new.html.erb +0 -12
  360. data/app/views/item_custom_properties/show.html.erb +0 -28
  361. data/app/views/items/_item.json.jbuilder +0 -17
  362. data/app/views/items/index.json.jbuilder +0 -5
  363. data/app/views/items/index.text.ruby +0 -13
  364. data/app/views/items/show.json.jbuilder +0 -1
  365. data/app/views/manifestation_custom_properties/_form.html.erb +0 -32
  366. data/app/views/manifestation_custom_properties/edit.html.erb +0 -13
  367. data/app/views/manifestation_custom_properties/index.html.erb +0 -43
  368. data/app/views/manifestation_custom_properties/new.html.erb +0 -12
  369. data/app/views/manifestation_custom_properties/show.html.erb +0 -28
  370. data/app/views/manifestations/index.text.ruby +0 -13
  371. data/app/views/manifestations/show.json.jbuilder +0 -2
  372. data/app/views/manifestations/show.text.ruby +0 -5
  373. data/app/views/resource_import_results/index.text.ruby +0 -5
  374. data/db/migrate/20190818075603_add_memo_to_manifestation.rb +0 -5
  375. data/db/migrate/20190818075628_add_memo_to_item.rb +0 -5
  376. data/db/migrate/20200425072340_create_manifestation_custom_properties.rb +0 -12
  377. data/db/migrate/20200425072349_create_item_custom_properties.rb +0 -12
  378. data/db/migrate/20200425074758_create_manifestation_custom_values.rb +0 -12
  379. data/db/migrate/20200425074822_create_item_custom_values.rb +0 -12
  380. data/lib/generators/enju_biblio/setup/templates/db/fixtures/agents.yml +0 -19
  381. data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_import_custom_values.yml +0 -121
  382. data/spec/cassette_library/resource_import_results/index_txt_ruby/renders_a_list_of_resource_import_results.yml +0 -121
  383. data/spec/controllers/item_custom_properties_controller_spec.rb +0 -449
  384. data/spec/controllers/manifestation_custom_properties_controller_spec.rb +0 -449
  385. data/spec/dummy/db/migrate/20081117143156_create_inventory_files.rb +0 -18
  386. data/spec/dummy/db/migrate/20081117143455_create_inventories.rb +0 -17
  387. data/spec/dummy/db/migrate/20090706125521_add_attachments_inventory_to_inventory_file.rb +0 -15
  388. data/spec/dummy/db/migrate/20091202124834_create_versions.rb +0 -18
  389. data/spec/dummy/db/migrate/20100525171356_acts_as_taggable_on_migration.rb +0 -30
  390. data/spec/dummy/db/migrate/20111217234412_add_save_checkout_history_to_user.rb +0 -5
  391. data/spec/dummy/db/migrate/20111218002349_add_checkout_icalendar_token_to_user.rb +0 -6
  392. data/spec/dummy/db/migrate/20120413100431_add_fingerprint_to_inventory_file.rb +0 -5
  393. data/spec/dummy/db/migrate/20150421023923_create_identities.rb +0 -14
  394. data/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb +0 -5
  395. data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +0 -18
  396. data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +0 -22
  397. data/spec/dummy/yarn.lock +0 -7560
  398. data/spec/factories/item_custom_property.rb +0 -6
  399. data/spec/factories/item_custom_value.rb +0 -6
  400. data/spec/factories/manifestation_custom_property.rb +0 -6
  401. data/spec/factories/manifestation_custom_value.rb +0 -6
  402. data/spec/fixtures/carrier_type_has_checkout_types.yml +0 -31
  403. data/spec/fixtures/checkout_stat_has_manifestations.yml +0 -24
  404. data/spec/fixtures/checkout_stat_has_users.yml +0 -24
  405. data/spec/fixtures/checkout_types.yml +0 -34
  406. data/spec/fixtures/circulation_statuses.yml +0 -136
  407. data/spec/fixtures/inventory_files.yml +0 -40
  408. data/spec/fixtures/item_custom_properties.yml +0 -24
  409. data/spec/fixtures/manifestation_checkout_stats.yml +0 -29
  410. data/spec/fixtures/manifestation_custom_properties.yml +0 -24
  411. data/spec/fixtures/manifestation_reserve_stats.yml +0 -29
  412. data/spec/fixtures/reserve_stat_has_manifestations.yml +0 -24
  413. data/spec/fixtures/reserve_stat_has_users.yml +0 -24
  414. data/spec/fixtures/reserve_transitions.yml +0 -104
  415. data/spec/fixtures/reserves.yml +0 -143
  416. data/spec/fixtures/use_restrictions.yml +0 -93
  417. data/spec/fixtures/user_checkout_stats.yml +0 -28
  418. data/spec/fixtures/user_group_has_checkout_types.yml +0 -111
  419. data/spec/fixtures/user_reserve_stats.yml +0 -28
  420. data/spec/models/item_custom_property_spec.rb +0 -18
  421. data/spec/models/item_custom_value_spec.rb +0 -17
  422. data/spec/models/manifestation_custom_property_spec.rb +0 -18
  423. data/spec/models/manifestation_custom_value_spec.rb +0 -17
  424. data/spec/requests/item_custom_properties_spec.rb +0 -129
  425. data/spec/requests/manifestation_custom_properties_spec.rb +0 -129
  426. data/spec/routing/item_custom_properties_routing_spec.rb +0 -38
  427. data/spec/routing/manifestation_custom_properties_routing_spec.rb +0 -38
  428. data/spec/system/items_spec.rb +0 -121
  429. data/spec/system/series_statements_spec.rb +0 -16
  430. data/spec/views/agent_import_results/index.html.erb_spec.rb +0 -29
  431. data/spec/views/agent_import_results/index.text.ruby_spec.rb +0 -20
  432. data/spec/views/agent_import_results/show.html.erb_spec.rb +0 -24
  433. data/spec/views/item_custom_properties/edit.html.erb_spec.rb +0 -21
  434. data/spec/views/item_custom_properties/index.html.erb_spec.rb +0 -25
  435. data/spec/views/item_custom_properties/new.html.erb_spec.rb +0 -21
  436. data/spec/views/item_custom_properties/show.html.erb_spec.rb +0 -16
  437. data/spec/views/items/index.json.jbuilder_spec.rb +0 -15
  438. data/spec/views/items/show.json.jbuilder_spec.rb +0 -15
  439. data/spec/views/manifestation_custom_properties/edit.html.erb_spec.rb +0 -21
  440. data/spec/views/manifestation_custom_properties/index.html.erb_spec.rb +0 -25
  441. data/spec/views/manifestation_custom_properties/new.html.erb_spec.rb +0 -21
  442. data/spec/views/manifestation_custom_properties/show.html.erb_spec.rb +0 -16
  443. data/spec/views/manifestations/show.json.jbuilder_spec.rb +0 -16
  444. data/spec/views/resource_import_results/index.text.ruby_spec.rb +0 -22
@@ -1,19 +0,0 @@
1
- class ResourceImportFileStateMachine
2
- include Statesman::Machine
3
-
4
- state :pending, initial: true
5
- state :started
6
- state :completed
7
- state :failed
8
-
9
- transition from: :pending, to: [:started, :failed]
10
- transition from: :started, to: [:completed, :failed]
11
-
12
- after_transition(from: :pending, to: :started) do |resource_import_file|
13
- resource_import_file.update_column(:executed_at, Time.zone.now)
14
- end
15
-
16
- before_transition(from: :started, to: :completed) do |resource_import_file|
17
- #resource_import_file.error_message = nil
18
- end
19
- end
@@ -1,21 +0,0 @@
1
- class ResourceImportFileTransition < ApplicationRecord
2
- include Statesman::Adapters::ActiveRecordTransition
3
-
4
-
5
- belongs_to :resource_import_file, inverse_of: :resource_import_file_transitions
6
- #attr_accessible :to_state, :sort_key, :metadata
7
- end
8
-
9
- # == Schema Information
10
- #
11
- # Table name: resource_import_file_transitions
12
- #
13
- # id :integer not null, primary key
14
- # to_state :string
15
- # metadata :text default({})
16
- # sort_key :integer
17
- # resource_import_file_id :integer
18
- # created_at :datetime
19
- # updated_at :datetime
20
- # most_recent :boolean not null
21
- #
@@ -1,24 +0,0 @@
1
- class ResourceImportResult < ApplicationRecord
2
- default_scope { order('resource_import_results.id') }
3
- scope :file_id, proc{|file_id| where(resource_import_file_id: file_id)}
4
- scope :failed, -> { where(manifestation_id: nil) }
5
- scope :skipped, -> { where('error_message IS NOT NULL') }
6
-
7
- belongs_to :resource_import_file
8
- belongs_to :manifestation, optional: true
9
- belongs_to :item, optional: true
10
- end
11
-
12
- # == Schema Information
13
- #
14
- # Table name: resource_import_results
15
- #
16
- # id :integer not null, primary key
17
- # resource_import_file_id :integer
18
- # manifestation_id :integer
19
- # item_id :integer
20
- # body :text
21
- # created_at :datetime
22
- # updated_at :datetime
23
- # error_message :text
24
- #
@@ -1,72 +0,0 @@
1
- class SeriesStatement < ApplicationRecord
2
- has_many :series_statement_merges, dependent: :destroy
3
- has_many :series_statement_merge_lists, through: :series_statement_merges
4
- belongs_to :manifestation, touch: true, optional: true
5
- belongs_to :root_manifestation, foreign_key: :root_manifestation_id, class_name: 'Manifestation', touch: true, optional: true
6
- validates :original_title, presence: true
7
- validates :root_manifestation_id, uniqueness: true, allow_nil: true
8
- before_save :create_root_series_statement
9
- after_save :reindex
10
- after_destroy :reindex
11
-
12
- acts_as_list
13
- searchable do
14
- text :title do
15
- titles
16
- end
17
- text :numbering, :title_subseries, :numbering_subseries
18
- integer :manifestation_id
19
- integer :position
20
- integer :series_statement_merge_list_ids, multiple: true
21
- end
22
-
23
- attr_accessor :selected
24
- strip_attributes only: :original_title
25
-
26
- paginates_per 10
27
-
28
- def reindex
29
- manifestation.try(:index)
30
- root_manifestation.try(:index)
31
- end
32
-
33
- def titles
34
- [
35
- original_title,
36
- title_transcription
37
- ]
38
- end
39
-
40
- def create_root_series_statement
41
- if series_master?
42
- self.root_manifestation = manifestation
43
- else
44
- self.root_manifestation = nil
45
- end
46
- end
47
- end
48
-
49
- # == Schema Information
50
- #
51
- # Table name: series_statements
52
- #
53
- # id :integer not null, primary key
54
- # original_title :text
55
- # numbering :text
56
- # title_subseries :text
57
- # numbering_subseries :text
58
- # position :integer
59
- # created_at :datetime
60
- # updated_at :datetime
61
- # title_transcription :text
62
- # title_alternative :text
63
- # series_statement_identifier :string
64
- # manifestation_id :integer
65
- # note :text
66
- # title_subseries_transcription :text
67
- # creator_string :text
68
- # volume_number_string :text
69
- # volume_number_transcription_string :text
70
- # series_master :boolean
71
- # root_manifestation_id :integer
72
- #
@@ -1,17 +0,0 @@
1
- class SeriesStatementMerge < ApplicationRecord
2
- belongs_to :series_statement
3
- belongs_to :series_statement_merge_list
4
-
5
- paginates_per 10
6
- end
7
-
8
- # == Schema Information
9
- #
10
- # Table name: series_statement_merges
11
- #
12
- # id :integer not null, primary key
13
- # series_statement_id :integer not null
14
- # series_statement_merge_list_id :integer not null
15
- # created_at :datetime
16
- # updated_at :datetime
17
- #
@@ -1,17 +0,0 @@
1
- class SeriesStatementMergeList < ApplicationRecord
2
- has_many :series_statement_merges, dependent: :destroy
3
- has_many :series_statements, through: :series_statement_merges
4
- validates_presence_of :title
5
-
6
- paginates_per 10
7
- end
8
-
9
- # == Schema Information
10
- #
11
- # Table name: series_statement_merge_lists
12
- #
13
- # id :integer not null, primary key
14
- # title :string
15
- # created_at :datetime
16
- # updated_at :datetime
17
- #
@@ -1,21 +0,0 @@
1
- class ItemCustomPropertyPolicy < ApplicationPolicy
2
- def index?
3
- true if user.try(:has_role?, 'Librarian')
4
- end
5
-
6
- def show?
7
- true if user.try(:has_role?, 'Librarian')
8
- end
9
-
10
- def create?
11
- true if user.try(:has_role?, 'Administrator')
12
- end
13
-
14
- def update?
15
- true if user.try(:has_role?, 'Administrator')
16
- end
17
-
18
- def destroy?
19
- true if user.try(:has_role?, 'Administrator')
20
- end
21
- end
@@ -1,21 +0,0 @@
1
- class ManifestationCustomPropertyPolicy < ApplicationPolicy
2
- def index?
3
- true if user.try(:has_role?, 'Librarian')
4
- end
5
-
6
- def show?
7
- true if user.try(:has_role?, 'Librarian')
8
- end
9
-
10
- def create?
11
- true if user.try(:has_role?, 'Administrator')
12
- end
13
-
14
- def update?
15
- true if user.try(:has_role?, 'Administrator')
16
- end
17
-
18
- def destroy?
19
- true if user.try(:has_role?, 'Administrator')
20
- end
21
- end
@@ -1,5 +0,0 @@
1
- CSV.generate(col_sep: "\t", row_sep: "\r\n") do |csv|
2
- @agent_import_results.each_with_index do |result|
3
- csv << result.body.split("\t")
4
- end
5
- end
@@ -1,32 +0,0 @@
1
- <%= form_with(model: item_custom_property, local: true) do |form| %>
2
- <% if item_custom_property.errors.any? %>
3
- <div id="error_explanation">
4
- <h2><%= pluralize(item_custom_property.errors.count, "error") %> prohibited this item_custom_property from being saved:</h2>
5
-
6
- <ul>
7
- <% item_custom_property.errors.full_messages.each do |message| %>
8
- <li><%= message %></li>
9
- <% end %>
10
- </ul>
11
- </div>
12
- <% end %>
13
-
14
- <div class="form-group">
15
- <%= form.label :name %>
16
- <%= form.text_field :name, class: 'form-control' %>
17
- </div>
18
-
19
- <div class="form-group">
20
- <%= form.label :display_name %>
21
- <%= form.text_area :display_name, class: 'form-control' %>
22
- </div>
23
-
24
- <div class="form-group">
25
- <%= form.label :note %>
26
- <%= form.text_area :note, class: 'form-control' %>
27
- </div>
28
-
29
- <div class="actions">
30
- <%= form.submit class: 'btn btn-primary' -%>
31
- </div>
32
- <% end %>
@@ -1,13 +0,0 @@
1
- <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.editing', model: t('activerecord.models.item_custom_property')) -%></h1>
3
- <div id="content_list">
4
- <%= render 'form', item_custom_property: @item_custom_property %>
5
- </div>
6
- </div>
7
-
8
- <div id="submenu" class="ui-corner-all ui-widget-content">
9
- <ul>
10
- <li><%= link_to t('page.show'), @item_custom_property %></li>
11
- <li><%= link_to t('page.back'), item_custom_properties_path %></li>
12
- </ul>
13
- </div>
@@ -1,43 +0,0 @@
1
- <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.listing', model: t('activerecord.models.item_custom_property')) -%></h1>
3
- <div id="content_list">
4
- <p id="notice"><%= notice %></p>
5
-
6
- <h1><%= t('page.listing', model: t('activerecord.models.item_custom_property')) -%></h1>
7
-
8
- <table class='table table-striped index'>
9
- <thead>
10
- <tr>
11
- <th id="position"></th>
12
- <th><%= t('activerecord.attributes.item_custom_property.name') %></th>
13
- <th><%= t('activerecord.attributes.item_custom_property.display_name') %></th>
14
- <th><%= t('activerecord.attributes.item_custom_property.note') %></th>
15
- <th colspan="2"></th>
16
- </tr>
17
- </thead>
18
-
19
- <tbody>
20
- <% @item_custom_properties.each do |item_custom_property| %>
21
- <tr>
22
- <td>
23
- <%- if policy(item_custom_property).update? -%>
24
- <%= move_position(item_custom_property) -%>
25
- <%- end -%>
26
- </td>
27
- <td><%= link_to item_custom_property.name, item_custom_property %></td>
28
- <td><%= item_custom_property.display_name.localize %></td>
29
- <td><%= item_custom_property.note %></td>
30
- <td><%= link_to t('page.edit'), edit_item_custom_property_path(item_custom_property) %></td>
31
- <td><%= link_to t('page.destroy'), item_custom_property, method: :delete, data: { confirm: t('page.are_you_sure') } %></td>
32
- </tr>
33
- <% end %>
34
- </tbody>
35
- </table>
36
- </div>
37
- </div>
38
-
39
- <div id="submenu" class="ui-corner-all ui-widget-content">
40
- <ul>
41
- <li><%= link_to t('page.new', model: t('activerecord.models.item_custom_property')), new_item_custom_property_path -%></li>
42
- </ul>
43
- </div>
@@ -1,12 +0,0 @@
1
- <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.new', model: t('activerecord.models.item_custom_property')) -%></h1>
3
- <div id="content_list">
4
- <%= render 'form', item_custom_property: @item_custom_property %>
5
- </div>
6
- </div>
7
-
8
- <div id="submenu" class="ui-corner-all ui-widget-content">
9
- <ul>
10
- <li><%= link_to t('page.back'), item_custom_properties_path %></li>
11
- </ul>
12
- </div>
@@ -1,28 +0,0 @@
1
- <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.showing', model: t('activerecord.models.item_custom_property')) -%></h1>
3
- <div id="content_list">
4
- <p id="notice"><%= notice %></p>
5
-
6
- <p>
7
- <strong><%= t('activerecord.attributes.item_custom_property.name') %>:</strong>
8
- <%= @item_custom_property.name %>
9
- </p>
10
-
11
- <p>
12
- <strong><%= t('activerecord.attributes.item_custom_property.display_name') %>:</strong>
13
- <%= @item_custom_property.display_name.localize %>
14
- </p>
15
-
16
- <p>
17
- <strong><%= t('activerecord.attributes.item_custom_property.note') %>:</strong>
18
- <%= @item_custom_property.note %>
19
- </p>
20
- </div>
21
- </div>
22
-
23
- <div id="submenu" class="ui-corner-all ui-widget-content">
24
- <ul>
25
- <li><%= link_to t('page.edit'), edit_item_custom_property_path(@item_custom_property) %></li>
26
- <li><%= link_to t('page.back'), item_custom_properties_path %></li>
27
- </ul>
28
- </div>
@@ -1,17 +0,0 @@
1
- json.id item.id
2
- json.manifestation_id item.manifestation_id
3
- json.item_identifier item.item_identifier
4
- json.call_number item.call_number
5
- json.shelf item.shelf.name
6
- if defined?(EnjuCirculation)
7
- json.circulation_status item.circulation_status&.name
8
- end
9
- json.binding_item_identifier item.binding_item_identifier
10
- json.binding_call_number item.binding_call_number
11
- json.binded_at item.binded_at
12
- json.acquired_at item.acquired_at
13
- json.include_supplements item.include_supplements
14
- json.url item.url
15
- json.note item.note
16
- json.created_at item.created_at
17
- json.updated_at item.updated_at
@@ -1,5 +0,0 @@
1
- json.results do
2
- json.array!(@items) do |item|
3
- json.partial!(item)
4
- end
5
- end
@@ -1,13 +0,0 @@
1
- csv = %w[title isbn item_identifier call_number created_at].to_csv(col_sep: "\t")
2
-
3
- @items.map{|item|
4
- [
5
- item.manifestation.original_title,
6
- item.manifestation.identifier_contents(:isbn).join("; "),
7
- item.item_identifier,
8
- item.call_number,
9
- item.created_at
10
- ]
11
- }
12
-
13
- csv
@@ -1 +0,0 @@
1
- json.partial!(@item)
@@ -1,32 +0,0 @@
1
- <%= form_with(model: manifestation_custom_property, local: true) do |form| %>
2
- <% if manifestation_custom_property.errors.any? %>
3
- <div id="error_explanation">
4
- <h2><%= pluralize(manifestation_custom_property.errors.count, "error") %> prohibited this manifestation_custom_property from being saved:</h2>
5
-
6
- <ul>
7
- <% manifestation_custom_property.errors.full_messages.each do |message| %>
8
- <li><%= message %></li>
9
- <% end %>
10
- </ul>
11
- </div>
12
- <% end %>
13
-
14
- <div class="form-group">
15
- <%= form.label :name %>
16
- <%= form.text_field :name, class: 'form-control' %>
17
- </div>
18
-
19
- <div class="form-group">
20
- <%= form.label :display_name %>
21
- <%= form.text_area :display_name, class: 'form-control' %>
22
- </div>
23
-
24
- <div class="form-group">
25
- <%= form.label :note %>
26
- <%= form.text_area :note, class: 'form-control' %>
27
- </div>
28
-
29
- <div class="actions">
30
- <%= form.submit class: 'btn btn-primary' -%>
31
- </div>
32
- <% end %>
@@ -1,13 +0,0 @@
1
- <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.editing', model: t('activerecord.models.manifestation_custom_property')) -%></h1>
3
- <div id="content_list">
4
- <%= render 'form', manifestation_custom_property: @manifestation_custom_property %>
5
- </div>
6
- </div>
7
-
8
- <div id="submenu" class="ui-corner-all ui-widget-content">
9
- <ul>
10
- <li><%= link_to t('page.show'), @manifestation_custom_property %></li>
11
- <li><%= link_to t('page.back'), manifestation_custom_properties_path %></li>
12
- </ul>
13
- </div>
@@ -1,43 +0,0 @@
1
- <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.listing', model: t('activerecord.models.manifestation_custom_property')) -%></h1>
3
- <div id="content_list">
4
- <p id="notice"><%= notice %></p>
5
-
6
- <h1><%= t('page.listing', model: t('activerecord.models.manifestation_custom_property')) -%></h1>
7
-
8
- <table class='table table-striped index'>
9
- <thead>
10
- <tr>
11
- <th id="position"></th>
12
- <th><%= t('activerecord.attributes.manifestation_custom_property.name') %></th>
13
- <th><%= t('activerecord.attributes.manifestation_custom_property.display_name') %></th>
14
- <th><%= t('activerecord.attributes.manifestation_custom_property.note') %></th>
15
- <th colspan="2"></th>
16
- </tr>
17
- </thead>
18
-
19
- <tbody>
20
- <% @manifestation_custom_properties.each do |manifestation_custom_property| %>
21
- <tr>
22
- <td>
23
- <%- if policy(manifestation_custom_property).update? -%>
24
- <%= move_position(manifestation_custom_property) -%>
25
- <%- end -%>
26
- </td>
27
- <td><%= link_to manifestation_custom_property.name, manifestation_custom_property %></td>
28
- <td><%= manifestation_custom_property.display_name.localize %></td>
29
- <td><%= manifestation_custom_property.note %></td>
30
- <td><%= link_to t('page.edit'), edit_manifestation_custom_property_path(manifestation_custom_property) %></td>
31
- <td><%= link_to t('page.destroy'), manifestation_custom_property, method: :delete, data: { confirm: t('page.are_you_sure') } %></td>
32
- </tr>
33
- <% end %>
34
- </tbody>
35
- </table>
36
- </div>
37
- </div>
38
-
39
- <div id="submenu" class="ui-corner-all ui-widget-content">
40
- <ul>
41
- <li><%= link_to t('page.new', model: t('activerecord.models.manifestation_custom_property')), new_manifestation_custom_property_path -%></li>
42
- </ul>
43
- </div>
@@ -1,12 +0,0 @@
1
- <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.new', model: t('activerecord.models.item_custom_property')) -%></h1>
3
- <div id="content_list">
4
- <%= render 'form', manifestation_custom_property: @manifestation_custom_property %>
5
- </div>
6
- </div>
7
-
8
- <div id="submenu" class="ui-corner-all ui-widget-content">
9
- <ul>
10
- <li><%= link_to t('page.back'), manifestation_custom_properties_path %></li>
11
- </ul>
12
- </div>
@@ -1,28 +0,0 @@
1
- <div id="content_detail" class="ui-corner-all ui-widget-content">
2
- <h1 class="title"><%= t('page.showing', model: t('activerecord.models.manifestation_custom_property')) -%></h1>
3
- <div id="content_list">
4
- <p id="notice"><%= notice %></p>
5
-
6
- <p>
7
- <strong><%= t('activerecord.attributes.manifestation_custom_property.name') %>:</strong>
8
- <%= @manifestation_custom_property.name %>
9
- </p>
10
-
11
- <p>
12
- <strong><%= t('activerecord.attributes.manifestation_custom_property.display_name') %>:</strong>
13
- <%= @manifestation_custom_property.display_name.localize %>
14
- </p>
15
-
16
- <p>
17
- <strong><%= t('activerecord.attributes.manifestation_custom_property.note') %>:</strong>
18
- <%= @manifestation_custom_property.note %>
19
- </p>
20
- </div>
21
- </div>
22
-
23
- <div id="submenu" class="ui-corner-all ui-widget-content">
24
- <ul>
25
- <li><%= link_to t('page.edit'), edit_manifestation_custom_property_path(@manifestation_custom_property) %></li>
26
- <li><%= link_to t('page.back'), manifestation_custom_properties_path %></li>
27
- </ul>
28
- </div>
@@ -1,13 +0,0 @@
1
- csv = (Manifestation.csv_header(role: current_user_role_name) + Item.csv_header(role: current_user_role_name)).to_csv(col_sep: "\t")
2
-
3
- @manifestations.map{|manifestation|
4
- if manifestation.items.empty?
5
- csv += manifestation.to_hash(role: current_user_role_name).values.to_csv(col_sep: "\t")
6
- else
7
- manifestation.items.each do |item|
8
- csv += (manifestation.to_hash(role: current_user_role_name).values + item.to_hash(role: current_user_role_name).values).to_csv(col_sep: "\t")
9
- end
10
- end
11
- }
12
-
13
- csv
@@ -1,2 +0,0 @@
1
- json.partial!(@manifestation)
2
-
@@ -1,5 +0,0 @@
1
- Manifestation.csv_header(
2
- role: current_user_role_name
3
- ).to_csv(col_sep: "\t") + @manifestation.to_hash(
4
- role: current_user_role_name
5
- ).values.to_csv(col_sep: "\t")
@@ -1,5 +0,0 @@
1
- CSV.generate(col_sep: "\t", row_sep: "\r\n") do |csv|
2
- @resource_import_results.each_with_index do |result|
3
- csv << result.body.split("\t")
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class AddMemoToManifestation < ActiveRecord::Migration[5.2]
2
- def change
3
- add_column :manifestations, :memo, :text
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class AddMemoToItem < ActiveRecord::Migration[5.2]
2
- def change
3
- add_column :items, :memo, :text
4
- end
5
- end
@@ -1,12 +0,0 @@
1
- class CreateManifestationCustomProperties < ActiveRecord::Migration[5.2]
2
- def change
3
- create_table :manifestation_custom_properties do |t|
4
- t.string :name, null: false, comment: 'ラベル名', index: {unique: true}
5
- t.text :display_name, null: false, comment: '表示名'
6
- t.text :note, comment: '備考'
7
- t.integer :position, default: 1, null: false
8
-
9
- t.timestamps
10
- end
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- class CreateItemCustomProperties < ActiveRecord::Migration[5.2]
2
- def change
3
- create_table :item_custom_properties do |t|
4
- t.string :name, null: false, comment: 'ラベル名', index: {unique: true}
5
- t.text :display_name, null: false, comment: '表示名'
6
- t.text :note, comment: '備考'
7
- t.integer :position, default: 1, null: false
8
-
9
- t.timestamps
10
- end
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- class CreateManifestationCustomValues < ActiveRecord::Migration[5.2]
2
- def change
3
- create_table :manifestation_custom_values do |t|
4
- t.references :manifestation_custom_property, null: false, foreign_key: true, index: {name: 'index_manifestation_custom_values_on_custom_property_id'}
5
- t.references :manifestation, null: false, foreign_key: true
6
- t.text :value
7
-
8
- t.timestamps
9
- end
10
- add_index :manifestation_custom_values, [:manifestation_custom_property_id, :manifestation_id], unique: true, name: 'index_manifestation_custom_values_on_property_manifestation'
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- class CreateItemCustomValues < ActiveRecord::Migration[5.2]
2
- def change
3
- create_table :item_custom_values do |t|
4
- t.references :item_custom_property, null: false, foreign_key: true, index: {name: 'index_item_custom_values_on_custom_property_id'}
5
- t.references :item, null: false, foreign_key: true
6
- t.text :value
7
-
8
- t.timestamps
9
- end
10
- add_index :item_custom_values, [:item_custom_property_id, :item_id], unique: true, name: 'index_item_custom_values_on_custom_item_property_and_item_id'
11
- end
12
- end