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.
- checksums.yaml +4 -4
- data/README.md +2 -3
- data/app/controllers/checkins_controller.rb +2 -2
- data/app/controllers/user_group_has_checkout_types_controller.rb +1 -1
- data/app/helpers/items_helper.rb +3 -3
- data/app/models/checked_item.rb +7 -17
- data/app/models/checkin.rb +3 -2
- data/app/models/checkout.rb +2 -2
- data/app/models/checkout_stat_has_user.rb +1 -1
- data/app/models/checkout_type.rb +9 -7
- data/app/models/circulation_status.rb +9 -8
- data/app/models/concerns/enju_circulation/enju_item.rb +2 -46
- data/app/models/concerns/enju_circulation/enju_user_group.rb +0 -1
- data/app/models/concerns/enju_circulation/enju_withdraw.rb +1 -7
- data/app/models/manifestation_checkout_stat_transition.rb +1 -1
- data/app/models/manifestation_reserve_stat_transition.rb +1 -1
- data/app/models/reserve.rb +5 -5
- data/app/models/reserve_state_machine.rb +3 -2
- data/app/models/reserve_transition.rb +1 -1
- data/app/models/retain.rb +15 -0
- data/app/models/user_checkout_stat_transition.rb +1 -1
- data/app/models/user_group_has_checkout_type.rb +15 -37
- data/app/models/user_reserve_stat_transition.rb +1 -1
- data/app/views/carrier_type_has_checkout_types/_form.html.erb +2 -2
- data/app/views/carrier_type_has_checkout_types/index.html.erb +2 -2
- data/app/views/carrier_type_has_checkout_types/show.html.erb +2 -2
- data/app/views/carrier_types/_carrier_type_has_checkout_type_fields.html.erb +1 -1
- data/app/views/checked_items/new.html.erb +1 -1
- data/app/views/checkins/_checkin.html.erb +1 -1
- data/app/views/checkout_types/_form.html.erb +1 -1
- data/app/views/checkout_types/index.html.erb +1 -1
- data/app/views/checkout_types/show.html.erb +2 -2
- data/app/views/checkouts/_index_user.html.erb +1 -1
- data/app/views/checkouts/_list.html.erb +2 -9
- data/app/views/checkouts/index.atom.builder +1 -1
- data/app/views/checkouts/index.ics.erb +1 -1
- data/app/views/checkouts/index.rss.builder +1 -1
- data/app/views/circulation_statuses/_form.html.erb +1 -1
- data/app/views/circulation_statuses/index.html.erb +1 -1
- data/app/views/circulation_statuses/show.html.erb +1 -1
- data/app/views/item_has_use_restrictions/index.html.erb +1 -1
- data/app/views/item_has_use_restrictions/show.html.erb +1 -1
- data/app/views/manifestation_checkout_stats/_group_by_carrier_type.html.erb +3 -3
- data/app/views/manifestation_checkout_stats/_group_by_checkout_type.html.erb +3 -3
- data/app/views/manifestations/_circulation_status.html.erb +3 -3
- data/app/views/profiles/_submenu_checkout.html.erb +1 -1
- data/app/views/reserves/_new.html.erb +1 -1
- data/app/views/reserves/_new_user.html.erb +1 -1
- data/app/views/reserves/edit.html.erb +1 -1
- data/app/views/reserves/index.atom.builder +1 -1
- data/app/views/reserves/index.html.erb +1 -1
- data/app/views/reserves/index.rss.builder +1 -1
- data/app/views/reserves/show.html.erb +1 -1
- data/app/views/use_restrictions/_form.html.erb +1 -1
- data/app/views/use_restrictions/index.html.erb +1 -1
- data/app/views/use_restrictions/show.html.erb +1 -1
- data/app/views/user_group_has_checkout_types/edit.html.erb +4 -4
- data/app/views/user_group_has_checkout_types/index.html.erb +2 -2
- data/app/views/user_group_has_checkout_types/new.html.erb +4 -4
- data/app/views/user_group_has_checkout_types/show.html.erb +4 -4
- data/app/views/user_groups/_user_group_has_checkout_type_fields.html.erb +2 -2
- data/config/locales/translation_en.yml +1 -14
- data/config/locales/translation_ja.yml +1 -14
- data/config/routes.rb +1 -2
- data/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +3 -3
- data/db/migrate/20190508160525_create_retains.rb +10 -0
- data/db/migrate/20190629134017_rename_user_group_has_checkout_type_due_date_before_to_due_date_after.rb +5 -0
- data/db/migrate/20190706052525_add_display_name_translations_to_circulation_status.rb +5 -0
- data/db/migrate/20190713114724_add_checkout_id_to_checkin.rb +5 -0
- data/db/migrate/20190814120827_add_display_name_translations_to_checkout_type.rb +5 -0
- data/lib/enju_circulation/version.rb +1 -1
- data/lib/generators/enju_circulation/setup/templates/db/fixtures/checkout_types.yml +3 -5
- data/lib/generators/enju_circulation/setup/templates/db/fixtures/circulation_statuses.yml +16 -48
- data/lib/tasks/enju_circulation_tasks.rake +7 -1
- data/spec/concerns/enju_accept_spec.rb +14 -14
- data/spec/controllers/accepts_controller_spec.rb +294 -0
- data/spec/controllers/baskets_controller_spec.rb +379 -0
- data/spec/controllers/checkins_controller_spec.rb +8 -130
- data/spec/controllers/items_controller_spec.rb +23 -43
- data/spec/dummy/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy/app/models/user.rb +1 -1
- data/spec/dummy/bin/bundle +1 -1
- data/spec/dummy/bin/setup +1 -3
- data/spec/dummy/bin/update +4 -2
- data/spec/dummy/bin/yarn +3 -3
- data/spec/dummy/config/database.yml +70 -9
- data/spec/dummy/config/initializers/assets.rb +1 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/113_create_events.rb +2 -4
- data/spec/dummy/db/migrate/20081028093607_create_event_import_files.rb +2 -4
- data/spec/dummy/db/migrate/20090519203307_create_participates.rb +2 -4
- data/spec/dummy/db/migrate/20100925074639_create_event_import_results.rb +2 -2
- data/spec/dummy/db/migrate/20140720192418_add_default_library_id_to_event_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140812152348_create_event_export_files.rb +1 -1
- data/spec/dummy/db/migrate/20140814070854_add_default_event_category_id_to_event_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20151128142913_create_places.rb +14 -0
- data/spec/dummy/db/migrate/20151201163718_add_place_id_to_event.rb +5 -0
- data/spec/dummy/db/migrate/20160703184258_add_most_recent_to_event_import_file_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20160703184311_add_most_recent_to_event_export_file_transitions.rb +9 -0
- data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107164558_add_constraints_to_most_recent_for_event_import_file_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20180107164617_add_constraints_to_most_recent_for_event_export_file_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20181119170645_add_foreign_key_to_events_referencing_event_categories.rb +5 -0
- data/spec/dummy/db/migrate/20190630113817_add_display_name_translations_to_library_group.rb +12 -0
- data/spec/dummy/db/migrate/20190630115523_add_login_banner_translations_to_library_group.rb +6 -0
- data/spec/dummy/db/migrate/20190630151446_add_display_name_translations_to_role.rb +5 -0
- data/spec/dummy/db/migrate/20190630153136_add_display_name_translations_to_event.rb +6 -0
- data/spec/dummy/db/migrate/20190712163038_add_display_name_translations_to_carrier_type.rb +21 -0
- data/spec/dummy/db/migrate/20190713114940_add_profile_id_to_user.rb +5 -0
- data/spec/dummy/db/migrate/20190713115451_add_full_name_translations_to_profile.rb +5 -0
- data/spec/dummy/db/schema.rb +221 -184
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/private/system/carrier_types/attachments/000/000/001/original/book.png +0 -0
- data/spec/dummy/private/system/carrier_types/attachments/000/000/001/thumb/book.png +0 -0
- data/spec/factories/accept.rb +1 -1
- data/spec/factories/item.rb +4 -4
- data/spec/factories/reserve.rb +1 -5
- data/spec/fixtures/carrier_types.yml +16 -15
- data/spec/fixtures/checkins.yml +2 -1
- data/spec/fixtures/checkout_stat_has_users.yml +1 -1
- data/spec/fixtures/checkout_types.yml +11 -10
- data/spec/fixtures/checkouts.yml +2 -2
- data/spec/fixtures/circulation_statuses.yml +26 -34
- data/spec/fixtures/content_types.yml +20 -31
- data/spec/fixtures/event_categories.yml +23 -23
- data/spec/fixtures/frequencies.yml +17 -25
- data/spec/fixtures/items.yml +1 -1
- data/spec/fixtures/libraries.yml +30 -31
- data/spec/fixtures/library_groups.yml +43 -20
- data/spec/fixtures/request_status_types.yml +14 -14
- data/spec/fixtures/request_types.yml +13 -13
- data/spec/fixtures/reserve_transitions.yml +1 -1
- data/spec/fixtures/reserves.yml +3 -3
- data/spec/fixtures/roles.yml +22 -5
- data/spec/fixtures/shelves.yml +16 -15
- data/spec/fixtures/user_group_has_checkout_types.yml +24 -24
- data/spec/fixtures/user_groups.yml +23 -3
- data/spec/helpers/items_helper_spec.rb +1 -1
- data/spec/models/checkin_spec.rb +2 -1
- data/spec/models/checkout_spec.rb +2 -2
- data/spec/models/checkout_stat_has_user_spec.rb +1 -1
- data/spec/models/checkout_type_spec.rb +8 -7
- data/spec/models/circulation_status_spec.rb +8 -7
- data/spec/models/item_spec.rb +6 -8
- data/spec/models/manifestation_spec.rb +15 -18
- data/spec/models/reserve_spec.rb +3 -3
- data/spec/models/resource_export_file_spec.rb +0 -15
- data/spec/models/retain_spec.rb +16 -0
- data/spec/models/user_group_has_checkout_type_spec.rb +15 -32
- data/spec/models/withdraw_spec.rb +4 -6
- data/spec/policies/manifestation_policy_spec.rb +2 -1
- data/spec/rails_helper.rb +10 -3
- data/spec/views/items/index.html.erb_spec.rb +1 -4
- metadata +396 -446
- data/app/controllers/lending_policies_controller.rb +0 -106
- data/app/models/lending_policy.rb +0 -30
- data/app/views/lending_policies/_form.html.erb +0 -41
- data/app/views/lending_policies/edit.html.erb +0 -13
- data/app/views/lending_policies/index.html.erb +0 -42
- data/app/views/lending_policies/new.html.erb +0 -12
- data/app/views/lending_policies/show.html.erb +0 -50
- data/db/migrate/20090831220301_create_lending_policies.rb +0 -21
- data/spec/controllers/lending_policies_controller_spec.rb +0 -444
- data/spec/controllers/withdraws_controller_spec.rb +0 -26
- data/spec/dummy/config/locales/en.yml +0 -208
- data/spec/dummy/config/locales/ja.yml +0 -200
- data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +0 -5
- data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +0 -5
- data/spec/dummy/db/migrate/20200425072340_create_manifestation_custom_properties.rb +0 -12
- data/spec/dummy/db/migrate/20200425072349_create_item_custom_properties.rb +0 -12
- data/spec/dummy/db/migrate/20200425074758_create_manifestation_custom_values.rb +0 -12
- data/spec/dummy/db/migrate/20200425074822_create_item_custom_values.rb +0 -12
- data/spec/fixtures/accepts.yml +0 -9
- data/spec/fixtures/bookstores.yml +0 -99
- data/spec/fixtures/budget_types.yml +0 -30
- data/spec/fixtures/exemplifies.yml +0 -168
- data/spec/fixtures/lending_policies.yml +0 -98
- data/spec/models/lending_policy_spec.rb +0 -23
- data/spec/system/items_spec.rb +0 -21
- data/spec/system/user_group_has_checkout_types.rb +0 -14
@@ -21,15 +21,8 @@
|
|
21
21
|
<% end %>
|
22
22
|
<% if checkout.shelf %>
|
23
23
|
<%= t('activerecord.models.shelf') %>:
|
24
|
-
<%= link_to checkout.shelf.display_name
|
25
|
-
(<%= link_to checkout.shelf.library.display_name
|
26
|
-
<% end %>
|
27
|
-
<% if checkout.item.manifestation.next_reservation %>
|
28
|
-
<br />
|
29
|
-
(<%= link_to_if(current_user.has_role?('Librarian'),
|
30
|
-
t('page.number_of_reservations',
|
31
|
-
count: Reserve.waiting.where(manifestation_id: checkout.item.manifestation.id, checked_out_at: nil).count),
|
32
|
-
reserves_path(query: "manifestation_id_i:#{checkout.item.manifestation.id}")) -%>)
|
24
|
+
<%= link_to checkout.shelf.display_name, checkout.shelf %>
|
25
|
+
(<%= link_to checkout.shelf.library.display_name, checkout.shelf.library %>)
|
33
26
|
<% end %>
|
34
27
|
</td>
|
35
28
|
<td>
|
@@ -2,7 +2,7 @@ atom_feed(url: checkouts_url(format: :atom)) do |feed|
|
|
2
2
|
if @user
|
3
3
|
feed.title t('checkout.user_checkout', login_name: @user.username)
|
4
4
|
else
|
5
|
-
feed.title t('checkout.library_group_checkout', library_group_name: @library_group.display_name
|
5
|
+
feed.title t('checkout.library_group_checkout', library_group_name: @library_group.display_name)
|
6
6
|
end
|
7
7
|
feed.updated(@checkouts.first ? @checkouts.first.created_at : Time.zone.now)
|
8
8
|
|
@@ -7,7 +7,7 @@ RiCal.Calendar do
|
|
7
7
|
description checkout.item.manifestation.original_title
|
8
8
|
dtstart checkout.due_date.to_date
|
9
9
|
dtend checkout.due_date.to_date
|
10
|
-
location checkout.item.shelf.library.display_name
|
10
|
+
location checkout.item.shelf.library.display_name
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end.to_s
|
@@ -9,7 +9,7 @@ xml.rss('version' => "2.0",
|
|
9
9
|
xml.tag! "atom:link", rel: 'self', href: "#{request.protocol}#{request.host_with_port}#{url_for(params.permit.merge(format: :rss, only_path: true))}"
|
10
10
|
xml.tag! "atom:link", rel: 'alternate', href: checkouts_url(user_id: @user.username)
|
11
11
|
else
|
12
|
-
xml.title t('checkout.library_group_checkout', library_group_name: @library_group.display_name
|
12
|
+
xml.title t('checkout.library_group_checkout', library_group_name: @library_group.display_name)
|
13
13
|
xml.link checkouts_url
|
14
14
|
xml.tag! "atom:link", rel: 'self', href: "#{request.protocol}#{request.host_with_port}#{url_for(params.permit.merge(format: :rss, only_path: true))}"
|
15
15
|
xml.tag! "atom:link", rel: 'alternate', href: checkouts_url
|
@@ -23,7 +23,7 @@
|
|
23
23
|
</td>
|
24
24
|
<td><%= circulation_status.name -%></td>
|
25
25
|
<td>
|
26
|
-
<%= link_to circulation_status.display_name
|
26
|
+
<%= link_to circulation_status.display_name, circulation_status -%>
|
27
27
|
<br />
|
28
28
|
<%= circulation_status.note %>
|
29
29
|
</td>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<td><%= link_to item_has_use_restriction.item_id, item_has_use_restriction.item -%></td>
|
14
14
|
<td><%= link_to item_has_use_restriction.item.item_identifier, item_has_use_restriction.item -%></td>
|
15
15
|
<td><%= link_to item_has_use_restriction.item.manifestation.original_title, item_has_use_restriction.item.manifestation -%></td>
|
16
|
-
<td><%= link_to item_has_use_restriction.use_restriction.display_name
|
16
|
+
<td><%= link_to item_has_use_restriction.use_restriction.display_name, item_has_use_restriction.use_restriction -%></td>
|
17
17
|
<td><%= link_to t('page.show'), item_has_use_restriction -%></td>
|
18
18
|
<td><%= link_to t('page.edit'), edit_item_has_use_restriction_path(item_has_use_restriction) -%></td>
|
19
19
|
<td><%= link_to t('page.destroy'), item_has_use_restriction, data: {confirm: t('page.are_you_sure')}, method: :delete -%></td>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
<p>
|
17
17
|
<strong><%= t('activerecord.models.use_restriction') -%>:</strong>
|
18
|
-
<%= link_to @item_has_use_restriction.use_restriction.display_name
|
18
|
+
<%= link_to @item_has_use_restriction.use_restriction.display_name, @item_has_use_restriction.use_restriction -%>
|
19
19
|
</p>
|
20
20
|
|
21
21
|
</div>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<%= t('activerecord.models.shelf') %>
|
8
8
|
</th>
|
9
9
|
<% CarrierType.order(:position).each do |carrier_type| %>
|
10
|
-
<th><%= carrier_type.display_name
|
10
|
+
<th><%= carrier_type.display_name %></th>
|
11
11
|
<% end %>
|
12
12
|
<th><%= t('page.total') %></th>
|
13
13
|
</tr>
|
@@ -15,10 +15,10 @@
|
|
15
15
|
<% library.shelves.order(:position).each do |shelf| %>
|
16
16
|
<tr>
|
17
17
|
<td>
|
18
|
-
<%= library.display_name
|
18
|
+
<%= library.display_name %>
|
19
19
|
</td>
|
20
20
|
<td>
|
21
|
-
<%= shelf.display_name
|
21
|
+
<%= shelf.display_name %>
|
22
22
|
</td>
|
23
23
|
<% CarrierType.order(:position).each do |carrier_type| %>
|
24
24
|
<td>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<%= t('activerecord.models.shelf') %>
|
8
8
|
</th>
|
9
9
|
<% CheckoutType.order(:position).each do |checkout_type| %>
|
10
|
-
<th><%= checkout_type.display_name
|
10
|
+
<th><%= checkout_type.display_name %></th>
|
11
11
|
<% end %>
|
12
12
|
<th><%= t('page.total') %></th>
|
13
13
|
</tr>
|
@@ -15,10 +15,10 @@
|
|
15
15
|
<% library.shelves.order(:position).each do |shelf| %>
|
16
16
|
<tr>
|
17
17
|
<td>
|
18
|
-
<%= library.display_name
|
18
|
+
<%= library.display_name %>
|
19
19
|
</td>
|
20
20
|
<td>
|
21
|
-
<%= shelf.display_name
|
21
|
+
<%= shelf.display_name %>
|
22
22
|
</td>
|
23
23
|
<% CheckoutType.order(:position).each do |checkout_type| %>
|
24
24
|
<td>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<td>
|
2
|
-
<%= item.circulation_status.display_name
|
2
|
+
<%= item.circulation_status.display_name if item.circulation_status -%>
|
3
3
|
<% if item.use_restriction.name == 'Not For Loan' %>
|
4
4
|
<br />
|
5
|
-
<%= item.use_restriction.display_name
|
5
|
+
<%= item.use_restriction.display_name %>
|
6
6
|
<% else %>
|
7
7
|
<% if item.retained? %>
|
8
8
|
<br />
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<br />
|
13
13
|
(
|
14
14
|
<%= t('activerecord.attributes.checkout.due_date') -%>:
|
15
|
-
<%= l(item.latest_checkout.due_date, format: :
|
15
|
+
<%= l(item.latest_checkout.due_date, format: :short) -%>
|
16
16
|
)
|
17
17
|
<% end %>
|
18
18
|
<% end %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<ul>
|
2
2
|
<%- profile.user_group.user_group_has_checkout_types.each do |available_checkout_type| -%>
|
3
3
|
<li>
|
4
|
-
<%= available_checkout_type.checkout_type.display_name
|
4
|
+
<%= available_checkout_type.checkout_type.display_name -%>:
|
5
5
|
<%= profile.user.checked_item_count[:"#{available_checkout_type.checkout_type.name}"] -%> / <%= available_checkout_type.checkout_limit -%>
|
6
6
|
</li>
|
7
7
|
<%- end -%>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
<div class="field">
|
24
24
|
<%= f.label :pickup_location_id %>
|
25
|
-
<%= f.select :pickup_location_id, @libraries.map{|l| [l.display_name
|
25
|
+
<%= f.select :pickup_location_id, @libraries.map{|l| [l.display_name, l.id]} %>
|
26
26
|
</div>
|
27
27
|
|
28
28
|
<% if current_user.has_role?('Librarian') %>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
|
35
35
|
<div class="field">
|
36
36
|
<%= f.label :pickup_location_id %>
|
37
|
-
<%= f.select :pickup_location_id, @libraries.map{|l| [l.display_name
|
37
|
+
<%= f.select :pickup_location_id, @libraries.map{|l| [l.display_name, l.id]} %>
|
38
38
|
</div>
|
39
39
|
|
40
40
|
<div class="actions">
|
@@ -2,7 +2,7 @@ atom_feed(url: reserves_url(format: :atom)) do |feed|
|
|
2
2
|
if @user
|
3
3
|
feed.title t('reserve.user_reserve', login_name: @user.username)
|
4
4
|
else
|
5
|
-
feed.title t('reserve.library_group_reserve', library_group_name: @library_group.display_name
|
5
|
+
feed.title t('reserve.library_group_reserve', library_group_name: @library_group.display_name)
|
6
6
|
end
|
7
7
|
feed.updated(@reserves.first ? @reserves.first.created_at : Time.zone.now)
|
8
8
|
|
@@ -51,7 +51,7 @@
|
|
51
51
|
<br />
|
52
52
|
<%= t('activerecord.attributes.reserve.expired_at') %>: <%= l(reserve.expired_at, format: :short) if reserve.expired_at? -%>
|
53
53
|
<br />
|
54
|
-
<%= t('activerecord.attributes.reserve.pickup_location_id') %>: <%= link_to reserve.pickup_location.display_name
|
54
|
+
<%= t('activerecord.attributes.reserve.pickup_location_id') %>: <%= link_to reserve.pickup_location.display_name, reserve.pickup_location if reserve.pickup_location %>
|
55
55
|
</td>
|
56
56
|
<td>
|
57
57
|
<%= i18n_state(reserve.current_state) -%>
|
@@ -7,7 +7,7 @@ xml.rss('version' => "2.0",
|
|
7
7
|
xml.title t('reserve.user_reserve', login_name: @user.username)
|
8
8
|
xml.link reserves_url(user_id: @user.username, format: :rss)
|
9
9
|
else
|
10
|
-
xml.title t('reserve.library_group_reserve', library_group_name: @library_group.display_name
|
10
|
+
xml.title t('reserve.library_group_reserve', library_group_name: @library_group.display_name)
|
11
11
|
xml.link reserves_url(format: :rss)
|
12
12
|
end
|
13
13
|
xml.description "Next-L Enju, an open source integrated library system developed by Project Next-L"
|
@@ -23,7 +23,7 @@
|
|
23
23
|
|
24
24
|
<p>
|
25
25
|
<strong><%= t('activerecord.attributes.reserve.pickup_location_id') -%>:</strong>
|
26
|
-
<%= link_to @reserve.pickup_location.display_name
|
26
|
+
<%= link_to @reserve.pickup_location.display_name, @reserve.pickup_location if @reserve.pickup_location -%>
|
27
27
|
</p>
|
28
28
|
|
29
29
|
<p>
|
@@ -7,11 +7,11 @@
|
|
7
7
|
|
8
8
|
<div class="field">
|
9
9
|
<%= f.label t('activerecord.models.user_group') -%><br />
|
10
|
-
<%= f.select(:user_group_id, @user_groups.collect{|u| [u.display_name
|
10
|
+
<%= f.select(:user_group_id, @user_groups.collect{|u| [u.display_name, u.id]}) -%>
|
11
11
|
</div>
|
12
12
|
<div class="field">
|
13
13
|
<%= f.label t('activerecord.models.checkout_type') -%><br />
|
14
|
-
<%= f.select(:checkout_type_id, @checkout_types.collect{|c| [c.display_name
|
14
|
+
<%= f.select(:checkout_type_id, @checkout_types.collect{|c| [c.display_name, c.id]}) -%>
|
15
15
|
</div>
|
16
16
|
<div class="field">
|
17
17
|
<%= f.label :checkout_limit -%><br />
|
@@ -34,8 +34,8 @@
|
|
34
34
|
</div>
|
35
35
|
|
36
36
|
<div class="field">
|
37
|
-
<%= f.label :
|
38
|
-
<%= f.check_box :
|
37
|
+
<%= f.label :set_due_date_after_closing_day -%>
|
38
|
+
<%= f.check_box :set_due_date_after_closing_day -%>
|
39
39
|
</div>
|
40
40
|
|
41
41
|
<div class="field">
|
@@ -11,8 +11,8 @@
|
|
11
11
|
|
12
12
|
<%- @user_group_has_checkout_types.each do |user_group_has_checkout_type| -%>
|
13
13
|
<tr class="line<%= cycle("0", "1") -%>">
|
14
|
-
<td><%= link_to user_group_has_checkout_type.user_group.display_name.localize
|
15
|
-
<td><%= link_to user_group_has_checkout_type.checkout_type.display_name.localize
|
14
|
+
<td><%= link_to user_group_has_checkout_type.user_group.display_name.localize, user_group_has_checkout_type.user_group -%></td>
|
15
|
+
<td><%= link_to user_group_has_checkout_type.checkout_type.display_name.localize, user_group_has_checkout_type.checkout_type -%></td>
|
16
16
|
<td>
|
17
17
|
<%= link_to t('page.show'), user_group_has_checkout_type -%>
|
18
18
|
<%- if policy(user_group_has_checkout_type).update? -%>
|
@@ -7,11 +7,11 @@
|
|
7
7
|
|
8
8
|
<div class="field">
|
9
9
|
<%= f.label t('activerecord.models.user_group') -%><br />
|
10
|
-
<%= f.select(:user_group_id, @user_groups.collect{|u| [u.display_name
|
10
|
+
<%= f.select(:user_group_id, @user_groups.collect{|u| [u.display_name, u.id]}, include_blank: true) -%>
|
11
11
|
</div>
|
12
12
|
<div class="field">
|
13
13
|
<%= f.label t('activerecord.models.checkout_type') -%><br />
|
14
|
-
<%= f.select(:checkout_type_id, @checkout_types.collect{|c| [c.display_name
|
14
|
+
<%= f.select(:checkout_type_id, @checkout_types.collect{|c| [c.display_name, c.id]}, include_blank: true) -%>
|
15
15
|
</div>
|
16
16
|
<div class="field">
|
17
17
|
<%= f.label :checkout_limit -%><br />
|
@@ -34,8 +34,8 @@
|
|
34
34
|
</div>
|
35
35
|
|
36
36
|
<div class="field">
|
37
|
-
<%= f.label :
|
38
|
-
<%= f.check_box :
|
37
|
+
<%= f.label :set_due_date_after_closing_day -%>
|
38
|
+
<%= f.check_box :set_due_date_after_closing_day -%>
|
39
39
|
</div>
|
40
40
|
|
41
41
|
<div class="field">
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
<p>
|
7
7
|
<strong><%= t('activerecord.models.user_group') -%>:</strong>
|
8
|
-
<%= link_to @user_group_has_checkout_type.user_group.display_name
|
8
|
+
<%= link_to @user_group_has_checkout_type.user_group.display_name, @user_group_has_checkout_type.user_group -%>
|
9
9
|
</p>
|
10
10
|
|
11
11
|
<p>
|
12
12
|
<strong><%= t('activerecord.models.checkout_type') -%>:</strong>
|
13
|
-
<%= link_to @user_group_has_checkout_type.checkout_type.display_name
|
13
|
+
<%= link_to @user_group_has_checkout_type.checkout_type.display_name, @user_group_has_checkout_type.checkout_type -%>
|
14
14
|
</p>
|
15
15
|
|
16
16
|
<p>
|
@@ -39,8 +39,8 @@
|
|
39
39
|
</p>
|
40
40
|
|
41
41
|
<p>
|
42
|
-
<strong><%= t('activerecord.attributes.user_group_has_checkout_type.
|
43
|
-
<%= localized_boolean(@user_group_has_checkout_type.
|
42
|
+
<strong><%= t('activerecord.attributes.user_group_has_checkout_type.set_due_date_after_closing_day') -%>:</strong>
|
43
|
+
<%= localized_boolean(@user_group_has_checkout_type.set_due_date_after_closing_day) -%>
|
44
44
|
</p>
|
45
45
|
|
46
46
|
<p>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<br />
|
9
9
|
<%= f.label :reservation_limit -%>
|
10
10
|
<%= f.text_field :reservation_limit, class: 'resource_integer' %>
|
11
|
-
<%= f.label :
|
12
|
-
<%= f.check_box :
|
11
|
+
<%= f.label :set_due_date_after_closing_day -%>
|
12
|
+
<%= f.check_box :set_due_date_after_closing_day %>
|
13
13
|
<%= link_to_remove_association t('page.remove'), f, data: {confirm: t('page.are_you_sure')} %>
|
14
14
|
</div>
|
@@ -32,7 +32,6 @@ en:
|
|
32
32
|
lock_version: Lock version
|
33
33
|
checked_item:
|
34
34
|
due_date: Due date
|
35
|
-
item: Item
|
36
35
|
checkin:
|
37
36
|
item_id: Item
|
38
37
|
checkout:
|
@@ -73,7 +72,7 @@ en:
|
|
73
72
|
checkout_renewal_limit: Checkout renewal limit
|
74
73
|
reservation_limit: Reservation limit
|
75
74
|
reservation_expired_period: Reservation expired period
|
76
|
-
|
75
|
+
set_due_date_after_closing_day: Set due date after the closing day
|
77
76
|
fixed_due_date: Fixed due date
|
78
77
|
note: Note
|
79
78
|
position: Position
|
@@ -125,18 +124,6 @@ en:
|
|
125
124
|
profile:
|
126
125
|
checkout_icalendar_token: Checkout iCalendar token
|
127
126
|
save_checkout_history: Save checkout history
|
128
|
-
errors:
|
129
|
-
models:
|
130
|
-
item:
|
131
|
-
attributes:
|
132
|
-
circulation_status_id:
|
133
|
-
is_rented: Circulation status is invalid. This item is rented.
|
134
|
-
is_reserved: Circulation status is invalid. This item is reserved.
|
135
|
-
withdraw:
|
136
|
-
attributes:
|
137
|
-
item_id:
|
138
|
-
is_rented: is rented.
|
139
|
-
is_reserved: is reserved.
|
140
127
|
|
141
128
|
basket:
|
142
129
|
this_account_is_suspended: "This account is suspended."
|
@@ -30,7 +30,6 @@ ja:
|
|
30
30
|
lock_version: ロックバージョン
|
31
31
|
checked_item:
|
32
32
|
due_date: 返却期限
|
33
|
-
item: 個別資料
|
34
33
|
checkin:
|
35
34
|
item_id: 個別資料
|
36
35
|
checkout:
|
@@ -71,7 +70,7 @@ ja:
|
|
71
70
|
checkout_renewal_limit: 貸出更新回数の上限
|
72
71
|
reservation_limit: 予約数の上限
|
73
72
|
reservation_expired_period: 予約の期限切れまでの期間
|
74
|
-
|
73
|
+
set_due_date_after_closing_day: 返却日を閉館日の前日にする
|
75
74
|
fixed_due_date: 固定貸出期限
|
76
75
|
note: 注記
|
77
76
|
position: 位置
|
@@ -123,18 +122,6 @@ ja:
|
|
123
122
|
profile:
|
124
123
|
checkout_icalendar_token: 貸出iCalendarのトークン
|
125
124
|
save_checkout_history: 貸出の履歴を保存する
|
126
|
-
errors:
|
127
|
-
models:
|
128
|
-
item:
|
129
|
-
attributes:
|
130
|
-
circulation_status_id:
|
131
|
-
is_rented: この貸出状態には変更できません。資料が貸し出されています。
|
132
|
-
is_reserved: この貸出状態には変更できません。資料が予約されています。
|
133
|
-
withdraw:
|
134
|
-
attributes:
|
135
|
-
item_id:
|
136
|
-
is_rented: は貸し出されています。
|
137
|
-
is_reserved: は予約されています。
|
138
125
|
|
139
126
|
basket:
|
140
127
|
this_account_is_suspended: "このアカウントは停止されています。"
|
data/config/routes.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
class AddNumberOfDayToNotifyOverdueToUserGroup < ActiveRecord::Migration[4.2]
|
2
2
|
def self.up
|
3
|
-
add_column :user_groups, :number_of_day_to_notify_overdue, :integer, default:
|
4
|
-
add_column :user_groups, :number_of_day_to_notify_due_date, :integer, default:
|
5
|
-
add_column :user_groups, :number_of_time_to_notify_overdue, :integer, default:
|
3
|
+
add_column :user_groups, :number_of_day_to_notify_overdue, :integer, default: 7, null: false
|
4
|
+
add_column :user_groups, :number_of_day_to_notify_due_date, :integer, default: 3, null: false
|
5
|
+
add_column :user_groups, :number_of_time_to_notify_overdue, :integer, default: 3, null: false
|
6
6
|
end
|
7
7
|
|
8
8
|
def self.down
|
@@ -3,20 +3,18 @@
|
|
3
3
|
checkout_type_00001:
|
4
4
|
id: 1
|
5
5
|
name: book
|
6
|
-
|
7
|
-
ja: 図書"
|
6
|
+
display_name_translations: {"en": "Book", "ja": "図書"}
|
8
7
|
note:
|
9
8
|
position: 1
|
10
9
|
checkout_type_00002:
|
11
10
|
id: 2
|
12
11
|
name: serial
|
13
|
-
|
14
|
-
ja: 定期刊行物"
|
12
|
+
display_name_translations: {"en": "Serial", "ja": "定期刊行物"}
|
15
13
|
note:
|
16
14
|
position: 2
|
17
15
|
checkout_type_00003:
|
18
16
|
id: 3
|
19
17
|
name: cd
|
20
|
-
|
18
|
+
display_name_translations: {"en": "CD", "ja": "CD"}
|
21
19
|
note:
|
22
20
|
position: 3
|