enju_circulation 0.1.0.pre36 → 0.1.0.pre37
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/carrier_type_has_checkout_types_controller.rb +11 -11
- data/app/controllers/checked_items_controller.rb +13 -13
- data/app/controllers/checkins_controller.rb +14 -15
- data/app/controllers/checkout_types_controller.rb +10 -10
- data/app/controllers/checkouts_controller.rb +18 -19
- data/app/controllers/item_has_use_restrictions_controller.rb +10 -10
- data/app/controllers/lending_policies_controller.rb +1 -1
- data/app/controllers/manifestation_checkout_stats_controller.rb +15 -13
- data/app/controllers/manifestation_reserve_stats_controller.rb +15 -13
- data/app/controllers/reserves_controller.rb +27 -28
- data/app/controllers/user_checkout_stats_controller.rb +15 -13
- data/app/controllers/user_group_has_checkout_types_controller.rb +11 -11
- data/app/controllers/user_reserve_stats_controller.rb +15 -13
- data/app/models/carrier_type_has_checkout_type.rb +6 -6
- data/app/models/checked_item.rb +20 -18
- data/app/models/checkin.rb +13 -14
- data/app/models/checkout.rb +20 -21
- data/app/models/checkout_stat_has_manifestation.rb +2 -2
- data/app/models/checkout_stat_has_user.rb +2 -2
- data/app/models/checkout_type.rb +9 -9
- data/app/models/circulation_status.rb +13 -3
- data/app/models/enju_circulation/ability.rb +1 -1
- data/app/models/item_has_use_restriction.rb +3 -3
- data/app/models/lending_policy.rb +4 -4
- data/app/models/manifestation_checkout_stat.rb +4 -3
- data/app/models/manifestation_checkout_stat_transition.rb +13 -0
- data/app/models/manifestation_reserve_stat.rb +4 -3
- data/app/models/manifestation_reserve_stat_transition.rb +13 -0
- data/app/models/reserve.rb +123 -157
- data/app/models/reserve_stat_has_manifestation.rb +2 -2
- data/app/models/reserve_stat_has_user.rb +2 -2
- data/app/models/reserve_state_machine.rb +93 -0
- data/app/models/reserve_transition.rb +20 -0
- data/app/models/use_restriction.rb +5 -5
- data/app/models/user_checkout_stat.rb +4 -3
- data/app/models/user_checkout_stat_transition.rb +13 -0
- data/app/models/user_group_has_checkout_type.rb +8 -8
- data/app/models/user_reserve_stat.rb +4 -3
- data/app/models/user_reserve_stat_transition.rb +13 -0
- data/app/views/carrier_type_has_checkout_types/_form.html.erb +3 -3
- data/app/views/carrier_type_has_checkout_types/edit.html.erb +1 -1
- data/app/views/carrier_type_has_checkout_types/index.html.erb +3 -3
- data/app/views/carrier_type_has_checkout_types/new.html.erb +1 -1
- data/app/views/carrier_type_has_checkout_types/show.html.erb +1 -1
- data/app/views/carrier_types/_checkout_form.html.erb +1 -1
- data/app/views/checked_items/_checked_item.html.erb +3 -3
- data/app/views/checked_items/_checkout.html.erb +3 -3
- data/app/views/checked_items/_list.html.erb +3 -3
- data/app/views/checked_items/edit.html.erb +1 -1
- data/app/views/checked_items/index.html.erb +1 -1
- data/app/views/checked_items/new.html.erb +3 -3
- data/app/views/checked_items/show.html.erb +1 -1
- data/app/views/checkins/_checkin.html.erb +3 -3
- data/app/views/checkins/_form.html.erb +1 -1
- data/app/views/checkins/_list.html.erb +2 -2
- data/app/views/checkins/edit.html.erb +1 -1
- data/app/views/checkins/index.html.erb +2 -2
- data/app/views/checkins/new.html.erb +3 -3
- data/app/views/checkins/show.html.erb +1 -1
- data/app/views/checkout_types/_form.html.erb +2 -2
- data/app/views/checkout_types/edit.html.erb +1 -1
- data/app/views/checkout_types/index.html.erb +4 -4
- data/app/views/checkout_types/new.html.erb +1 -1
- data/app/views/checkout_types/show.html.erb +2 -2
- data/app/views/checkouts/_index.html.erb +7 -7
- data/app/views/checkouts/_index_item.html.erb +5 -5
- data/app/views/checkouts/_index_overdue.html.erb +7 -7
- data/app/views/checkouts/_index_user.html.erb +13 -13
- data/app/views/checkouts/_list.html.erb +5 -5
- data/app/views/checkouts/_reserved_facet.html.erb +2 -2
- data/app/views/checkouts/edit.html.erb +8 -8
- data/app/views/checkouts/index.atom.builder +3 -3
- data/app/views/checkouts/index.html.erb +3 -3
- data/app/views/checkouts/index.rss.builder +9 -9
- data/app/views/checkouts/index.txt.erb +4 -0
- data/app/views/checkouts/new.html.erb +2 -2
- data/app/views/checkouts/show.html.erb +7 -7
- data/app/views/circulation_statuses/_form.html.erb +2 -2
- data/app/views/circulation_statuses/edit.html.erb +1 -1
- data/app/views/circulation_statuses/index.html.erb +3 -3
- data/app/views/circulation_statuses/new.html.erb +1 -1
- data/app/views/circulation_statuses/show.html.erb +1 -1
- data/app/views/item_has_use_restrictions/edit.html.erb +1 -1
- data/app/views/item_has_use_restrictions/index.html.erb +4 -4
- data/app/views/item_has_use_restrictions/new.html.erb +2 -2
- data/app/views/item_has_use_restrictions/show.html.erb +1 -1
- data/app/views/lending_policies/_form.html.erb +1 -1
- data/app/views/lending_policies/edit.html.erb +1 -1
- data/app/views/lending_policies/index.html.erb +2 -2
- data/app/views/lending_policies/new.html.erb +1 -1
- data/app/views/lending_policies/show.html.erb +2 -2
- data/app/views/manifestation_checkout_stats/_form.html.erb +1 -1
- data/app/views/manifestation_checkout_stats/edit.html.erb +1 -1
- data/app/views/manifestation_checkout_stats/index.html.erb +3 -4
- data/app/views/manifestation_checkout_stats/new.html.erb +1 -1
- data/app/views/manifestation_checkout_stats/show.html.erb +3 -4
- data/app/views/manifestation_checkout_stats/show.txt.erb +4 -0
- data/app/views/manifestation_reserve_stats/_form.html.erb +1 -1
- data/app/views/manifestation_reserve_stats/edit.html.erb +1 -1
- data/app/views/manifestation_reserve_stats/index.html.erb +3 -4
- data/app/views/manifestation_reserve_stats/new.html.erb +1 -1
- data/app/views/manifestation_reserve_stats/show.html.erb +3 -4
- data/app/views/manifestation_reserve_stats/show.txt.erb +4 -0
- data/app/views/my_accounts/_feed_token.html.erb +3 -3
- data/app/views/reserves/_form.html.erb +1 -1
- data/app/views/reserves/_new.html.erb +9 -9
- data/app/views/reserves/_new_user.html.erb +13 -13
- data/app/views/reserves/_state_facet.html.erb +2 -2
- data/app/views/reserves/_title.html.erb +1 -1
- data/app/views/reserves/edit.html.erb +7 -7
- data/app/views/reserves/index.atom.builder +3 -3
- data/app/views/reserves/index.html.erb +26 -26
- data/app/views/reserves/index.rss.builder +10 -10
- data/app/views/reserves/index.txt.erb +4 -0
- data/app/views/reserves/show.html.erb +9 -9
- data/app/views/use_restrictions/_form.html.erb +2 -2
- data/app/views/use_restrictions/edit.html.erb +1 -1
- data/app/views/use_restrictions/index.html.erb +3 -3
- data/app/views/use_restrictions/new.html.erb +1 -1
- data/app/views/use_restrictions/show.html.erb +1 -1
- data/app/views/user_checkout_stats/_form.html.erb +1 -1
- data/app/views/user_checkout_stats/edit.html.erb +1 -1
- data/app/views/user_checkout_stats/index.html.erb +3 -4
- data/app/views/user_checkout_stats/new.html.erb +1 -1
- data/app/views/user_checkout_stats/show.html.erb +3 -4
- data/app/views/user_checkout_stats/show.txt.erb +4 -0
- data/app/views/user_group_has_checkout_types/edit.html.erb +7 -7
- data/app/views/user_group_has_checkout_types/index.html.erb +3 -3
- data/app/views/user_group_has_checkout_types/new.html.erb +9 -9
- data/app/views/user_group_has_checkout_types/show.html.erb +1 -1
- data/app/views/user_groups/_checkout_form.html.erb +6 -6
- data/app/views/user_reserve_stats/_form.html.erb +1 -1
- data/app/views/user_reserve_stats/edit.html.erb +1 -1
- data/app/views/user_reserve_stats/index.html.erb +3 -4
- data/app/views/user_reserve_stats/new.html.erb +1 -1
- data/app/views/user_reserve_stats/show.html.erb +3 -4
- data/app/views/user_reserve_stats/show.txt.erb +4 -0
- data/app/views/users/_feed_token.html.erb +3 -3
- data/config/initializers/inflections.rb +3 -0
- data/config/locales/translation_en.yml +6 -0
- data/config/locales/translation_ja.yml +6 -0
- data/config/routes.rb +8 -10
- data/db/migrate/035_create_reserves.rb +0 -1
- data/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +0 -1
- data/db/migrate/20081215094302_create_user_checkout_stats.rb +0 -1
- data/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +0 -1
- data/db/migrate/20081220023628_create_user_reserve_stats.rb +0 -1
- data/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +0 -4
- data/db/migrate/20140518050147_create_reserve_transitions.rb +14 -0
- data/db/migrate/20140810061942_add_user_id_to_user_checkout_stat.rb +12 -0
- data/db/migrate/20140810091231_add_checkout_icalendar_token_to_profile.rb +6 -0
- data/db/migrate/20140810091417_add_save_checkout_history_to_profile.rb +5 -0
- data/lib/enju_circulation/engine.rb +0 -4
- data/lib/enju_circulation/item.rb +4 -4
- data/lib/enju_circulation/manifestation.rb +2 -2
- data/lib/enju_circulation/profile.rb +26 -0
- data/lib/enju_circulation/user.rb +1 -1
- data/lib/enju_circulation/version.rb +1 -1
- data/lib/enju_circulation.rb +2 -0
- data/lib/generators/enju_circulation/setup/setup_generator.rb +2 -0
- data/lib/generators/enju_circulation/setup/templates/db/fixtures/circulation_statuses.yml +48 -25
- data/lib/generators/enju_circulation/setup/templates/db/fixtures/use_restrictions.yml +39 -13
- data/lib/tasks/circulation_status.rb +6 -0
- data/lib/tasks/enju_circulation_tasks.rake +14 -0
- data/lib/tasks/reserve.rb +5 -0
- data/lib/tasks/use_restriction.rb +6 -0
- data/spec/controllers/carrier_type_has_checkout_types_controller_spec.rb +21 -21
- data/spec/controllers/checkins_controller_spec.rb +22 -22
- data/spec/controllers/checkout_types_controller_spec.rb +21 -21
- data/spec/controllers/checkouts_controller_spec.rb +14 -14
- data/spec/controllers/circulation_statuses_controller_spec.rb +21 -21
- data/spec/controllers/item_has_use_restrictions_controller_spec.rb +21 -21
- data/spec/controllers/lending_policies_controller_spec.rb +21 -21
- data/spec/controllers/manifestation_checkout_stats_controller_spec.rb +21 -21
- data/spec/controllers/manifestation_reserve_stats_controller_spec.rb +21 -21
- data/spec/controllers/reserves_controller_spec.rb +32 -32
- data/spec/controllers/use_restrictions_controller_spec.rb +21 -21
- data/spec/controllers/user_checkout_stats_controller_spec.rb +21 -21
- data/spec/controllers/user_group_has_checkout_types_controller_spec.rb +21 -21
- data/spec/controllers/user_reserve_stats_controller_spec.rb +21 -21
- data/spec/dummy/app/models/user.rb +2 -46
- data/spec/dummy/config/environments/test.rb +2 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/001_create_agents.rb +0 -8
- data/spec/dummy/db/migrate/005_create_manifestations.rb +7 -12
- data/spec/dummy/db/migrate/006_create_items.rb +0 -6
- data/spec/dummy/db/migrate/112_create_frequencies.rb +12 -0
- data/spec/dummy/db/migrate/117_create_form_of_works.rb +12 -0
- data/spec/dummy/db/migrate/154_create_messages.rb +0 -1
- data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +0 -2
- data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +20 -0
- data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +20 -0
- data/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb +15 -0
- data/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +15 -0
- data/spec/dummy/db/migrate/20090719201843_create_extents.rb +12 -0
- data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +12 -0
- data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +12 -0
- data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +12 -0
- data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +14 -0
- data/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +15 -0
- data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +12 -0
- data/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +9 -0
- data/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb +11 -0
- data/spec/dummy/db/migrate/20111201155456_devise_create_users.rb +42 -0
- data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +6 -0
- data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +6 -0
- data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +6 -0
- data/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +6 -0
- data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +16 -0
- data/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +7 -0
- data/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +5 -0
- data/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +6 -0
- data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +20 -0
- data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb +11 -0
- data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +8 -0
- data/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb +6 -0
- data/spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb +5 -0
- data/spec/dummy/db/schema.rb +315 -56
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/conf/admin-extra.html +31 -0
- data/spec/dummy/solr/conf/elevate.xml +36 -0
- data/spec/dummy/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/spec/dummy/solr/conf/protwords.txt +21 -0
- data/spec/dummy/solr/conf/schema.xml +255 -0
- data/spec/dummy/solr/conf/scripts.conf +24 -0
- data/spec/dummy/solr/conf/solrconfig.xml +667 -0
- data/spec/dummy/solr/conf/spellings.txt +2 -0
- data/spec/dummy/solr/conf/stopwords.txt +58 -0
- data/spec/dummy/solr/conf/synonyms.txt +31 -0
- data/spec/dummy/solr/default/data/index/_7f0.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_7f0.fdx +0 -0
- data/spec/dummy/solr/default/data/index/_7f0.fnm +0 -0
- data/spec/dummy/solr/default/data/index/_7f0.nvd +0 -0
- data/spec/dummy/solr/default/data/index/_7f0.nvm +0 -0
- data/spec/dummy/solr/default/data/index/_7f0.si +0 -0
- data/spec/dummy/solr/default/data/index/_7f0_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/default/data/index/_7f0_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/default/data/index/_7f0_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/default/data/index/_7f0_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/default/data/index/segments.gen +0 -0
- data/spec/dummy/solr/default/data/index/segments_bvw +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000015394 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000015395 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000015396 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000015397 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000015398 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000015399 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000015400 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000015401 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000015402 +0 -0
- data/spec/dummy/solr/development/data/index/segments.gen +0 -0
- data/spec/dummy/solr/development/data/index/segments_1 +0 -0
- data/spec/dummy/solr/solr.xml +8 -0
- data/spec/dummy/solr/test/data/index/segments.gen +0 -0
- data/spec/dummy/solr/test/data/index/segments_1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0007f9aec08cc2727b3d00cd62cf1d0f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0440b81b0aae840cf287a686585a8cec +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0e3e358e4fe4601ba5e435f6d0c86f12 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/129cec5384c0f26fcfb0ce65048298c5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1572dfd6f1e555f4be1aa60ddc3cb0c0 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/181c975b1296d7ebe81714d5e64bc098 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1c1fbab93e4552626da626e0dbe70c74 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1e58a07a3701da9fb9c176d67162af2b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2b35ad8fee7e1228e205669278e2adda +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2f09f58943a88f21e3a0318621391785 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2ffe508d0533d0afd2a37bb574eda40d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3753d928863ee65118b9f2da1c6e504d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/40e90f0c329b14292a9ff1a2fe907b39 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/45f3c74e1e31b58d9bda6908d5623290 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/49a3464eb6bcffb3d9f5b47b133edabb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/49d32c13d390c1b80d8b2705aac86579 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4aa18096a209e515f5f1df487622cdf4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/50e64f45f0cb4cee52fd3f3908f89a82 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/51f7d34a9e9bebb47b7201cfebfec34d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5995180d1cfd7cad71ec6d9e1a538f0e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/604e0e4b3c01d488d6fb087e9fdaeb94 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6401fc09d2b894df2ad251b007df145a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/65a8d4d288e5f082f0166aa7be7a2464 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6f5d66df18892df6af39c9cfd784f0f5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6fcdd2234a7c25f9d4179ca12fd9f7b4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6fdb4513af157010ef79b56df44d665e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/750439d8043ed022910956fbb55faa65 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/811e5198d0dc4efe02d28c0c2215e207 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/83ea20e0b25e77f5dce5bf733b088292 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/9604073a83f822f13caaabd7e157bbbb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/98d02556564ee10aef4c3397bb94d5b9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/9cfe4d48f5258863dbfb3623c797fb15 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a296264dcc89e1f8ab6382e678ffbe38 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/aa2e1ada35daa496bb08e85fcb817536 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/abee2d4cb18d15789dcdc9c680f3e6de +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c1ab0ecf3cf57db41d9e4cd9306d8829 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c4a984c6feb506f3e1f9120a8d029bda +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ccdcb26ebc6ef3b684368b368edf4f99 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d34b5413caa9407126db68d5d590804a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d4ac74c17332ad931b72f42d7997fcc0 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/dd672deb061233e0db1d2f413d27213f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e1fcfb0faa3c12467a1c35251e04c8b1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e2d21478696ac96ad895f7c3b8d31594 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e577e9ce00153ad2e59111f761d0fb15 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e9738177de2083b68d42e053a1529244 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e9ce2df3f0160329df69b22a911dbd04 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f2e83d3b5fe984832bfeff09b0e3b8d2 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f90eee17e0e5eaea50e6064ded54617c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/fa8e81ce1d45228121b9df5618542190 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/fbdc1d9347cb228f06807b76c6c2974e +0 -0
- data/spec/dummy/tmp/cache/stdout +1262 -0
- data/spec/dummy/tmp/pids/redis-test.pid +1 -0
- data/spec/factories/profile.rb +9 -0
- data/spec/factories/reserve.rb +7 -1
- data/spec/factories/user.rb +3 -9
- data/spec/fixtures/agents.yml +0 -12
- data/spec/fixtures/checkouts.yml +12 -1
- data/spec/fixtures/items.yml +48 -25
- data/spec/fixtures/manifestation_checkout_stats.yml +3 -4
- data/spec/fixtures/manifestation_reserve_stats.yml +3 -4
- data/spec/fixtures/message_requests.yml +0 -3
- data/spec/fixtures/message_templates.yml +41 -20
- data/spec/fixtures/profiles.yml +83 -0
- data/spec/fixtures/reserve_transitions.yml +88 -0
- data/spec/fixtures/reserves.yml +1 -18
- data/spec/fixtures/user_checkout_stats.yml +3 -4
- data/spec/fixtures/user_groups.yml +3 -3
- data/spec/fixtures/user_reserve_stats.yml +3 -4
- data/spec/fixtures/users.yml +0 -55
- data/spec/models/checked_item_spec.rb +2 -1
- data/spec/models/checkout_spec.rb +0 -1
- data/spec/models/manifestation_checkout_stat_spec.rb +4 -2
- data/spec/models/manifestation_reserve_stat_spec.rb +4 -2
- data/spec/models/reserve_spec.rb +9 -11
- data/spec/models/user_checkout_stat_spec.rb +4 -2
- data/spec/models/user_reserve_stat_spec.rb +4 -2
- data/spec/support/resque.rb +25 -22
- metadata +325 -92
- data/app/controllers/checkout_stat_has_manifestations_controller.rb +0 -81
- data/app/controllers/checkout_stat_has_users_controller.rb +0 -81
- data/app/controllers/reserve_stat_has_manifestations_controller.rb +0 -81
- data/app/controllers/reserve_stat_has_users_controller.rb +0 -81
- data/app/models/circulation_sweeper.rb +0 -24
- data/app/views/checkout_stat_has_manifestations/_form.html.erb +0 -15
- data/app/views/checkout_stat_has_manifestations/edit.html.erb +0 -13
- data/app/views/checkout_stat_has_manifestations/index.html.erb +0 -33
- data/app/views/checkout_stat_has_manifestations/new.html.erb +0 -12
- data/app/views/checkout_stat_has_manifestations/show.html.erb +0 -28
- data/app/views/checkout_stat_has_users/_form.html.erb +0 -15
- data/app/views/checkout_stat_has_users/edit.html.erb +0 -13
- data/app/views/checkout_stat_has_users/index.html.erb +0 -33
- data/app/views/checkout_stat_has_users/new.html.erb +0 -12
- data/app/views/checkout_stat_has_users/show.html.erb +0 -28
- data/app/views/checkouts/index.csv.erb +0 -4
- data/app/views/manifestation_checkout_stats/show.csv.erb +0 -4
- data/app/views/manifestation_reserve_stats/show.csv.erb +0 -4
- data/app/views/reserve_stat_has_manifestations/_form.html.erb +0 -15
- data/app/views/reserve_stat_has_manifestations/edit.html.erb +0 -13
- data/app/views/reserve_stat_has_manifestations/index.html.erb +0 -33
- data/app/views/reserve_stat_has_manifestations/new.html.erb +0 -12
- data/app/views/reserve_stat_has_manifestations/show.html.erb +0 -28
- data/app/views/reserve_stat_has_users/_form.html.erb +0 -15
- data/app/views/reserve_stat_has_users/edit.html.erb +0 -13
- data/app/views/reserve_stat_has_users/index.html.erb +0 -33
- data/app/views/reserve_stat_has_users/new.html.erb +0 -12
- data/app/views/reserve_stat_has_users/show.html.erb +0 -28
- data/app/views/reserves/index.csv.erb +0 -4
- data/app/views/user_checkout_stats/show.csv.erb +0 -4
- data/app/views/user_reserve_stats/show.csv.erb +0 -4
- data/db/fixtures/carrier_type_has_checkout_types.yml +0 -8
- data/db/fixtures/checkout_types.yml +0 -22
- data/db/fixtures/circulation_statuses.yml +0 -92
- data/db/fixtures/use_restrictions.yml +0 -79
- data/db/migrate/20130303104849_add_state_index_to_reserve.rb +0 -5
- data/spec/controllers/checkout_stat_has_manifestations_controller_spec.rb +0 -441
- data/spec/controllers/checkout_stat_has_users_controller_spec.rb +0 -441
- data/spec/controllers/reserve_stat_has_manifestations_controller_spec.rb +0 -441
- data/spec/controllers/reserve_stat_has_users_controller_spec.rb +0 -441
- data/spec/dummy/app/mailers/notifier.rb +0 -29
- data/spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb +0 -13
- data/spec/dummy/db/migrate/20111201155456_create_users.rb +0 -16
- data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +0 -44
@@ -2,15 +2,15 @@ class UseRestriction < ActiveRecord::Base
|
|
2
2
|
attr_accessible :name, :display_name, :note
|
3
3
|
#include MasterModel
|
4
4
|
acts_as_list
|
5
|
-
validates :name, :
|
6
|
-
validates :display_name, :
|
7
|
-
before_validation :set_display_name, :
|
5
|
+
validates :name, presence: true, format: {with: /\A[0-9A-Za-z][0-9A-Za-z_\-\s,]*[0-9a-z]\Z/}
|
6
|
+
validates :display_name, presence: true
|
7
|
+
before_validation :set_display_name, on: :create
|
8
8
|
normalize_attributes :name
|
9
9
|
|
10
10
|
default_scope {order('use_restrictions.position')}
|
11
|
-
scope :available, -> {where(:
|
11
|
+
scope :available, -> {where(name: ['Not For Loan', 'Limited Circulation, Normal Loan Period'])}
|
12
12
|
has_many :item_has_use_restrictions
|
13
|
-
has_many :items, :
|
13
|
+
has_many :items, through: :item_has_use_restrictions
|
14
14
|
|
15
15
|
def set_display_name
|
16
16
|
self.display_name = "#{I18n.locale}: #{name}" if display_name.blank?
|
@@ -5,7 +5,8 @@ class UserCheckoutStat < ActiveRecord::Base
|
|
5
5
|
default_scope {order('user_checkout_stats.id DESC')}
|
6
6
|
scope :not_calculated, -> {in_state(:pending)}
|
7
7
|
has_many :checkout_stat_has_users
|
8
|
-
has_many :users, :
|
8
|
+
has_many :users, through: :checkout_stat_has_users
|
9
|
+
belongs_to :user
|
9
10
|
|
10
11
|
paginates_per 10
|
11
12
|
attr_accessor :mode
|
@@ -33,6 +34,7 @@ class UserCheckoutStat < ActiveRecord::Base
|
|
33
34
|
end
|
34
35
|
self.completed_at = Time.zone.now
|
35
36
|
transition_to!(:completed)
|
37
|
+
send_message
|
36
38
|
end
|
37
39
|
|
38
40
|
private
|
@@ -49,10 +51,9 @@ end
|
|
49
51
|
# start_date :datetime
|
50
52
|
# end_date :datetime
|
51
53
|
# note :text
|
52
|
-
# state :string(255)
|
53
54
|
# created_at :datetime not null
|
54
55
|
# updated_at :datetime not null
|
55
56
|
# started_at :datetime
|
56
57
|
# completed_at :datetime
|
58
|
+
# user_id :integer
|
57
59
|
#
|
58
|
-
|
@@ -5,3 +5,16 @@ class UserCheckoutStatTransition < ActiveRecord::Base
|
|
5
5
|
belongs_to :user_checkout_stat, inverse_of: :user_checkout_stat_transitions
|
6
6
|
attr_accessible :to_state, :sort_key, :metadata
|
7
7
|
end
|
8
|
+
|
9
|
+
# == Schema Information
|
10
|
+
#
|
11
|
+
# Table name: user_checkout_stat_transitions
|
12
|
+
#
|
13
|
+
# id :integer not null, primary key
|
14
|
+
# to_state :string(255)
|
15
|
+
# metadata :text default("{}")
|
16
|
+
# sort_key :integer
|
17
|
+
# user_checkout_stat_id :integer
|
18
|
+
# created_at :datetime not null
|
19
|
+
# updated_at :datetime not null
|
20
|
+
#
|
@@ -5,22 +5,22 @@ class UserGroupHasCheckoutType < ActiveRecord::Base
|
|
5
5
|
:set_due_date_before_closing_day, :fixed_due_date, :note, :position,
|
6
6
|
:user_group, :checkout_type
|
7
7
|
scope :available_for_item, lambda{|item| where(:checkout_type_id => item.checkout_type.id)}
|
8
|
-
scope :available_for_carrier_type, lambda{|carrier_type| {:include => {:checkout_type => :carrier_types}, :
|
8
|
+
scope :available_for_carrier_type, lambda{|carrier_type| {:include => {:checkout_type => :carrier_types}, conditions: ['carrier_types.id = ?', carrier_type.id]}}
|
9
9
|
|
10
|
-
belongs_to :user_group, :
|
11
|
-
belongs_to :checkout_type, :
|
10
|
+
belongs_to :user_group, validate: true
|
11
|
+
belongs_to :checkout_type, validate: true
|
12
12
|
|
13
13
|
validates_presence_of :user_group, :checkout_type
|
14
14
|
validates_associated :user_group, :checkout_type
|
15
|
-
validates_uniqueness_of :checkout_type_id, :
|
15
|
+
validates_uniqueness_of :checkout_type_id, scope: :user_group_id
|
16
16
|
after_create :create_lending_policy
|
17
17
|
after_update :update_lending_policy
|
18
18
|
|
19
|
-
acts_as_list :
|
19
|
+
acts_as_list scope: :user_group_id
|
20
20
|
|
21
21
|
def create_lending_policy
|
22
22
|
self.checkout_type.items.find_each do |item|
|
23
|
-
policy = LendingPolicy.where(:
|
23
|
+
policy = LendingPolicy.where(item_id: item.id, :user_group_id => user_group_id).select(:id).first
|
24
24
|
unless policy
|
25
25
|
sql = ['INSERT INTO lending_policies (item_id, user_group_id, loan_period, renewal, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?)', item.id, user_group_id, checkout_period, checkout_renewal_limit, Time.zone.now, Time.zone.now]
|
26
26
|
ActiveRecord::Base.connection.execute(
|
@@ -42,9 +42,9 @@ class UserGroupHasCheckoutType < ActiveRecord::Base
|
|
42
42
|
def self.update_current_checkout_count
|
43
43
|
sql = [
|
44
44
|
'SELECT count(checkouts.id) as current_checkout_count,
|
45
|
-
|
45
|
+
profiles.user_group_id,
|
46
46
|
items.checkout_type_id
|
47
|
-
FROM checkouts LEFT OUTER JOIN items
|
47
|
+
FROM checkouts, profiles LEFT OUTER JOIN items
|
48
48
|
ON (checkouts.item_id = items.id)
|
49
49
|
LEFT OUTER JOIN users
|
50
50
|
ON (users.id = checkouts.user_id)
|
@@ -5,7 +5,8 @@ class UserReserveStat < ActiveRecord::Base
|
|
5
5
|
default_scope {order('user_reserve_stats.id DESC')}
|
6
6
|
scope :not_calculated, -> {in_state(:pending)}
|
7
7
|
has_many :reserve_stat_has_users
|
8
|
-
has_many :users, :
|
8
|
+
has_many :users, through: :reserve_stat_has_users
|
9
|
+
belongs_to :user
|
9
10
|
|
10
11
|
paginates_per 10
|
11
12
|
attr_accessor :mode
|
@@ -33,6 +34,7 @@ class UserReserveStat < ActiveRecord::Base
|
|
33
34
|
end
|
34
35
|
self.completed_at = Time.zone.now
|
35
36
|
transition_to!(:completed)
|
37
|
+
send_message
|
36
38
|
end
|
37
39
|
|
38
40
|
private
|
@@ -49,10 +51,9 @@ end
|
|
49
51
|
# start_date :datetime
|
50
52
|
# end_date :datetime
|
51
53
|
# note :text
|
52
|
-
# state :string(255)
|
53
54
|
# created_at :datetime not null
|
54
55
|
# updated_at :datetime not null
|
55
56
|
# started_at :datetime
|
56
57
|
# completed_at :datetime
|
58
|
+
# user_id :integer
|
57
59
|
#
|
58
|
-
|
@@ -5,3 +5,16 @@ class UserReserveStatTransition < ActiveRecord::Base
|
|
5
5
|
belongs_to :user_reserve_stat, inverse_of: :user_reserve_stat_transitions
|
6
6
|
attr_accessible :to_state, :sort_key, :metadata
|
7
7
|
end
|
8
|
+
|
9
|
+
# == Schema Information
|
10
|
+
#
|
11
|
+
# Table name: user_reserve_stat_transitions
|
12
|
+
#
|
13
|
+
# id :integer not null, primary key
|
14
|
+
# to_state :string(255)
|
15
|
+
# metadata :text default("{}")
|
16
|
+
# sort_key :integer
|
17
|
+
# user_reserve_stat_id :integer
|
18
|
+
# created_at :datetime not null
|
19
|
+
# updated_at :datetime not null
|
20
|
+
#
|
@@ -3,15 +3,15 @@
|
|
3
3
|
|
4
4
|
<div class="field">
|
5
5
|
<%= f.label t('activerecord.models.carrier_type') -%><br />
|
6
|
-
<%= f.select(:carrier_type_id, @carrier_types.collect{|m| [m.display_name.localize, m.id]}, :
|
6
|
+
<%= f.select(:carrier_type_id, @carrier_types.collect{|m| [m.display_name.localize, m.id]}, include_blank: true) -%>
|
7
7
|
</div>
|
8
8
|
<div class="field">
|
9
9
|
<%= f.label t('activerecord.models.checkout_type') -%><br />
|
10
|
-
<%= f.select(:checkout_type_id, @checkout_types.collect{|c| [c.display_name.localize, c.id]}, :
|
10
|
+
<%= f.select(:checkout_type_id, @checkout_types.collect{|c| [c.display_name.localize, c.id]}, include_blank: true) -%>
|
11
11
|
</div>
|
12
12
|
<div class="field">
|
13
13
|
<%= f.label :note -%><br />
|
14
|
-
<%= f.text_area :note, :
|
14
|
+
<%= f.text_area :note, class: 'resource_textarea' -%>
|
15
15
|
</div>
|
16
16
|
<div class="actions">
|
17
17
|
<%= f.submit %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
-
<h1 class="title"><%= t('page.editing', :
|
2
|
+
<h1 class="title"><%= t('page.editing', model: t('activerecord.models.carrier_type_has_checkout_type')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<%= render 'form' %>
|
5
5
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
-
<h1 class="title"><%= t('page.listing', :
|
2
|
+
<h1 class="title"><%= t('page.listing', model: t('activerecord.models.carrier_type_has_checkout_type')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
|
5
5
|
<table class="table table-striped index">
|
@@ -21,7 +21,7 @@
|
|
21
21
|
<%= link_to t('page.edit'), edit_carrier_type_has_checkout_type_path(carrier_type_has_checkout_type) -%>
|
22
22
|
<% end %>
|
23
23
|
<%- if can? :delete, carrier_type_has_checkout_type -%>
|
24
|
-
<%= link_to t('page.destroy'), carrier_type_has_checkout_type, :
|
24
|
+
<%= link_to t('page.destroy'), carrier_type_has_checkout_type, data: {confirm: t('page.are_you_sure')}, method: :delete -%>
|
25
25
|
<% end %>
|
26
26
|
</td>
|
27
27
|
</tr>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
<div id="submenu" class="ui-corner-all ui-widget-content">
|
35
35
|
<ul>
|
36
36
|
<%- if can? :create, CarrierTypeHasCheckoutType -%>
|
37
|
-
<li><%= link_to t('page.new', :
|
37
|
+
<li><%= link_to t('page.new', model: t('activerecord.models.carrier_type_has_checkout_type')), new_carrier_type_has_checkout_type_path -%></li>
|
38
38
|
<% end %>
|
39
39
|
</ul>
|
40
40
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
-
<h1 class="title"><%= t('page.new', :
|
2
|
+
<h1 class="title"><%= t('page.new', model: t('activerecord.models.carrier_type_has_checkout_type')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<%= render 'form' %>
|
5
5
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
-
<h1 class="title"><%= t('page.showing', :
|
2
|
+
<h1 class="title"><%= t('page.showing', model: t('activerecord.models.carrier_type_has_checkout_type')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<p id="notice"><%= notice %></p>
|
5
5
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<%= f.fields_for :carrier_type_has_checkout_types do |checkout_form| %>
|
4
4
|
<%= checkout_form.label :checkout_type_id -%>
|
5
5
|
<%= checkout_form.select(:checkout_type_id, @checkout_types.collect{|c| [c.display_name.localize, c.id]}) %>
|
6
|
-
<%= checkout_form.link_to_remove t('page.remove'), :
|
6
|
+
<%= checkout_form.link_to_remove t('page.remove'), confirm: t('page.are_you_sure') %>
|
7
7
|
<% end %>
|
8
8
|
<p><%= f.link_to_add t('page.add'), :carrier_type_has_checkout_types %></p>
|
9
9
|
</div>
|
@@ -9,11 +9,11 @@
|
|
9
9
|
<%- @checked_items.each_with_index do |checked_item, i| -%>
|
10
10
|
<tr class="line<%= cycle("0", "1") -%>">
|
11
11
|
<td>
|
12
|
-
<%= render 'manifestations/show_index', :
|
12
|
+
<%= render 'manifestations/show_index', manifestation: checked_item.item.manifestation -%>
|
13
13
|
</td>
|
14
14
|
<td><%= link_to checked_item.item.item_identifier, checked_item.item -%></td>
|
15
|
-
<td><%= l(checked_item.due_date, :
|
16
|
-
<td><%= link_to t('page.destroy'), checked_item, :
|
15
|
+
<td><%= l(checked_item.due_date, format: :only_date) -%></td>
|
16
|
+
<td><%= link_to t('page.destroy'), checked_item, data: {confirm: t('page.are_you_sure')}, method: :delete -%></td>
|
17
17
|
</tr>
|
18
18
|
<%- end -%>
|
19
19
|
</table>
|
@@ -10,11 +10,11 @@
|
|
10
10
|
<%- @basket.user.checkouts.not_returned.each_with_index do |checkout, i| -%>
|
11
11
|
<tr class="line<%= cycle("0", "1") -%>">
|
12
12
|
<td>
|
13
|
-
<%= render 'manifestations/show_index', :
|
14
|
-
<%= render 'manifestations/holding', :
|
13
|
+
<%= render 'manifestations/show_index', manifestation: checkout.item.manifestation -%>
|
14
|
+
<%= render 'manifestations/holding', manifestation: checkout.item.manifestation -%>
|
15
15
|
</td>
|
16
16
|
<td><%= link_to checkout.item.item_identifier, checkout.item -%></td>
|
17
|
-
<td><%= l(checkout.due_date, :
|
17
|
+
<td><%= l(checkout.due_date, format: :only_date) -%></td>
|
18
18
|
</tr>
|
19
19
|
<%- end -%>
|
20
20
|
</table>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
<div style="color: red"><%= flash[:message] -%></div>
|
2
2
|
|
3
3
|
<div class="search_form">
|
4
|
-
<%= form_for :checked_item, :
|
4
|
+
<%= form_for :checked_item, html: {method: :post}, url: basket_checked_items_path(@basket), remote: true do |f| -%>
|
5
5
|
<%= f.error_messages -%>
|
6
6
|
<p>
|
7
7
|
<%= f.label :item_identifier, t('activerecord.attributes.item.item_identifier') -%>: <%= f.search_field :item_identifier -%>
|
8
8
|
<%= f.submit t('page.read'), 'data-disable-with' => t('page.saving') -%><br />
|
9
9
|
<%= f.label :due_date %>
|
10
|
-
<%= f.text_field :due_date_string, :
|
10
|
+
<%= f.text_field :due_date_string, class: 'datepicker' %>
|
11
11
|
<%= t('checked_item.ignore_restriction') -%>: <%= f.check_box :ignore_restriction -%>
|
12
12
|
</p>
|
13
13
|
<%- end -%>
|
@@ -22,7 +22,7 @@ $(document).ready(function(){
|
|
22
22
|
|
23
23
|
<%= render 'checked_item' %>
|
24
24
|
|
25
|
-
<%= form_for(:basket, :
|
25
|
+
<%= form_for(:basket, url: {controller: 'baskets', action: 'update', id: @basket.id}, html: { method: :put }) do |f| -%>
|
26
26
|
<div>
|
27
27
|
<%= f.submit t('checked_item.checkout'), 'data-disable-with' => t('page.saving') -%>
|
28
28
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
-
<h1 class="title"><%= t('page.listing', :
|
2
|
+
<h1 class="title"><%= t('page.listing', model: t('activerecord.models.checked_item')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<%= render 'checked_item' %>
|
5
5
|
<%= paginate @checked_items %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
-
<h1 class="title"><%= t('page.new', :
|
2
|
+
<h1 class="title"><%= t('page.new', model: t('activerecord.models.checked_item')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
|
5
5
|
<div id="checked_item_list">
|
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
<div id="submenu" class="ui-corner-all ui-widget-content">
|
14
14
|
<ul>
|
15
|
-
<li><%= link_to @basket.user.username, @basket.user -%></li>
|
15
|
+
<li><%= link_to @basket.user.username, @basket.user.profile -%></li>
|
16
16
|
</ul>
|
17
17
|
<ul>
|
18
18
|
<%- @basket.user.user_group.user_group_has_checkout_types.each do |available_checkout_type| -%>
|
@@ -24,6 +24,6 @@
|
|
24
24
|
</ul>
|
25
25
|
<ul>
|
26
26
|
<li><%= link_to t('activerecord.models.checkin'), checkins_path -%></li>
|
27
|
-
<li><%= link_to t('activerecord.models.reserve'),
|
27
|
+
<li><%= link_to t('activerecord.models.reserve'), reserves_path(user_id: @basket.user.username) -%></li>
|
28
28
|
</ul>
|
29
29
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
-
<h1 class="title"><%= t('page.showing', :
|
2
|
+
<h1 class="title"><%= t('page.showing', model: t('activerecord.models.checked_item')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<p id="notice"><%= notice %></p>
|
5
5
|
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<%- @checkins.each_with_index do |checkin, i| -%>
|
10
10
|
<tr class="line<%= cycle("0", "1") -%>">
|
11
11
|
<td>
|
12
|
-
<%= render 'manifestations/show_index', :
|
12
|
+
<%= render 'manifestations/show_index', manifestation: checkin.item.manifestation if checkin.item.try(:manifestation) -%>
|
13
13
|
</td>
|
14
14
|
<td>
|
15
15
|
<% if checkin.item %>
|
@@ -26,12 +26,12 @@
|
|
26
26
|
</td>
|
27
27
|
<td>
|
28
28
|
<%- if checkin.checkout -%>
|
29
|
-
<%= l(checkin.checkout.due_date, :
|
29
|
+
<%= l(checkin.checkout.due_date, format: :only_date) -%>
|
30
30
|
<%- end -%>
|
31
31
|
</td>
|
32
32
|
<td>
|
33
33
|
<% if checkin.checkout.try(:user) %>
|
34
|
-
<%= link_to checkin.checkout.user.username, checkin.checkout.user -%>
|
34
|
+
<%= link_to checkin.checkout.user.username, checkin.checkout.user.profile -%>
|
35
35
|
<% end %>
|
36
36
|
</td>
|
37
37
|
</tr>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<div style="color: red"><%= flash[:message] -%></div>
|
2
2
|
|
3
3
|
<div class="search_form">
|
4
|
-
<%= form_for :checkin, :
|
4
|
+
<%= form_for :checkin, html: {method: :post}, url: basket_checkins_path(@basket), remote: true do |f| -%>
|
5
5
|
<%= f.error_messages %>
|
6
6
|
<p>
|
7
7
|
<%= label_tag :item_identifier, t('activerecord.attributes.item.item_identifier') -%>:
|
8
|
-
<%= f.search_field :item_identifier, :
|
8
|
+
<%= f.search_field :item_identifier, class: 'resource_item_identifier' -%>
|
9
9
|
<%= f.submit t('checkin.checkin'), 'data-disable-with' => t('page.saving') -%>
|
10
10
|
</p>
|
11
11
|
<%- end -%>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
-
<h1 class="title"><%= t('page.editing', :
|
2
|
+
<h1 class="title"><%= t('page.editing', model: t('activerecord.models.checkin')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<%= render 'form' %>
|
5
5
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
-
<h1 class="title"><%= t('page.listing', :
|
2
|
+
<h1 class="title"><%= t('page.listing', model: t('activerecord.models.checkin')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<%= render 'checkin' %>
|
5
5
|
<%= paginate @checkins %>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
<div id="submenu" class="ui-corner-all ui-widget-content">
|
10
10
|
<ul>
|
11
|
-
<li><%= link_to t('page.new', :
|
11
|
+
<li><%= link_to t('page.new', model: t('activerecord.models.checkin')), new_checkin_path -%></li>
|
12
12
|
<li><%= link_to t('activerecord.models.checkout'), new_basket_path -%></li>
|
13
13
|
</ul>
|
14
14
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
-
<h1 class="title"><%= t('page.new', :
|
2
|
+
<h1 class="title"><%= t('page.new', model: t('activerecord.models.checkin')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<div id="checkin_list">
|
5
5
|
<p id="notice"><%= notice %></p>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
<div id="submenu" class="ui-corner-all ui-widget-content">
|
12
12
|
<ul>
|
13
|
-
<li><%= link_to t('page.new', :
|
14
|
-
<li><%= link_to t('page.listing', :
|
13
|
+
<li><%= link_to t('page.new', model: t('activerecord.models.checkout')), new_basket_path -%></li>
|
14
|
+
<li><%= link_to t('page.listing', model: t('activerecord.models.checkin')), checkins_path -%></li>
|
15
15
|
</ul>
|
16
16
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
-
<h1 class="title"><%= t('page.showing', :
|
2
|
+
<h1 class="title"><%= t('page.showing', model: t('activerecord.models.checkin')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<p id="notice"><%= notice %></p>
|
5
5
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
-
<h1 class="title"><%= t('page.editing', :
|
2
|
+
<h1 class="title"><%= t('page.editing', model: t('activerecord.models.checkout_type')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<%= render 'form' %>
|
5
5
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
-
<h1 class="title"><%= t('page.listing', :
|
2
|
+
<h1 class="title"><%= t('page.listing', model: t('activerecord.models.checkout_type')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
|
5
5
|
<table class="table table-striped index">
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<%= link_to t('page.edit'), edit_checkout_type_path(checkout_type) -%>
|
27
27
|
<% end %>
|
28
28
|
<%- if can? :delete, checkout_type -%>
|
29
|
-
<%= link_to t('page.destroy'), checkout_type, :
|
29
|
+
<%= link_to t('page.destroy'), checkout_type, data: {confirm: t('page.are_you_sure')}, method: :delete -%>
|
30
30
|
<% end %>
|
31
31
|
</td>
|
32
32
|
</tr>
|
@@ -40,9 +40,9 @@
|
|
40
40
|
<div id="submenu" class="ui-corner-all ui-widget-content">
|
41
41
|
<ul>
|
42
42
|
<%- if @user_group -%>
|
43
|
-
<li><%= link_to t('page.new', :
|
43
|
+
<li><%= link_to t('page.new', model: t('activerecord.models.user_group_has_checkout_type')), new_user_group_user_group_has_checkout_type_path(@user_group) -%></li>
|
44
44
|
<%- else -%>
|
45
|
-
<li><%= link_to t('page.new', :
|
45
|
+
<li><%= link_to t('page.new', model: t('activerecord.models.checkout_type')), new_checkout_type_path -%></li>
|
46
46
|
<%- end -%>
|
47
47
|
</ul>
|
48
48
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
-
<h1 class="title"><%= t('page.new', :
|
2
|
+
<h1 class="title"><%= t('page.new', model: t('activerecord.models.checkout_type')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<%= render 'form' %>
|
5
5
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
-
<h1 class="title"><%= t('page.showing', :
|
2
|
+
<h1 class="title"><%= t('page.showing', model: t('activerecord.models.checkout_type')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<p id="notice"><%= notice %></p>
|
5
5
|
|
@@ -33,6 +33,6 @@
|
|
33
33
|
<ul>
|
34
34
|
<li><%= link_to t('page.edit'), edit_checkout_type_path(@checkout_type) -%></li>
|
35
35
|
<li><%= back_to_index(flash[:page_info]) -%></li>
|
36
|
-
<li><%= link_to t('page.new', :
|
36
|
+
<li><%= link_to t('page.new', model: t('activerecord.models.user_group_has_checkout_type')), new_checkout_type_user_group_has_checkout_type_path(@checkout_type) -%></li>
|
37
37
|
</ul>
|
38
38
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
-
<h1 class="title"><%= t('page.listing', :
|
2
|
+
<h1 class="title"><%= t('page.listing', model: t('activerecord.models.checkout')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<p id="notice"><%= notice %></p>
|
5
5
|
<%= render 'list' -%>
|
@@ -13,18 +13,18 @@
|
|
13
13
|
|
14
14
|
<div id="submenu" class="ui-corner-all ui-widget-content">
|
15
15
|
<ul>
|
16
|
-
<li><%= link_to t('checkout.my_checkout'),
|
17
|
-
<li><%= link_to t('page.overdue'), checkouts_path(:
|
16
|
+
<li><%= link_to t('checkout.my_checkout'), checkouts_path(user_id: current_user.username) -%></li>
|
17
|
+
<li><%= link_to t('page.overdue'), checkouts_path(view: 'overdue') -%></li>
|
18
18
|
</ul>
|
19
19
|
<%= render 'reserved_facet' %>
|
20
20
|
<ul>
|
21
21
|
<li>
|
22
|
-
<%= link_to 'RSS', checkouts_path(:
|
23
|
-
<%= link_to (image_tag 'icons/feed.png', :
|
22
|
+
<%= link_to 'RSS', checkouts_path(format: :rss) -%>
|
23
|
+
<%= link_to (image_tag 'icons/feed.png', size: '16x16', alt: 'RSS', class: 'icon'), checkouts_path(format: :rss) -%>
|
24
24
|
</li>
|
25
25
|
<li>
|
26
|
-
<%= link_to '
|
27
|
-
<%= link_to (image_tag 'icons/page_white_excel.png', :
|
26
|
+
<%= link_to 'TSV', checkouts_path(format: :txt, locale: @locale.to_s) -%>
|
27
|
+
<%= link_to (image_tag 'icons/page_white_excel.png', size: '16x16', alt: 'TSV', class: 'icon'), checkouts_path(format: :txt, locale: @locale.to_s) -%>
|
28
28
|
</li>
|
29
29
|
</ul>
|
30
30
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
-
<h1 class="title"><%= t('page.listing', :
|
2
|
+
<h1 class="title"><%= t('page.listing', model: t('activerecord.models.checkout')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<p id="notice"><%= notice %></p>
|
5
5
|
|
@@ -18,12 +18,12 @@
|
|
18
18
|
<div id="submenu" class="ui-corner-all ui-widget-content">
|
19
19
|
<ul>
|
20
20
|
<li>
|
21
|
-
<%= link_to 'RSS', item_checkouts_path(item, :
|
22
|
-
<%= link_to (image_tag 'icons/feed.png', :
|
21
|
+
<%= link_to 'RSS', item_checkouts_path(item, format: :rss) -%>
|
22
|
+
<%= link_to (image_tag 'icons/feed.png', size: '16x16', alt: 'RSS', class: 'icon'), item_checkouts_path(item, format: :rss) -%>
|
23
23
|
</li>
|
24
24
|
<li>
|
25
|
-
<%= link_to '
|
26
|
-
<%= link_to (image_tag 'icons/page_white_excel.png', :
|
25
|
+
<%= link_to 'TSV', item_checkouts_path(item, format: :txt, locale: @locale.to_s) -%>
|
26
|
+
<%= link_to (image_tag 'icons/page_white_excel.png', size: '16x16', alt: 'TSV', class: 'icon'), item_checkouts_path(item, format: :txt, locale: @locale.to_s) -%>
|
27
27
|
</li>
|
28
28
|
</ul>
|
29
29
|
</div>
|
@@ -2,10 +2,10 @@
|
|
2
2
|
<h1 class="title"><%= t('checkout.listing_overdue_item') -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
|
5
|
-
<%= form_for(:checkouts, :
|
5
|
+
<%= form_for(:checkouts, url: checkouts_path, html: {method: 'get'}) do -%>
|
6
6
|
<p>
|
7
7
|
<%= t('checkout.number_of_day_overdue') -%>:
|
8
|
-
<%= text_field_tag 'days_overdue', h(@days_overdue), :
|
8
|
+
<%= text_field_tag 'days_overdue', h(@days_overdue), class: 'resource_integer' -%>
|
9
9
|
<%= hidden_field_tag 'view', 'overdue' -%>
|
10
10
|
<%= submit_tag t('page.search') -%>
|
11
11
|
</p>
|
@@ -22,13 +22,13 @@
|
|
22
22
|
|
23
23
|
<div id="submenu" class="ui-corner-all ui-widget-content">
|
24
24
|
<ul>
|
25
|
-
<li><%= link_to t('page.back_to', :
|
25
|
+
<li><%= link_to t('page.back_to', model: t('activerecord.models.checkout')), checkouts_path -%></li>
|
26
26
|
</ul>
|
27
27
|
<%= render 'reserved_facet' %>
|
28
28
|
<p>
|
29
|
-
<%= link_to (image_tag 'icons/feed.png', :
|
30
|
-
(<%= link_to 'RSS', checkouts_path(:
|
31
|
-
<%= link_to (image_tag 'icons/page_white_excel.png', :
|
32
|
-
(<%= link_to '
|
29
|
+
<%= link_to (image_tag 'icons/feed.png', size: '16x16', alt: 'RSS', class: 'icon'), checkouts_path(format: :rss, view: 'overdue') -%>
|
30
|
+
(<%= link_to 'RSS', checkouts_path(format: :rss, view: 'overdue') -%>)
|
31
|
+
<%= link_to (image_tag 'icons/page_white_excel.png', size: '16x16', alt: 'TSV', class: 'icon'), checkouts_path(format: :txt, view: 'overdue', locale: @locale.to_s) -%>
|
32
|
+
(<%= link_to 'TSV', checkouts_path(format: :txt, view: 'overdue', locale: @locale.to_s) -%>)
|
33
33
|
</p>
|
34
34
|
</div>
|