enju_circulation 0.3.9 → 0.4.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -3
  3. data/app/controllers/checkins_controller.rb +2 -2
  4. data/app/controllers/user_group_has_checkout_types_controller.rb +1 -1
  5. data/app/helpers/items_helper.rb +3 -3
  6. data/app/models/checked_item.rb +7 -17
  7. data/app/models/checkin.rb +3 -2
  8. data/app/models/checkout.rb +2 -2
  9. data/app/models/checkout_stat_has_user.rb +1 -1
  10. data/app/models/checkout_type.rb +9 -7
  11. data/app/models/circulation_status.rb +9 -8
  12. data/app/models/concerns/enju_circulation/enju_item.rb +2 -46
  13. data/app/models/concerns/enju_circulation/enju_user_group.rb +0 -1
  14. data/app/models/concerns/enju_circulation/enju_withdraw.rb +1 -7
  15. data/app/models/manifestation_checkout_stat_transition.rb +1 -1
  16. data/app/models/manifestation_reserve_stat_transition.rb +1 -1
  17. data/app/models/reserve.rb +5 -5
  18. data/app/models/reserve_state_machine.rb +3 -2
  19. data/app/models/reserve_transition.rb +1 -1
  20. data/app/models/retain.rb +15 -0
  21. data/app/models/user_checkout_stat_transition.rb +1 -1
  22. data/app/models/user_group_has_checkout_type.rb +15 -37
  23. data/app/models/user_reserve_stat_transition.rb +1 -1
  24. data/app/views/carrier_type_has_checkout_types/_form.html.erb +2 -2
  25. data/app/views/carrier_type_has_checkout_types/index.html.erb +2 -2
  26. data/app/views/carrier_type_has_checkout_types/show.html.erb +2 -2
  27. data/app/views/carrier_types/_carrier_type_has_checkout_type_fields.html.erb +1 -1
  28. data/app/views/checked_items/new.html.erb +1 -1
  29. data/app/views/checkins/_checkin.html.erb +1 -1
  30. data/app/views/checkout_types/_form.html.erb +1 -1
  31. data/app/views/checkout_types/index.html.erb +1 -1
  32. data/app/views/checkout_types/show.html.erb +2 -2
  33. data/app/views/checkouts/_index_user.html.erb +1 -1
  34. data/app/views/checkouts/_list.html.erb +2 -9
  35. data/app/views/checkouts/index.atom.builder +1 -1
  36. data/app/views/checkouts/index.ics.erb +1 -1
  37. data/app/views/checkouts/index.rss.builder +1 -1
  38. data/app/views/circulation_statuses/_form.html.erb +1 -1
  39. data/app/views/circulation_statuses/index.html.erb +1 -1
  40. data/app/views/circulation_statuses/show.html.erb +1 -1
  41. data/app/views/item_has_use_restrictions/index.html.erb +1 -1
  42. data/app/views/item_has_use_restrictions/show.html.erb +1 -1
  43. data/app/views/manifestation_checkout_stats/_group_by_carrier_type.html.erb +3 -3
  44. data/app/views/manifestation_checkout_stats/_group_by_checkout_type.html.erb +3 -3
  45. data/app/views/manifestations/_circulation_status.html.erb +3 -3
  46. data/app/views/profiles/_submenu_checkout.html.erb +1 -1
  47. data/app/views/reserves/_new.html.erb +1 -1
  48. data/app/views/reserves/_new_user.html.erb +1 -1
  49. data/app/views/reserves/edit.html.erb +1 -1
  50. data/app/views/reserves/index.atom.builder +1 -1
  51. data/app/views/reserves/index.html.erb +1 -1
  52. data/app/views/reserves/index.rss.builder +1 -1
  53. data/app/views/reserves/show.html.erb +1 -1
  54. data/app/views/use_restrictions/_form.html.erb +1 -1
  55. data/app/views/use_restrictions/index.html.erb +1 -1
  56. data/app/views/use_restrictions/show.html.erb +1 -1
  57. data/app/views/user_group_has_checkout_types/edit.html.erb +4 -4
  58. data/app/views/user_group_has_checkout_types/index.html.erb +2 -2
  59. data/app/views/user_group_has_checkout_types/new.html.erb +4 -4
  60. data/app/views/user_group_has_checkout_types/show.html.erb +4 -4
  61. data/app/views/user_groups/_user_group_has_checkout_type_fields.html.erb +2 -2
  62. data/config/locales/translation_en.yml +1 -14
  63. data/config/locales/translation_ja.yml +1 -14
  64. data/config/routes.rb +1 -2
  65. data/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +3 -3
  66. data/db/migrate/20190508160525_create_retains.rb +10 -0
  67. data/db/migrate/20190629134017_rename_user_group_has_checkout_type_due_date_before_to_due_date_after.rb +5 -0
  68. data/db/migrate/20190706052525_add_display_name_translations_to_circulation_status.rb +5 -0
  69. data/db/migrate/20190713114724_add_checkout_id_to_checkin.rb +5 -0
  70. data/db/migrate/20190814120827_add_display_name_translations_to_checkout_type.rb +5 -0
  71. data/lib/enju_circulation/version.rb +1 -1
  72. data/lib/generators/enju_circulation/setup/templates/db/fixtures/checkout_types.yml +3 -5
  73. data/lib/generators/enju_circulation/setup/templates/db/fixtures/circulation_statuses.yml +16 -48
  74. data/lib/tasks/enju_circulation_tasks.rake +7 -1
  75. data/spec/concerns/enju_accept_spec.rb +14 -14
  76. data/spec/controllers/accepts_controller_spec.rb +294 -0
  77. data/spec/controllers/baskets_controller_spec.rb +379 -0
  78. data/spec/controllers/checkins_controller_spec.rb +8 -130
  79. data/spec/controllers/items_controller_spec.rb +23 -43
  80. data/spec/dummy/app/mailers/application_mailer.rb +4 -0
  81. data/spec/dummy/app/models/user.rb +1 -1
  82. data/spec/dummy/bin/bundle +1 -1
  83. data/spec/dummy/bin/setup +1 -3
  84. data/spec/dummy/bin/update +4 -2
  85. data/spec/dummy/bin/yarn +3 -3
  86. data/spec/dummy/config/database.yml +70 -9
  87. data/spec/dummy/config/initializers/assets.rb +1 -0
  88. data/spec/dummy/db/development.sqlite3 +0 -0
  89. data/spec/dummy/db/migrate/113_create_events.rb +2 -4
  90. data/spec/dummy/db/migrate/20081028093607_create_event_import_files.rb +2 -4
  91. data/spec/dummy/db/migrate/20090519203307_create_participates.rb +2 -4
  92. data/spec/dummy/db/migrate/20100925074639_create_event_import_results.rb +2 -2
  93. data/spec/dummy/db/migrate/20140720192418_add_default_library_id_to_event_import_file.rb +1 -1
  94. data/spec/dummy/db/migrate/20140812152348_create_event_export_files.rb +1 -1
  95. data/spec/dummy/db/migrate/20140814070854_add_default_event_category_id_to_event_import_file.rb +1 -1
  96. data/spec/dummy/db/migrate/20151128142913_create_places.rb +14 -0
  97. data/spec/dummy/db/migrate/20151201163718_add_place_id_to_event.rb +5 -0
  98. data/spec/dummy/db/migrate/20160703184258_add_most_recent_to_event_import_file_transitions.rb +9 -0
  99. data/spec/dummy/db/migrate/20160703184311_add_most_recent_to_event_export_file_transitions.rb +9 -0
  100. data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +1 -1
  101. data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +1 -1
  102. data/spec/dummy/db/migrate/20180107164558_add_constraints_to_most_recent_for_event_import_file_transitions.rb +13 -0
  103. data/spec/dummy/db/migrate/20180107164617_add_constraints_to_most_recent_for_event_export_file_transitions.rb +13 -0
  104. data/spec/dummy/db/migrate/20181119170645_add_foreign_key_to_events_referencing_event_categories.rb +5 -0
  105. data/spec/dummy/db/migrate/20190630113817_add_display_name_translations_to_library_group.rb +12 -0
  106. data/spec/dummy/db/migrate/20190630115523_add_login_banner_translations_to_library_group.rb +6 -0
  107. data/spec/dummy/db/migrate/20190630151446_add_display_name_translations_to_role.rb +5 -0
  108. data/spec/dummy/db/migrate/20190630153136_add_display_name_translations_to_event.rb +6 -0
  109. data/spec/dummy/db/migrate/20190712163038_add_display_name_translations_to_carrier_type.rb +21 -0
  110. data/spec/dummy/db/migrate/20190713114940_add_profile_id_to_user.rb +5 -0
  111. data/spec/dummy/db/migrate/20190713115451_add_full_name_translations_to_profile.rb +5 -0
  112. data/spec/dummy/db/schema.rb +221 -184
  113. data/spec/dummy/db/test.sqlite3 +0 -0
  114. data/spec/dummy/private/system/carrier_types/attachments/000/000/001/original/book.png +0 -0
  115. data/spec/dummy/private/system/carrier_types/attachments/000/000/001/thumb/book.png +0 -0
  116. data/spec/factories/accept.rb +1 -1
  117. data/spec/factories/item.rb +4 -4
  118. data/spec/factories/reserve.rb +1 -5
  119. data/spec/fixtures/carrier_types.yml +16 -15
  120. data/spec/fixtures/checkins.yml +2 -1
  121. data/spec/fixtures/checkout_stat_has_users.yml +1 -1
  122. data/spec/fixtures/checkout_types.yml +11 -10
  123. data/spec/fixtures/checkouts.yml +2 -2
  124. data/spec/fixtures/circulation_statuses.yml +26 -34
  125. data/spec/fixtures/content_types.yml +20 -31
  126. data/spec/fixtures/event_categories.yml +23 -23
  127. data/spec/fixtures/frequencies.yml +17 -25
  128. data/spec/fixtures/items.yml +1 -1
  129. data/spec/fixtures/libraries.yml +30 -31
  130. data/spec/fixtures/library_groups.yml +43 -20
  131. data/spec/fixtures/request_status_types.yml +14 -14
  132. data/spec/fixtures/request_types.yml +13 -13
  133. data/spec/fixtures/reserve_transitions.yml +1 -1
  134. data/spec/fixtures/reserves.yml +3 -3
  135. data/spec/fixtures/roles.yml +22 -5
  136. data/spec/fixtures/shelves.yml +16 -15
  137. data/spec/fixtures/user_group_has_checkout_types.yml +24 -24
  138. data/spec/fixtures/user_groups.yml +23 -3
  139. data/spec/helpers/items_helper_spec.rb +1 -1
  140. data/spec/models/checkin_spec.rb +2 -1
  141. data/spec/models/checkout_spec.rb +2 -2
  142. data/spec/models/checkout_stat_has_user_spec.rb +1 -1
  143. data/spec/models/checkout_type_spec.rb +8 -7
  144. data/spec/models/circulation_status_spec.rb +8 -7
  145. data/spec/models/item_spec.rb +6 -8
  146. data/spec/models/manifestation_spec.rb +15 -18
  147. data/spec/models/reserve_spec.rb +3 -3
  148. data/spec/models/resource_export_file_spec.rb +0 -15
  149. data/spec/models/retain_spec.rb +16 -0
  150. data/spec/models/user_group_has_checkout_type_spec.rb +15 -32
  151. data/spec/models/withdraw_spec.rb +4 -6
  152. data/spec/policies/manifestation_policy_spec.rb +2 -1
  153. data/spec/rails_helper.rb +10 -3
  154. data/spec/views/items/index.html.erb_spec.rb +1 -4
  155. metadata +396 -446
  156. data/app/controllers/lending_policies_controller.rb +0 -106
  157. data/app/models/lending_policy.rb +0 -30
  158. data/app/views/lending_policies/_form.html.erb +0 -41
  159. data/app/views/lending_policies/edit.html.erb +0 -13
  160. data/app/views/lending_policies/index.html.erb +0 -42
  161. data/app/views/lending_policies/new.html.erb +0 -12
  162. data/app/views/lending_policies/show.html.erb +0 -50
  163. data/db/migrate/20090831220301_create_lending_policies.rb +0 -21
  164. data/spec/controllers/lending_policies_controller_spec.rb +0 -444
  165. data/spec/controllers/withdraws_controller_spec.rb +0 -26
  166. data/spec/dummy/config/locales/en.yml +0 -208
  167. data/spec/dummy/config/locales/ja.yml +0 -200
  168. data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +0 -5
  169. data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +0 -5
  170. data/spec/dummy/db/migrate/20200425072340_create_manifestation_custom_properties.rb +0 -12
  171. data/spec/dummy/db/migrate/20200425072349_create_item_custom_properties.rb +0 -12
  172. data/spec/dummy/db/migrate/20200425074758_create_manifestation_custom_values.rb +0 -12
  173. data/spec/dummy/db/migrate/20200425074822_create_item_custom_values.rb +0 -12
  174. data/spec/fixtures/accepts.yml +0 -9
  175. data/spec/fixtures/bookstores.yml +0 -99
  176. data/spec/fixtures/budget_types.yml +0 -30
  177. data/spec/fixtures/exemplifies.yml +0 -168
  178. data/spec/fixtures/lending_policies.yml +0 -98
  179. data/spec/models/lending_policy_spec.rb +0 -23
  180. data/spec/system/items_spec.rb +0 -21
  181. data/spec/system/user_group_has_checkout_types.rb +0 -14
@@ -2,7 +2,7 @@
2
2
  library_00001:
3
3
  name: web
4
4
  short_display_name: Web
5
- display_name: World Wide Web
5
+ display_name_translations: {"en": "World Wide Web", "ja": "ウェブ"}
6
6
  fax_number:
7
7
  updated_at: 2007-08-31 00:18:06.662349 +09:00
8
8
  telephone_number_1:
@@ -19,7 +19,7 @@ library_00001:
19
19
  library_00002:
20
20
  name: kamata
21
21
  short_display_name: 蒲田
22
- display_name: Kamata Library
22
+ display_name_translations: {"en": "Kamata Library", "ja": "蒲田図書館"}
23
23
  fax_number: ""
24
24
  updated_at: 2007-08-31 00:18:06.662349 +09:00
25
25
  telephone_number_1: 81-3-3732-5111
@@ -37,7 +37,7 @@ library_00002:
37
37
  library_00003:
38
38
  name: hachioji
39
39
  short_display_name: 八王子
40
- display_name: Hachioji Library
40
+ display_name_translations: {"en": "Hachioji Library", "ja": "八王子図書館"}
41
41
  fax_number: 042-637-2116
42
42
  updated_at: 2007-08-31 00:18:16.188285 +09:00
43
43
  telephone_number_1: 042-637-2033
@@ -54,7 +54,7 @@ library_00003:
54
54
  library_00004:
55
55
  name: mita
56
56
  short_display_name: 三田
57
- display_name: Mita Library
57
+ display_name_translations: {"en": "Mita Library", "ja": "三田図書館"}
58
58
  fax_number: ""
59
59
  updated_at: 2007-08-31 00:18:20.043951 +09:00
60
60
  telephone_number_1: ""
@@ -73,31 +73,30 @@ library_00004:
73
73
  #
74
74
  # Table name: libraries
75
75
  #
76
- # id :integer not null, primary key
77
- # name :string(255) not null
78
- # display_name :text
79
- # short_display_name :string(255) not null
80
- # zip_code :string(255)
81
- # street :text
82
- # locality :text
83
- # region :text
84
- # telephone_number_1 :string(255)
85
- # telephone_number_2 :string(255)
86
- # fax_number :string(255)
87
- # note :text
88
- # call_number_rows :integer default(1), not null
89
- # call_number_delimiter :string(255) default("|"), not null
90
- # library_group_id :integer default(1), not null
91
- # users_count :integer default(0), not null
92
- # position :integer
93
- # country_id :integer
94
- # created_at :datetime
95
- # updated_at :datetime
96
- # deleted_at :datetime
97
- # opening_hour :text
98
- # latitude :float
99
- # longitude :float
100
- # calil_systemid :string(255)
101
- # calil_neighborhood_systemid :text
76
+ # id :integer not null, primary key
77
+ # name :string not null
78
+ # display_name :text
79
+ # short_display_name :string not null
80
+ # zip_code :string
81
+ # street :text
82
+ # locality :text
83
+ # region :text
84
+ # telephone_number_1 :string
85
+ # telephone_number_2 :string
86
+ # fax_number :string
87
+ # note :text
88
+ # call_number_rows :integer default(1), not null
89
+ # call_number_delimiter :string default("|"), not null
90
+ # library_group_id :integer not null
91
+ # users_count :integer default(0), not null
92
+ # position :integer
93
+ # country_id :integer
94
+ # created_at :datetime
95
+ # updated_at :datetime
96
+ # deleted_at :datetime
97
+ # opening_hour :text
98
+ # isil :string
99
+ # latitude :float
100
+ # longitude :float
101
+ # display_name_translations :jsonb not null
102
102
  #
103
-
@@ -1,32 +1,55 @@
1
1
  # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2
2
  one:
3
3
  id: 1
4
- name: unknown
5
- display_name: unknown
6
- short_name: unknown
4
+ name: enju_library
5
+ display_name_translations: {"en": "Enju Library", "ja": "えんじゅ図書館"}
6
+ short_name: enju_library
7
7
  note:
8
- my_networks: 0.0.0.0/0
8
+ my_networks: "0.0.0.0/0\r\n\
9
+ ::/0"
9
10
  url: "http://localhost:3000/"
11
+ position: 1
12
+ login_banner_translations: {"ja": "オープンソース図書館システム Next-L Enju です。このメッセージは管理者としてログインした後に変更することができます。",
13
+ "en": "Next-L Enju, an open-source integrated library system. You can edit this message after logging in as Administrator."}
14
+ footer_banner_translations: {"en":"[Next-L Enju Leaf __VERSION__](https://github.com/next-l/enju_leaf), an open source integrated library system | [About this system](/page/about) | [Report bugs](https://github.com/next-l/enju_leaf/issues) | [Manual](https://next-l.github.io/manual/1.3/)",
15
+ "ja":"[Next-L Enju Leaf __VERSION__](https://github.com/next-l/enju_leaf), オープンソース統合図書館システム | [このシステムについて](/page/about) | [不具合を報告する](https://github.com/next-l/enju_leaf/issues) | [マニュアル](https://next-l.github.io/manual/1.3/)"}
16
+ admin_networks: "0.0.0.0/0\r\n\
17
+ ::/0"
10
18
  user_id: 1
19
+ pub_year_facet_range_interval: 10
11
20
 
12
21
  # == Schema Information
13
22
  #
14
23
  # Table name: library_groups
15
24
  #
16
- # id :integer not null, primary key
17
- # name :string(255) not null
18
- # display_name :text
19
- # short_name :string(255) not null
20
- # my_networks :text
21
- # login_banner :text
22
- # note :text
23
- # post_to_union_catalog :boolean default(FALSE), not null
24
- # country_id :integer
25
- # created_at :datetime
26
- # updated_at :datetime
27
- # admin_networks :text
28
- # allow_bookmark_external_url :boolean default(FALSE), not null
29
- # position :integer
30
- # url :string(255) default("http://localhost:3000/")
25
+ # id :integer not null, primary key
26
+ # name :string not null
27
+ # display_name :text
28
+ # short_name :string not null
29
+ # my_networks :text
30
+ # old_login_banner :text
31
+ # note :text
32
+ # country_id :integer
33
+ # position :integer
34
+ # created_at :datetime
35
+ # updated_at :datetime
36
+ # admin_networks :text
37
+ # url :string default("http://localhost:3000/")
38
+ # settings :text
39
+ # html_snippet :text
40
+ # book_jacket_source :string
41
+ # max_number_of_results :integer default(500)
42
+ # family_name_first :boolean default(TRUE)
43
+ # screenshot_generator :string
44
+ # pub_year_facet_range_interval :integer default(10)
45
+ # user_id :integer
46
+ # csv_charset_conversion :boolean default(FALSE), not null
47
+ # header_logo_file_name :string
48
+ # header_logo_content_type :string
49
+ # header_logo_file_size :bigint
50
+ # header_logo_updated_at :datetime
51
+ # header_logo_meta :text
52
+ # display_name_translations :jsonb not null
53
+ # login_banner_translations :jsonb not null
54
+ # footer_banner_translations :jsonb not null
31
55
  #
32
-
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  request_status_type_00001:
3
3
  name: Available For Pickup
4
- display_name: Available For Pickup
4
+ display_name_translations: {"en": "Available For Pickup", "ja": "Available For Pickup"}
5
5
  updated_at: 2008-02-13 18:38:38.553114 +09:00
6
6
  id: 1
7
7
  position: 1
@@ -9,7 +9,7 @@ request_status_type_00001:
9
9
  created_at: 2008-02-13 18:38:38.553114 +09:00
10
10
  request_status_type_00002:
11
11
  name: Cannot Fulfill Request
12
- display_name: Cannot Fulfill Request
12
+ display_name_translations: {"en": "Cannot Fulfill Request", "ja": "Cannot Fulfill Request"}
13
13
  updated_at: 2008-02-13 18:38:51.815755 +09:00
14
14
  id: 2
15
15
  position: 2
@@ -17,7 +17,7 @@ request_status_type_00002:
17
17
  created_at: 2008-02-13 18:38:51.815755 +09:00
18
18
  request_status_type_00003:
19
19
  name: Expired
20
- display_name: Expired
20
+ display_name_translations: {"en": "Expired", "ja": "Expired"}
21
21
  updated_at: 2008-02-13 18:39:00.878701 +09:00
22
22
  id: 3
23
23
  position: 3
@@ -25,7 +25,7 @@ request_status_type_00003:
25
25
  created_at: 2008-02-13 18:39:00.878701 +09:00
26
26
  request_status_type_00004:
27
27
  name: In Process
28
- display_name: In Process
28
+ display_name_translations: {"en": "In Process", "ja": "In Process"}
29
29
  updated_at: 2008-02-13 18:39:10.010140 +09:00
30
30
  id: 4
31
31
  position: 4
@@ -33,7 +33,7 @@ request_status_type_00004:
33
33
  created_at: 2008-02-13 18:39:10.010140 +09:00
34
34
  request_status_type_00005:
35
35
  name: Need to Accept Conditions
36
- display_name: Need to Accept Conditions
36
+ display_name_translations: {"en": "Need to Accept Conditions", "ja": "Need to Accept Conditions"}
37
37
  updated_at: 2008-02-13 18:39:19.068390 +09:00
38
38
  id: 5
39
39
  position: 5
@@ -41,7 +41,7 @@ request_status_type_00005:
41
41
  created_at: 2008-02-13 18:39:19.068390 +09:00
42
42
  request_status_type_00006:
43
43
  name: Requested Via ILL
44
- display_name: Requested Via ILL
44
+ display_name_translations: {"en": "Requested Via ILL", "ja": "Requested Via ILL"}
45
45
  updated_at: 2008-02-13 18:39:29.382844 +09:00
46
46
  id: 6
47
47
  position: 6
@@ -52,12 +52,12 @@ request_status_type_00006:
52
52
  #
53
53
  # Table name: request_status_types
54
54
  #
55
- # id :integer not null, primary key
56
- # name :string(255) not null
57
- # display_name :text
58
- # note :text
59
- # position :integer
60
- # created_at :datetime
61
- # updated_at :datetime
55
+ # id :integer not null, primary key
56
+ # name :string not null
57
+ # display_name :text
58
+ # note :text
59
+ # position :integer
60
+ # created_at :datetime
61
+ # updated_at :datetime
62
+ # display_name_translations :jsonb not null
62
63
  #
63
-
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  request_type_00005:
3
3
  name: Stack Retrieval
4
- display_name: Stack Retrieval
4
+ display_name_translations: {"en": "Stack Retrieval"}
5
5
  updated_at: 2008-02-13 18:44:10.145739 +09:00
6
6
  id: 5
7
7
  position: 5
@@ -9,7 +9,7 @@ request_type_00005:
9
9
  created_at: 2008-02-13 18:44:10.145739 +09:00
10
10
  request_type_00001:
11
11
  name: Estimate
12
- display_name: Estimate
12
+ display_name_translations: {"en": "Estimate"}
13
13
  updated_at: 2008-02-13 18:43:33.710810 +09:00
14
14
  id: 1
15
15
  position: 1
@@ -17,7 +17,7 @@ request_type_00001:
17
17
  created_at: 2008-02-13 18:43:33.710810 +09:00
18
18
  request_type_00002:
19
19
  name: Hold
20
- display_name: Hold
20
+ display_name_translations: {"en": "Hold"}
21
21
  updated_at: 2008-02-13 18:43:42.151759 +09:00
22
22
  id: 2
23
23
  position: 2
@@ -25,7 +25,7 @@ request_type_00002:
25
25
  created_at: 2008-02-13 18:43:42.151759 +09:00
26
26
  request_type_00003:
27
27
  name: Loan
28
- display_name: Loan
28
+ display_name_translations: {"en": "Loan"}
29
29
  updated_at: 2008-02-13 18:43:51.940315 +09:00
30
30
  id: 3
31
31
  position: 3
@@ -33,7 +33,7 @@ request_type_00003:
33
33
  created_at: 2008-02-13 18:43:51.940315 +09:00
34
34
  request_type_00004:
35
35
  name: Non-Returnable Copy
36
- display_name: Non-Returnable Copy
36
+ display_name_translations: {"en": "Non-Returnable Copy"}
37
37
  updated_at: 2008-02-13 18:44:00.870893 +09:00
38
38
  id: 4
39
39
  position: 4
@@ -44,12 +44,12 @@ request_type_00004:
44
44
  #
45
45
  # Table name: request_types
46
46
  #
47
- # id :integer not null, primary key
48
- # name :string(255) not null
49
- # display_name :text
50
- # note :text
51
- # position :integer
52
- # created_at :datetime
53
- # updated_at :datetime
47
+ # id :integer not null, primary key
48
+ # name :string not null
49
+ # display_name :text
50
+ # note :text
51
+ # position :integer
52
+ # created_at :datetime
53
+ # updated_at :datetime
54
+ # display_name_translations :jsonb not null
54
55
  #
55
-
@@ -95,7 +95,7 @@ reserve_transition_00015:
95
95
  #
96
96
  # id :integer not null, primary key
97
97
  # to_state :string
98
- # metadata :text default("{}")
98
+ # metadata :text default({})
99
99
  # sort_key :integer
100
100
  # reserve_id :integer
101
101
  # created_at :datetime
@@ -154,10 +154,10 @@ reserve_00015:
154
154
  # canceled_at :datetime
155
155
  # expired_at :datetime
156
156
  # deleted_at :datetime
157
- # expiration_notice_to_patron :boolean default("0")
158
- # expiration_notice_to_library :boolean default("0")
157
+ # expiration_notice_to_patron :boolean default(FALSE)
158
+ # expiration_notice_to_library :boolean default(FALSE)
159
159
  # pickup_location_id :integer
160
160
  # retained_at :datetime
161
161
  # postponed_at :datetime
162
- # lock_version :integer default("0"), not null
162
+ # lock_version :integer default(0), not null
163
163
  #
@@ -1,21 +1,38 @@
1
1
  ---
2
2
  role_00001:
3
3
  name: Guest
4
- display_name: Guest
4
+ display_name_translations: {"en": "Guest", "ja": "ゲスト"}
5
5
  id: 1
6
6
  note:
7
+ position: 1
7
8
  role_00002:
8
9
  name: User
9
- display_name: User
10
+ display_name_translations: {"en": "User", "ja": "一般利用者"}
10
11
  id: 2
11
12
  note:
13
+ position: 2
12
14
  role_00003:
13
15
  name: Librarian
14
- display_name: Librarian
16
+ display_name_translations: {"en": "Librarian", "ja": "図書館員"}
15
17
  id: 3
16
18
  note:
19
+ position: 3
17
20
  role_00004:
18
21
  name: Administrator
19
- display_name: Administrator
22
+ display_name_translations: {"en": "Administrator", "ja": "管理者"}
20
23
  id: 4
21
- note:
24
+ note:
25
+ position: 4
26
+
27
+ # == Schema Information
28
+ #
29
+ # Table name: roles
30
+ #
31
+ # id :bigint not null, primary key
32
+ # name :string not null
33
+ # display_name_translations :jsonb not null
34
+ # note :text
35
+ # position :integer default(1), not null
36
+ # created_at :datetime not null
37
+ # updated_at :datetime not null
38
+ #
@@ -1,28 +1,28 @@
1
1
  ---
2
2
  shelf_00001:
3
3
  name: web
4
- display_name: Library bookmark
4
+ display_name_translations: {"en": "Library bookmark", "ja": "ブックマーク"}
5
5
  id: 1
6
6
  note:
7
7
  library_id: 1
8
8
  position: 1
9
9
  shelf_00002:
10
10
  name: first_shelf
11
- display_name: First shelf
11
+ display_name_translations: {"en": "First shelf", "ja": "最初の書棚"}
12
12
  id: 2
13
13
  note:
14
14
  library_id: 2
15
15
  position: 2
16
16
  shelf_00003:
17
17
  name: second_shelf
18
- display_name: Second shelf
18
+ display_name_translations: {"en": "Second shelf", "ja": "二つ目の書棚"}
19
19
  id: 3
20
20
  note:
21
21
  library_id: 2
22
22
  position: 3
23
23
  shelf_00004:
24
24
  name: third_shelf
25
- display_name: Third shelf
25
+ display_name_translations: {"en": "Third shelf", "ja": "三つ目の書棚"}
26
26
  id: 4
27
27
  note:
28
28
  library_id: 3
@@ -32,15 +32,16 @@ shelf_00004:
32
32
  #
33
33
  # Table name: shelves
34
34
  #
35
- # id :integer not null, primary key
36
- # name :string(255) not null
37
- # display_name :text
38
- # note :text
39
- # library_id :integer default(1), not null
40
- # items_count :integer default(0), not null
41
- # position :integer
42
- # created_at :datetime
43
- # updated_at :datetime
44
- # deleted_at :datetime
35
+ # id :integer not null, primary key
36
+ # name :string not null
37
+ # display_name :text
38
+ # note :text
39
+ # library_id :integer not null
40
+ # items_count :integer default(0), not null
41
+ # position :integer
42
+ # created_at :datetime
43
+ # updated_at :datetime
44
+ # deleted_at :datetime
45
+ # closed :boolean default(FALSE), not null
46
+ # display_name_translations :jsonb not null
45
47
  #
46
-
@@ -5,11 +5,11 @@ user_group_has_checkout_type_00001:
5
5
  checkout_limit: 3
6
6
  reservation_limit: 2
7
7
  user_group_id: 1
8
- checkout_period: 0
8
+ checkout_period: 1
9
9
  checkout_renewal_limit: 1
10
10
  id: 1
11
11
  created_at: 2007-12-23 03:13:08.107022 +09:00
12
- set_due_date_before_closing_day: false
12
+ set_due_date_after_closing_day: false
13
13
  user_group_has_checkout_type_00002:
14
14
  checkout_type_id: 2
15
15
  updated_at: 2007-12-23 03:13:15.620143 +09:00
@@ -20,7 +20,7 @@ user_group_has_checkout_type_00002:
20
20
  checkout_renewal_limit: 1
21
21
  id: 2
22
22
  created_at: 2007-12-23 03:13:15.620143 +09:00
23
- set_due_date_before_closing_day: false
23
+ set_due_date_after_closing_day: false
24
24
  user_group_has_checkout_type_00003:
25
25
  checkout_type_id: 1
26
26
  updated_at: 2007-12-23 03:13:23.416856 +09:00
@@ -31,7 +31,7 @@ user_group_has_checkout_type_00003:
31
31
  checkout_renewal_limit: 1
32
32
  id: 3
33
33
  created_at: 2007-12-23 03:13:23.416856 +09:00
34
- set_due_date_before_closing_day: false
34
+ set_due_date_after_closing_day: false
35
35
  user_group_has_checkout_type_00004:
36
36
  checkout_type_id: 2
37
37
  updated_at: 2007-12-23 03:13:29.880538 +09:00
@@ -42,7 +42,7 @@ user_group_has_checkout_type_00004:
42
42
  checkout_renewal_limit: 1
43
43
  id: 4
44
44
  created_at: 2007-12-23 03:13:29.880538 +09:00
45
- set_due_date_before_closing_day: false
45
+ set_due_date_after_closing_day: false
46
46
  user_group_has_checkout_type_00005:
47
47
  checkout_type_id: 1
48
48
  updated_at: 2007-12-23 03:13:37.440462 +09:00
@@ -53,7 +53,7 @@ user_group_has_checkout_type_00005:
53
53
  checkout_renewal_limit: 1
54
54
  id: 5
55
55
  created_at: 2007-12-23 03:13:37.440462 +09:00
56
- set_due_date_before_closing_day: false
56
+ set_due_date_after_closing_day: false
57
57
  user_group_has_checkout_type_00006:
58
58
  checkout_type_id: 2
59
59
  updated_at: 2007-12-23 03:13:46.312751 +09:00
@@ -64,7 +64,7 @@ user_group_has_checkout_type_00006:
64
64
  checkout_renewal_limit: 1
65
65
  id: 6
66
66
  created_at: 2007-12-23 03:13:46.312751 +09:00
67
- set_due_date_before_closing_day: false
67
+ set_due_date_after_closing_day: false
68
68
  user_group_has_checkout_type_00007:
69
69
  checkout_type_id: 3
70
70
  updated_at: 2007-12-23 03:13:46.312751 +09:00
@@ -75,7 +75,7 @@ user_group_has_checkout_type_00007:
75
75
  checkout_renewal_limit: 1
76
76
  id: 7
77
77
  created_at: 2007-12-23 03:13:46.312751 +09:00
78
- set_due_date_before_closing_day: true
78
+ set_due_date_after_closing_day: true
79
79
  user_group_has_checkout_type_00008:
80
80
  checkout_type_id: 3
81
81
  updated_at: 2007-12-23 03:13:46.312751 +09:00
@@ -86,25 +86,25 @@ user_group_has_checkout_type_00008:
86
86
  checkout_renewal_limit: 1
87
87
  id: 8
88
88
  created_at: 2007-12-23 03:13:46.312751 +09:00
89
- set_due_date_before_closing_day: true
89
+ set_due_date_after_closing_day: true
90
90
 
91
91
  # == Schema Information
92
92
  #
93
93
  # Table name: user_group_has_checkout_types
94
94
  #
95
- # id :integer not null, primary key
96
- # user_group_id :integer not null
97
- # checkout_type_id :integer not null
98
- # checkout_limit :integer default("0"), not null
99
- # checkout_period :integer default("0"), not null
100
- # checkout_renewal_limit :integer default("0"), not null
101
- # reservation_limit :integer default("0"), not null
102
- # reservation_expired_period :integer default("7"), not null
103
- # set_due_date_before_closing_day :boolean default("0"), not null
104
- # fixed_due_date :datetime
105
- # note :text
106
- # position :integer
107
- # created_at :datetime
108
- # updated_at :datetime
109
- # current_checkout_count :integer
95
+ # id :integer not null, primary key
96
+ # user_group_id :integer not null
97
+ # checkout_type_id :integer not null
98
+ # checkout_limit :integer default(0), not null
99
+ # checkout_period :integer default(0), not null
100
+ # checkout_renewal_limit :integer default(0), not null
101
+ # reservation_limit :integer default(0), not null
102
+ # reservation_expired_period :integer default(7), not null
103
+ # set_due_date_after_closing_day :boolean default(FALSE), not null
104
+ # fixed_due_date :datetime
105
+ # note :text
106
+ # position :integer
107
+ # created_at :datetime
108
+ # updated_at :datetime
109
+ # current_checkout_count :integer
110
110
  #
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  user_group_00001:
3
3
  name: not_specified
4
- display_name: (not specified)
4
+ display_name_translations: {"en": "(not specified)", "ja": "不明"}
5
5
  updated_at: 2007-12-13 21:00:51.564542 +09:00
6
6
  id: 1
7
7
  note: ""
@@ -11,7 +11,7 @@ user_group_00001:
11
11
  number_of_day_to_notify_due_date: 2
12
12
  user_group_00002:
13
13
  name: user
14
- display_name: User
14
+ display_name_translations: {"en": "User", "ja": "一般利用者"}
15
15
  updated_at: 2007-12-23 03:14:56.836548 +09:00
16
16
  id: 2
17
17
  note: ""
@@ -22,10 +22,30 @@ user_group_00002:
22
22
  number_of_time_to_notify_overdue: 6
23
23
  user_group_00003:
24
24
  name: faculty
25
- display_name: Faculty
25
+ display_name_translations: {"en": "Faculty", "ja": "教職員"}
26
26
  updated_at: 2007-12-23 03:15:05.134351 +09:00
27
27
  id: 3
28
28
  note: ""
29
29
  created_at: 2007-12-23 03:15:05.126457 +09:00
30
30
  position: 3
31
31
  valid_period_for_new_user: 730
32
+
33
+ # == Schema Information
34
+ #
35
+ # Table name: user_groups
36
+ #
37
+ # id :integer not null, primary key
38
+ # name :string
39
+ # display_name :text
40
+ # note :text
41
+ # position :integer
42
+ # created_at :datetime
43
+ # updated_at :datetime
44
+ # deleted_at :datetime
45
+ # valid_period_for_new_user :integer default(0), not null
46
+ # expired_at :datetime
47
+ # number_of_day_to_notify_overdue :integer default(7), not null
48
+ # number_of_day_to_notify_due_date :integer default(3), not null
49
+ # number_of_time_to_notify_overdue :integer default(3), not null
50
+ # display_name_translations :jsonb not null
51
+ #
@@ -13,7 +13,7 @@ describe ItemsHelper, type: :helper do
13
13
  facet = double(:facet, value: "Available On Shelf", count: 10)
14
14
  helper.stub(:filtered_params).and_return(ActionController::Parameters.new(acquired_from: '2012-01-01', controller: "items").permit([:acquired_from, :controller]))
15
15
  rendered = helper.circulation_status_facet(facet)
16
- expect(rendered).to have_link "Available On Shelf (10)", href: "/items?acquired_from=2012-01-01&circulation_status=Available+On+Shelf"
16
+ expect(rendered).to have_link "#{CirculationStatus.find(2).display_name} (10)" #, href: "/items?acquired_from=2012-01-01&circulation_status=Available+On+Shelf"
17
17
  end
18
18
  end
19
19
  end
@@ -45,5 +45,6 @@ end
45
45
  # basket_id :integer
46
46
  # created_at :datetime
47
47
  # updated_at :datetime
48
- # lock_version :integer default("0"), not null
48
+ # lock_version :integer default(0), not null
49
+ # checkin_id :bigint
49
50
  #
@@ -68,8 +68,8 @@ end
68
68
  # librarian_id :integer
69
69
  # basket_id :integer
70
70
  # due_date :datetime
71
- # checkout_renewal_count :integer default("0"), not null
72
- # lock_version :integer default("0"), not null
71
+ # checkout_renewal_count :integer default(0), not null
72
+ # lock_version :integer default(0), not null
73
73
  # created_at :datetime
74
74
  # updated_at :datetime
75
75
  # shelf_id :integer
@@ -12,7 +12,7 @@ end
12
12
  # id :integer not null, primary key
13
13
  # user_checkout_stat_id :integer not null
14
14
  # user_id :integer not null
15
- # checkouts_count :integer default("0"), not null
15
+ # checkouts_count :integer default(0), not null
16
16
  # created_at :datetime
17
17
  # updated_at :datetime
18
18
  #
@@ -9,11 +9,12 @@ end
9
9
  #
10
10
  # Table name: checkout_types
11
11
  #
12
- # id :integer not null, primary key
13
- # name :string not null
14
- # display_name :text
15
- # note :text
16
- # position :integer
17
- # created_at :datetime
18
- # updated_at :datetime
12
+ # id :integer not null, primary key
13
+ # name :string not null
14
+ # display_name :text
15
+ # note :text
16
+ # position :integer
17
+ # created_at :datetime
18
+ # updated_at :datetime
19
+ # display_name_translations :jsonb not null
19
20
  #