enju_biblio 0.3.9 → 0.3.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/content_types_controller.rb +1 -1
  3. data/app/controllers/item_custom_properties_controller.rb +69 -0
  4. data/app/controllers/items_controller.rb +3 -0
  5. data/app/controllers/manifestation_custom_properties_controller.rb +69 -0
  6. data/app/controllers/manifestations_controller.rb +9 -6
  7. data/app/controllers/resource_import_results_controller.rb +6 -2
  8. data/app/models/agent_type.rb +0 -1
  9. data/app/models/carrier_type.rb +0 -1
  10. data/app/models/content_type.rb +0 -1
  11. data/app/models/form_of_work.rb +1 -2
  12. data/app/models/frequency.rb +0 -1
  13. data/app/models/identifier_type.rb +0 -1
  14. data/app/models/item.rb +17 -6
  15. data/app/models/item_custom_property.rb +18 -0
  16. data/app/models/item_custom_value.rb +17 -0
  17. data/app/models/license.rb +0 -1
  18. data/app/models/manifestation.rb +55 -11
  19. data/app/models/manifestation_custom_property.rb +18 -0
  20. data/app/models/manifestation_custom_value.rb +17 -0
  21. data/app/models/medium_of_performance.rb +1 -2
  22. data/app/models/picture_file.rb +0 -2
  23. data/app/models/resource_export_file.rb +4 -2
  24. data/app/models/resource_import_file.rb +151 -61
  25. data/app/policies/item_custom_property_policy.rb +21 -0
  26. data/app/policies/manifestation_custom_property_policy.rb +21 -0
  27. data/app/views/item_custom_properties/_form.html.erb +32 -0
  28. data/app/views/item_custom_properties/edit.html.erb +13 -0
  29. data/app/views/item_custom_properties/index.html.erb +43 -0
  30. data/app/views/item_custom_properties/new.html.erb +12 -0
  31. data/app/views/item_custom_properties/show.html.erb +28 -0
  32. data/app/views/items/_form.html.erb +13 -0
  33. data/app/views/items/show.html.erb +6 -0
  34. data/app/views/manifestation_custom_properties/_form.html.erb +32 -0
  35. data/app/views/manifestation_custom_properties/edit.html.erb +13 -0
  36. data/app/views/manifestation_custom_properties/index.html.erb +43 -0
  37. data/app/views/manifestation_custom_properties/new.html.erb +12 -0
  38. data/app/views/manifestation_custom_properties/show.html.erb +28 -0
  39. data/app/views/manifestations/_export_detail.html.erb +1 -0
  40. data/app/views/manifestations/_export_list.html.erb +1 -0
  41. data/app/views/manifestations/_form.html.erb +18 -0
  42. data/app/views/manifestations/_show_detail_librarian.html.erb +14 -0
  43. data/app/views/manifestations/_show_detail_user.html.erb +8 -0
  44. data/app/views/manifestations/show.json.jbuilder +2 -0
  45. data/app/views/picture_files/edit.html.erb +4 -0
  46. data/config/locales/translation_en.yml +22 -8
  47. data/config/locales/translation_ja.yml +22 -8
  48. data/config/routes.rb +2 -0
  49. data/db/migrate/20081027150907_create_picture_files.rb +0 -2
  50. data/db/migrate/20200425072340_create_manifestation_custom_properties.rb +12 -0
  51. data/db/migrate/20200425072349_create_item_custom_properties.rb +12 -0
  52. data/db/migrate/20200425074758_create_manifestation_custom_values.rb +12 -0
  53. data/db/migrate/20200425074822_create_item_custom_values.rb +12 -0
  54. data/lib/enju_biblio/openurl.rb +5 -1
  55. data/lib/enju_biblio/sru.rb +2 -0
  56. data/lib/enju_biblio/version.rb +1 -1
  57. data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_import_custom_values.yml +121 -0
  58. data/spec/cassette_library/resource_import_results/index_txt_ruby/renders_a_list_of_resource_import_results.yml +121 -0
  59. data/spec/controllers/content_types_controller_spec.rb +1 -1
  60. data/spec/controllers/item_custom_properties_controller_spec.rb +449 -0
  61. data/spec/controllers/items_controller_spec.rb +22 -0
  62. data/spec/controllers/manifestation_custom_properties_controller_spec.rb +449 -0
  63. data/spec/controllers/manifestations_controller_spec.rb +22 -0
  64. data/spec/dummy/db/schema.rb +43 -23
  65. data/spec/factories/item_custom_property.rb +6 -0
  66. data/spec/factories/item_custom_value.rb +6 -0
  67. data/spec/factories/manifestation_custom_property.rb +6 -0
  68. data/spec/factories/manifestation_custom_value.rb +6 -0
  69. data/spec/fixtures/creates.yml +2 -0
  70. data/spec/fixtures/item_custom_properties.yml +24 -0
  71. data/spec/fixtures/library_groups.yml +0 -2
  72. data/spec/fixtures/manifestation_custom_properties.yml +24 -0
  73. data/spec/fixtures/picture_files.yml +0 -2
  74. data/spec/fixtures/produces.yml +2 -0
  75. data/spec/fixtures/realizes.yml +2 -0
  76. data/spec/models/item_custom_property_spec.rb +18 -0
  77. data/spec/models/item_custom_value_spec.rb +17 -0
  78. data/spec/models/manifestation_custom_property_spec.rb +18 -0
  79. data/spec/models/manifestation_custom_value_spec.rb +17 -0
  80. data/spec/models/manifestation_spec.rb +16 -1
  81. data/spec/models/picture_file_spec.rb +0 -2
  82. data/spec/models/resource_export_file_spec.rb +61 -8
  83. data/spec/models/resource_import_file_spec.rb +43 -13
  84. data/spec/requests/item_custom_properties_spec.rb +129 -0
  85. data/spec/requests/manifestation_custom_properties_spec.rb +129 -0
  86. data/spec/routing/item_custom_properties_routing_spec.rb +38 -0
  87. data/spec/routing/manifestation_custom_properties_routing_spec.rb +38 -0
  88. data/spec/system/items_spec.rb +12 -0
  89. data/spec/system/manifestations_spec.rb +12 -0
  90. data/spec/views/item_custom_properties/edit.html.erb_spec.rb +21 -0
  91. data/spec/views/item_custom_properties/index.html.erb_spec.rb +25 -0
  92. data/spec/views/item_custom_properties/new.html.erb_spec.rb +21 -0
  93. data/spec/views/item_custom_properties/show.html.erb_spec.rb +16 -0
  94. data/spec/views/manifestation_custom_properties/edit.html.erb_spec.rb +21 -0
  95. data/spec/views/manifestation_custom_properties/index.html.erb_spec.rb +25 -0
  96. data/spec/views/manifestation_custom_properties/new.html.erb_spec.rb +21 -0
  97. data/spec/views/manifestation_custom_properties/show.html.erb_spec.rb +16 -0
  98. data/spec/views/manifestations/show.json.jbuilder_spec.rb +16 -0
  99. data/spec/views/resource_import_results/index.txt.ruby_spec.rb +4 -4
  100. metadata +560 -481
  101. data/db/migrate/20200322053443_add_default_custom_label_to_library_group.rb +0 -6
  102. data/db/migrate/20200322083313_create_custom_labels.rb +0 -10
  103. data/db/migrate/20200322083458_create_custom_properties.rb +0 -12
@@ -1,6 +0,0 @@
1
- class AddDefaultCustomLabelToLibraryGroup < ActiveRecord::Migration[5.2]
2
- def change
3
- add_column :library_groups, :default_custom_manifestation_label, :text
4
- add_column :library_groups, :default_custom_item_label, :text
5
- end
6
- end
@@ -1,10 +0,0 @@
1
- class CreateCustomLabels < ActiveRecord::Migration[5.2]
2
- def change
3
- create_table :custom_labels do |t|
4
- t.references :library_group, foreign_key: true, null: false
5
- t.string :label
6
-
7
- t.timestamps
8
- end
9
- end
10
- end
@@ -1,12 +0,0 @@
1
- class CreateCustomProperties < ActiveRecord::Migration[5.2]
2
- def change
3
- create_table :custom_properties do |t|
4
- t.integer :resource_id, null: false
5
- t.string :resource_type, null: false
6
- t.references :custom_label, foreign_key: true, null: false
7
- t.text :value
8
-
9
- t.timestamps
10
- end
11
- end
12
- end