enju_leaf 1.1.0.rc12 → 1.1.0.rc13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/enju.css +0 -1
- data/app/controllers/my_accounts_controller.rb +26 -18
- data/app/controllers/page_controller.rb +6 -6
- data/app/controllers/profiles_controller.rb +155 -0
- data/app/controllers/roles_controller.rb +5 -5
- data/app/controllers/user_export_files_controller.rb +100 -0
- data/app/controllers/user_groups_controller.rb +11 -11
- data/app/controllers/user_import_files_controller.rb +22 -11
- data/app/controllers/user_import_results_controller.rb +1 -1
- data/app/mailers/notifier.rb +7 -7
- data/app/models/enju_leaf/ability.rb +14 -13
- data/app/models/profile.rb +63 -16
- data/app/models/role.rb +2 -2
- data/app/models/user_export_file.rb +52 -0
- data/app/models/user_export_file_state_machine.rb +15 -0
- data/app/models/user_export_file_transition.rb +20 -0
- data/app/models/user_group.rb +3 -3
- data/app/models/user_has_role.rb +2 -2
- data/app/models/user_import_file.rb +139 -53
- data/app/views/kaminari/_first_page.html.erb +1 -1
- data/app/views/kaminari/_last_page.html.erb +1 -1
- data/app/views/kaminari/_next_page.html.erb +1 -1
- data/app/views/kaminari/_page.html.erb +1 -1
- data/app/views/kaminari/_prev_page.html.erb +1 -1
- data/app/views/kaminari/enju_leaf_mobile/_next_page.html.erb +1 -1
- data/app/views/kaminari/enju_leaf_mobile/_page.html.erb +1 -1
- data/app/views/kaminari/enju_leaf_mobile/_prev_page.html.erb +1 -1
- data/app/views/layouts/application.html.erb +4 -4
- data/app/views/my_accounts/_edit_credential.html.erb +67 -59
- data/app/views/my_accounts/edit.html.erb +6 -46
- data/app/views/my_accounts/show.html.erb +8 -8
- data/app/views/page/_add.html.erb +2 -2
- data/app/views/page/_footer.html.erb +3 -2
- data/app/views/page/_footer.mobile.erb +1 -1
- data/app/views/page/_header.html.erb +4 -4
- data/app/views/page/_include.html.erb +1 -1
- data/app/views/page/_index.html.erb +8 -8
- data/app/views/page/_index.mobile.erb +4 -4
- data/app/views/page/_menu.html.erb +9 -6
- data/app/views/page/_msie_acceralator.html.erb +1 -1
- data/app/views/page/_position.html.erb +2 -2
- data/app/views/page/_search_form.html.erb +2 -2
- data/app/views/page/_search_form.mobile.erb +2 -2
- data/app/views/page/_select_locale.html.erb +2 -2
- data/app/views/page/about.en.html.erb +2 -2
- data/app/views/page/about.ja.html.erb +2 -2
- data/app/views/page/advanced_search.html.erb +8 -8
- data/app/views/page/configuration.html.erb +5 -3
- data/app/views/page/export.html.erb +7 -17
- data/app/views/page/import.html.erb +1 -4
- data/app/views/page/index.html.erb +2 -2
- data/app/views/page/msie_acceralator.builder +1 -1
- data/app/views/page/opensearch.builder +2 -2
- data/app/views/profiles/_edit_credential.html.erb +78 -0
- data/app/views/profiles/_edit_profile.html.erb +42 -0
- data/app/views/{users → profiles}/_form.html.erb +0 -0
- data/app/views/{users → profiles}/_show.html.erb +0 -0
- data/app/views/profiles/edit.html.erb +36 -0
- data/app/views/profiles/index.html.erb +61 -0
- data/app/views/{users → profiles}/new.html.erb +34 -36
- data/app/views/{users → profiles}/show.html.erb +24 -22
- data/app/views/{users → profiles}/show.mobile.erb +0 -0
- data/app/views/roles/_form.html.erb +1 -1
- data/app/views/roles/edit.html.erb +1 -1
- data/app/views/roles/index.html.erb +2 -2
- data/app/views/roles/new.html.erb +1 -1
- data/app/views/roles/show.html.erb +1 -1
- data/app/views/user_export_files/_form.html.erb +22 -0
- data/app/views/user_export_files/edit.html.erb +6 -0
- data/app/views/user_export_files/index.html.erb +44 -0
- data/app/views/user_export_files/new.html.erb +16 -0
- data/app/views/user_export_files/show.html.erb +31 -0
- data/app/views/user_groups/_form.html.erb +5 -5
- data/app/views/user_groups/edit.html.erb +1 -1
- data/app/views/user_groups/index.html.erb +14 -8
- data/app/views/user_groups/new.html.erb +1 -1
- data/app/views/user_groups/show.html.erb +3 -3
- data/app/views/user_import_files/index.html.erb +11 -10
- data/app/views/user_import_files/new.html.erb +15 -3
- data/app/views/user_import_files/show.html.erb +13 -3
- data/app/views/user_import_results/index.html.erb +7 -7
- data/app/views/user_import_results/{index.tsv.erb → index.txt.erb} +1 -1
- data/app/views/user_import_results/show.html.erb +2 -2
- data/app/workers/user_export_file_queue.rb +7 -0
- data/config/initializers/mime_types.rb +1 -1
- data/config/locales/devise.en.yml +19 -18
- data/config/locales/devise.ja.yml +45 -42
- data/config/locales/en.yml +214 -0
- data/config/locales/ja.yml +10 -6
- data/config/locales/translation_en.yml +34 -5
- data/config/locales/translation_ja.yml +35 -6
- data/config/routes.rb +4 -7
- data/db/migrate/20130221154434_add_additional_attributes_to_user.rb +0 -9
- data/db/migrate/20140122054321_create_profiles.rb +1 -1
- data/db/migrate/20140709113413_create_user_export_files.rb +11 -0
- data/db/migrate/20140709113905_create_user_export_file_transitions.rb +14 -0
- data/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +5 -0
- data/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +5 -0
- data/db/migrate/20140811031145_add_expired_at_to_profile.rb +5 -0
- data/lib/enju_leaf/calculate_stat.rb +9 -0
- data/lib/enju_leaf/controller.rb +1 -1
- data/lib/enju_leaf/export_file.rb +26 -0
- data/lib/enju_leaf/import_file.rb +25 -0
- data/lib/enju_leaf/master_model.rb +15 -6
- data/lib/enju_leaf/url_validator.rb +4 -2
- data/lib/enju_leaf/user.rb +74 -68
- data/lib/enju_leaf/version.rb +1 -1
- data/lib/enju_leaf.rb +23 -24
- data/lib/generators/enju_leaf/quick_install/quick_install_generator.rb +2 -1
- data/lib/generators/enju_leaf/setup/setup_generator.rb +6 -0
- data/lib/generators/enju_leaf/setup/templates/db/fixtures/user_groups.yml +1 -1
- data/lib/generators/enju_leaf/setup/templates/db/seeds.rb +5 -4
- data/lib/tasks/enju_leaf_tasks.rake +18 -9
- data/lib/tasks/profile.rb +15 -0
- data/spec/controllers/my_accounts_controller_spec.rb +61 -43
- data/spec/controllers/page_controller_spec.rb +20 -20
- data/spec/controllers/profiles_controller_spec.rb +530 -0
- data/spec/controllers/roles_controller_spec.rb +19 -19
- data/spec/controllers/user_export_files_controller_spec.rb +297 -0
- data/spec/controllers/user_groups_controller_spec.rb +48 -48
- data/spec/controllers/user_import_files_controller_spec.rb +45 -41
- data/spec/controllers/user_import_results_controller_spec.rb +9 -9
- data/spec/dummy/app/models/user.rb +3 -0
- data/spec/dummy/config/application.rb +3 -1
- data/spec/dummy/config/environments/test.rb +2 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/{001_create_patrons.rb → 001_create_agents.rb} +1 -2
- data/spec/dummy/db/migrate/005_create_manifestations.rb +5 -17
- data/spec/dummy/db/migrate/006_create_items.rb +2 -3
- data/spec/dummy/db/migrate/032_create_checkins.rb +17 -0
- data/spec/dummy/db/migrate/033_create_checkouts.rb +25 -0
- data/spec/dummy/db/migrate/035_create_reserves.rb +27 -0
- data/spec/dummy/db/migrate/055_create_bookmarks.rb +22 -0
- data/spec/dummy/db/migrate/059_create_libraries.rb +5 -1
- data/spec/dummy/db/migrate/069_create_shelves.rb +5 -1
- data/spec/dummy/db/migrate/080_create_library_groups.rb +0 -2
- data/spec/dummy/db/migrate/113_create_events.rb +23 -0
- data/spec/dummy/db/migrate/114_create_event_categories.rb +16 -0
- data/spec/dummy/db/migrate/121_create_checked_items.rb +17 -0
- data/spec/dummy/db/migrate/127_create_use_restrictions.rb +16 -0
- data/spec/dummy/db/migrate/129_create_item_has_use_restrictions.rb +16 -0
- data/spec/dummy/db/migrate/130_create_request_status_types.rb +5 -1
- data/spec/dummy/db/migrate/131_create_request_types.rb +5 -1
- data/spec/dummy/db/migrate/132_create_circulation_statuses.rb +16 -0
- data/spec/dummy/db/migrate/149_create_message_templates.rb +18 -0
- data/spec/dummy/db/migrate/154_create_messages.rb +23 -0
- data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +18 -0
- data/spec/dummy/db/migrate/{20080905191442_create_patron_types.rb → 20080905191442_create_agent_types.rb} +1 -1
- data/spec/dummy/db/migrate/{20081028083142_create_patron_import_files.rb → 20081028083142_create_agent_import_files.rb} +2 -4
- data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +1 -3
- data/spec/dummy/db/migrate/20081030023412_create_checkout_types.rb +17 -0
- data/spec/dummy/db/migrate/20081030023518_create_user_group_has_checkout_types.rb +25 -0
- data/spec/dummy/db/migrate/20081030023615_create_carrier_type_has_checkout_types.rb +18 -0
- data/spec/dummy/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb +17 -0
- data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +16 -0
- data/spec/dummy/db/migrate/20081212151614_create_bookmark_stats.rb +16 -0
- data/spec/dummy/db/migrate/20081212151820_create_bookmark_stat_has_manifestations.rb +13 -0
- data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +16 -0
- data/spec/dummy/db/migrate/20081215094955_create_checkout_stat_has_users.rb +17 -0
- data/spec/dummy/db/migrate/20081216190517_create_reserve_stat_has_manifestations.rb +17 -0
- data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +16 -0
- data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +16 -0
- data/spec/dummy/db/migrate/20081220034117_create_reserve_stat_has_users.rb +17 -0
- data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +27 -0
- data/spec/dummy/db/migrate/{20090812151902_create_patron_relationship_types.rb → 20090812151902_create_agent_relationship_types.rb} +1 -1
- data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +21 -0
- data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +0 -1
- data/spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb +9 -0
- data/spec/dummy/db/migrate/20100525171356_acts_as_taggable_on_migration.rb +30 -0
- data/spec/dummy/db/migrate/{20100606073747_create_patron_relationships.rb → 20100606073747_create_agent_relationships.rb} +1 -1
- data/spec/dummy/db/migrate/{20100814091104_add_position_to_patron_relationship.rb → 20100814091104_add_position_to_agent_relationship.rb} +1 -1
- data/spec/dummy/db/migrate/{20100925074559_create_patron_import_results.rb → 20100925074559_create_agent_import_results.rb} +1 -1
- data/spec/dummy/db/migrate/{20110301121550_add_birth_date_and_death_date_to_patron.rb → 20110301121550_add_birth_date_and_death_date_to_agent.rb} +1 -1
- data/spec/dummy/db/migrate/20110301134521_add_expire_date_to_reserve.rb +9 -0
- data/spec/dummy/db/migrate/20110328130826_add_current_checkout_count_to_user_group_has_checkout_type.rb +9 -0
- data/spec/dummy/db/migrate/20110618091240_add_periodical_to_series_statement.rb +1 -1
- data/spec/dummy/db/migrate/20110621093332_remove_expire_date_from_reserve.rb +9 -0
- data/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +11 -0
- data/spec/dummy/db/migrate/20111020063828_remove_dsbl_from_library_group.rb +11 -0
- data/spec/dummy/db/migrate/20111217234412_add_save_checkout_history_to_user.rb +5 -0
- data/spec/dummy/db/migrate/20111218002349_add_checkout_icalendar_token_to_user.rb +6 -0
- data/spec/dummy/db/migrate/20111231145823_add_share_bookmarks_to_user.rb +5 -0
- data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +6 -0
- data/spec/dummy/db/migrate/{20120413161403_add_fingerprint_to_patron_import_file.rb → 20120413161403_add_fingerprint_to_agent_import_file.rb} +1 -1
- data/spec/dummy/db/migrate/{20120413170720_add_error_message_to_patron_import_file.rb → 20120413170720_add_error_message_to_agent_import_file.rb} +1 -1
- data/spec/dummy/db/migrate/20120418121539_add_save_search_history_to_user.rb +5 -0
- data/spec/dummy/db/migrate/20120424103932_add_librarian_id_to_checked_item.rb +5 -0
- data/spec/dummy/db/migrate/{20120511072422_add_patron_identifier_to_patron.rb → 20120511072422_add_agent_identifier_to_agent.rb} +1 -1
- data/spec/dummy/db/migrate/{20120602141129_add_edit_mode_to_patron_import_file.rb → 20120602141129_add_edit_mode_to_agent_import_file.rb} +1 -1
- data/spec/dummy/db/migrate/20130303104849_add_state_index_to_reserve.rb +5 -0
- data/spec/dummy/db/migrate/20130303124821_add_retained_at_to_reserve.rb +5 -0
- data/spec/dummy/db/migrate/20130304015019_add_postponed_at_to_reserve.rb +5 -0
- data/spec/dummy/db/migrate/20130416054135_add_circulation_status_id_to_item.rb +8 -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/20130509185724_add_statement_of_responsibility_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20130519065638_add_lock_version_to_reserve.rb +5 -0
- data/spec/dummy/db/migrate/20130519065837_add_lock_version_to_checkin.rb +5 -0
- data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +14 -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/20140524135607_create_bookmark_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140524142813_add_taggings_count_to_tag.rb +5 -0
- data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140529014410_create_item_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/20140810061942_add_user_id_to_stat.rb +12 -0
- data/spec/dummy/db/migrate/20140810091231_add_checkout_icalendar_token_to_profile.rb +6 -0
- data/spec/dummy/db/migrate/20140810091417_add_save_checkout_history_to_profile.rb +5 -0
- data/spec/dummy/db/migrate/20140811132912_add_save_search_history_to_profile.rb +5 -0
- data/spec/dummy/db/migrate/20140812093836_add_share_bookmarks_to_profile.rb +5 -0
- data/spec/dummy/db/schema.rb +632 -57
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/private/system/user_import_files/user_imports/980/190/963/original/user_delete_file.tsv +4 -0
- data/spec/dummy/private/system/user_import_files/user_imports/980/190/963/original/user_import_file_sample.tsv +7 -7
- data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140815-3963-1s1td26.txt +8 -0
- data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140815-69229-i0rcty.txt +8 -0
- data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140816-21120-1w731r8.txt +8 -0
- data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140711-28652-1dj3e98.txt +148 -0
- data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140711-29117-13jb6ol.txt +148 -0
- data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140721-65743-1tnagd4.txt +8 -0
- data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140815-3963-1kk8o87.txt +8 -0
- data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140815-69229-188nwub.txt +8 -0
- data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140816-21120-twzfb6.txt +8 -0
- data/spec/dummy/solr/default/data/index/_4h.fdt +0 -0
- data/spec/dummy/solr/default/data/index/{_3h.fdx → _4h.fdx} +0 -0
- data/spec/dummy/solr/default/data/index/{_3h.fnm → _4h.fnm} +0 -0
- data/spec/dummy/solr/default/data/index/{_3h.nvd → _4h.nvd} +0 -0
- data/spec/dummy/solr/default/data/index/{_3h.nvm → _4h.nvm} +0 -0
- data/spec/dummy/solr/default/data/index/{_3h.si → _4h.si} +0 -0
- data/spec/dummy/solr/default/data/index/_4h_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/default/data/index/_4h_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/default/data/index/_4h_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/default/data/index/_4h_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/default/data/index/segments.gen +0 -0
- data/spec/dummy/solr/default/data/index/segments_97 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000320 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000321 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000322 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000323 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000324 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000325 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000326 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000327 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000328 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000329 +0 -0
- data/spec/dummy/tmp/cache/4F7/F90/default_role +0 -0
- data/spec/dummy/tmp/cache/ACB/B20/manifestation_search_total +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/154f7b83f2da0e86effbe25f32135177 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1b984bdbd3204a51a82d0e01a1569e2d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3054c50144654f9c7e57bb0639a276e9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3bd7a263237ba366f64d938fe5303757 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/62899096da1a3e67660f3b88068be8c9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/65b2e4f67eab21b30217e29075f433b2 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/87d24a3f43f175d4d17babe9203c79a7 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d38d8658b30de1d068603968227680d4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/stdout +246 -279
- data/spec/dummy/tmp/pids/redis-test.pid +1 -1
- data/spec/factories/profile.rb +9 -0
- data/spec/factories/user.rb +0 -13
- data/spec/fixtures/agent_import_files.yml +0 -3
- data/spec/fixtures/agents.yml +54 -54
- data/spec/fixtures/baskets.yml +4 -4
- data/spec/fixtures/carrier_type_has_checkout_types.yml +30 -0
- data/spec/fixtures/checked_items.yml +34 -0
- data/spec/fixtures/checkins.yml +54 -0
- data/spec/fixtures/checkout_stat_has_manifestations.yml +23 -0
- data/spec/fixtures/checkout_stat_has_users.yml +23 -0
- data/spec/fixtures/checkout_types.yml +33 -0
- data/spec/fixtures/checkouts.yml +162 -0
- data/spec/fixtures/circulation_statuses.yml +119 -0
- data/spec/fixtures/event_categories.yml +55 -0
- data/spec/fixtures/events.yml +142 -0
- data/spec/fixtures/exemplifies.yml +12 -0
- data/spec/fixtures/import_requests.yml +0 -2
- data/spec/fixtures/item_has_use_restrictions.yml +60 -0
- data/spec/fixtures/items.yml +101 -11
- data/spec/fixtures/lending_policies.yml +98 -0
- data/spec/fixtures/libraries.yml +26 -25
- data/spec/fixtures/library_groups.yml +6 -8
- data/spec/fixtures/manifestation_checkout_stats.yml +30 -0
- data/spec/fixtures/manifestation_reserve_stats.yml +30 -0
- data/spec/fixtures/manifestations.yml +69 -207
- data/spec/fixtures/message_requests.yml +27 -0
- data/spec/fixtures/message_templates.yml +105 -0
- data/spec/fixtures/profiles.yml +98 -0
- data/spec/fixtures/request_status_types.yml +63 -0
- data/spec/fixtures/request_types.yml +55 -0
- data/spec/fixtures/reserve_stat_has_manifestations.yml +23 -0
- data/spec/fixtures/reserve_stat_has_users.yml +23 -0
- data/spec/fixtures/reserve_transitions.yml +88 -0
- data/spec/fixtures/reserves.yml +162 -0
- data/spec/fixtures/resource_import_files.yml +0 -3
- data/spec/fixtures/roles.yml +0 -4
- data/spec/fixtures/shelves.yml +2 -3
- data/spec/fixtures/use_restrictions.yml +92 -0
- data/spec/fixtures/user_checkout_stats.yml +30 -0
- data/spec/fixtures/user_export_files.yml +26 -0
- data/spec/fixtures/user_group_has_checkout_types.yml +110 -0
- data/spec/fixtures/user_import_files.yml +2 -0
- data/spec/fixtures/user_reserve_stats.yml +30 -0
- data/spec/fixtures/users.yml +1 -101
- data/spec/models/profile_spec.rb +66 -0
- data/spec/models/user_export_file_spec.rb +31 -0
- data/spec/models/user_import_file_spec.rb +42 -20
- data/spec/models/user_spec.rb +1 -18
- data/spec/requests/{users_spec.rb → profiles_spec.rb} +3 -3
- data/spec/routing/accounts_spec.rb +1 -1
- data/spec/routing/profiles_routing_spec.rb +35 -0
- data/spec/support/resque.rb +1 -0
- data/spec/views/{users → profiles}/edit.html.erb_spec.rb +5 -7
- data/spec/views/{users → profiles}/index.html.erb_spec.rb +3 -3
- data/spec/views/{users → profiles}/new.html.erb_spec.rb +5 -5
- data/spec/views/profiles/show.html.erb_spec.rb +20 -0
- data/vendor/assets/javascripts/jquery.colorbox.js +4 -3
- data/vendor/assets/stylesheets/colorbox.css +1 -1
- metadata +416 -132
- data/app/controllers/users_controller.rb +0 -195
- data/app/models/user_sweeper.rb +0 -18
- data/app/views/users/_edit_credential.html.erb +0 -79
- data/app/views/users/edit.html.erb +0 -76
- data/app/views/users/index.html.erb +0 -56
- data/lib/enju_leaf/expire_editable_fragment.rb +0 -30
- data/lib/enju_leaf/expire_fragment_cache.rb +0 -17
- data/spec/controllers/users_controller_spec.rb +0 -539
- data/spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb +0 -13
- data/spec/dummy/db/migrate/20120415060308_rename_resource_import_file_imported_at_to_executed_at.rb +0 -9
- data/spec/dummy/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb +0 -9
- data/spec/dummy/db/migrate/20121119153944_add_manifestation_id_to_item.rb +0 -5
- data/spec/dummy/solr/default/data/index/_3h.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_3h_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/default/data/index/_3h_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/default/data/index/_3h_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/default/data/index/_3h_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/default/data/index/segments_71 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000242 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000243 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000244 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000245 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000246 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000247 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000248 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000249 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000250 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000251 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3f8d795856d1fdf902b0be679120571a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5998e66e374537d52eed3fe1ca5f2bfc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5ea4a1824e1d67da6c4fb9aeef9f49f4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/87f0cb69a0df1355e33cce3949919d5a +0 -0
- data/spec/routing/users_routing_spec.rb +0 -35
- data/spec/views/users/show.html.erb_spec.rb +0 -15
@@ -11,7 +11,7 @@
|
|
11
11
|
</ul>
|
12
12
|
</li>
|
13
13
|
<li><%= link_to t('activerecord.models.user_group'), user_groups_path -%></li>
|
14
|
-
<li><%= link_to t('activerecord.models.
|
14
|
+
<li><%= link_to t('activerecord.models.profile'), profiles_path -%>
|
15
15
|
<ul>
|
16
16
|
<li><%= link_to t('activerecord.models.user_import_file'), user_import_files_path -%></li>
|
17
17
|
</ul>
|
@@ -27,7 +27,7 @@
|
|
27
27
|
<% if defined?(EnjuEvent) %>
|
28
28
|
<li><%= link_to t('activerecord.models.event_category'), event_categories_path -%>
|
29
29
|
<ul>
|
30
|
-
<li><%= link_to t('page.new', :
|
30
|
+
<li><%= link_to t('page.new', model: t('activerecord.models.event_import_file')), new_event_import_file_path %></li>
|
31
31
|
</ul>
|
32
32
|
</li>
|
33
33
|
<% end %>
|
@@ -126,7 +126,9 @@
|
|
126
126
|
<h2 class="title"><%= t('page.system') -%></h2>
|
127
127
|
<div class="config_box">
|
128
128
|
<ul>
|
129
|
-
|
129
|
+
<% if current_user.has_role?('Administrator') %>
|
130
|
+
<li><%= link_to 'Resque', resque_path %></li>
|
131
|
+
<% end %>
|
130
132
|
</ul>
|
131
133
|
</div>
|
132
134
|
</div>
|
@@ -3,29 +3,19 @@
|
|
3
3
|
<div id="content_list">
|
4
4
|
|
5
5
|
<ul>
|
6
|
-
<!--
|
7
6
|
<li>
|
8
|
-
<%= t('activerecord.models.
|
9
|
-
(<%= link_to 'CSV', agents_path(:format => :csv) -%>)
|
7
|
+
<%= link_to t('activerecord.models.resource_export_file'), resource_export_files_path -%>
|
10
8
|
</li>
|
11
9
|
<% if defined?(EnjuEvent) %>
|
12
10
|
<li>
|
13
|
-
<%= t('activerecord.models.
|
14
|
-
|
11
|
+
<%= link_to t('activerecord.models.event_export_file'), event_export_files_path -%>
|
12
|
+
</li>
|
13
|
+
<% end %>
|
14
|
+
<% if current_user.try(:has_role?, 'Administrator') %>
|
15
|
+
<li>
|
16
|
+
<%= link_to t('activerecord.models.user_export_file'), user_export_files_path -%>
|
15
17
|
</li>
|
16
18
|
<% end %>
|
17
|
-
<li>
|
18
|
-
<%= t('activerecord.models.manifestation') -%>
|
19
|
-
(<%= link_to 'CSV', manifestations_path(:format => :csv) -%>)
|
20
|
-
</li>
|
21
|
-
<li>
|
22
|
-
<%= t('activerecord.models.item') -%>
|
23
|
-
(<%= link_to 'CSV', items_path(:format => :csv) -%>)
|
24
|
-
</li>
|
25
|
-
-->
|
26
|
-
<li>
|
27
|
-
<%= link_to t('activerecord.models.resource_export_file'), resource_export_files_path -%>
|
28
|
-
</li>
|
29
19
|
</ul>
|
30
20
|
</div>
|
31
21
|
</div>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<ul>
|
6
6
|
<li><%= link_to t('activerecord.models.user'), user_import_files_path -%>
|
7
|
-
<li><%= link_to t('page.
|
7
|
+
<li><%= link_to t('page.manifestation_and_item'), resource_import_files_path -%></li>
|
8
8
|
<li><%= link_to t('activerecord.models.event'), event_import_files_path -%></li>
|
9
9
|
<!--
|
10
10
|
<li><%= link_to t('activerecord.models.agent'), agent_import_files_path -%></li>
|
@@ -14,7 +14,4 @@
|
|
14
14
|
</div>
|
15
15
|
|
16
16
|
<div id="submenu" class="ui-corner-all ui-widget-content">
|
17
|
-
<ul>
|
18
|
-
<li><%= link_to t('page.add_resource_manually'), new_import_request_path -%></li>
|
19
|
-
</ul>
|
20
17
|
</div>
|
@@ -2,7 +2,7 @@ xml.openServiceDescription("xmlns" => "http://www.microsoft.com/schemas/openserv
|
|
2
2
|
xml.homepageUrl LibraryGroup.site_config.url
|
3
3
|
xml.display do
|
4
4
|
xml.name LibraryGroup.system_name(@locale)
|
5
|
-
xml.description t('page.search_catalog_at', :
|
5
|
+
xml.description t('page.search_catalog_at', library_name: LibraryGroup.system_name(@locale))
|
6
6
|
end
|
7
7
|
xml.activity("category" => t('page.search')) do
|
8
8
|
xml.activityAction do
|
@@ -6,8 +6,8 @@ xml.OpenSearchDescription(
|
|
6
6
|
xml.Description @library_group.display_name.localize
|
7
7
|
xml.Tags 'Library Catalog'
|
8
8
|
xml.Contact @library_group.email
|
9
|
-
xml.Url :
|
10
|
-
xml.Url :
|
9
|
+
xml.Url type: 'text/html', template: "#{manifestations_url}?query={searchTerms}&pages={startPage?}"
|
10
|
+
xml.Url type: 'application/rss+xml', template: "#{manifestations_url(format: :rss)}?query={searchTerms}&pages={startPage?}"
|
11
11
|
xml.Query :role => 'example', :searchTerms => 'enju'
|
12
12
|
xml.Language @locale
|
13
13
|
xml.OutputEncoding 'UTF-8'
|
@@ -0,0 +1,78 @@
|
|
1
|
+
<%= f.fields_for :user do |user_form| %>
|
2
|
+
<div id="left_pane_detail">
|
3
|
+
|
4
|
+
<div class="field">
|
5
|
+
<%= user_form.label :username -%><br />
|
6
|
+
<%= profile.user.username -%>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<div class="field">
|
10
|
+
<%= user_form.label :email -%><br />
|
11
|
+
<%= user_form.text_field :email %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="field">
|
15
|
+
<%= user_form.label :auto_generated_password -%>
|
16
|
+
<%= user_form.check_box :auto_generated_password -%>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="field">
|
20
|
+
<%= f.label :expired_at -%><br />
|
21
|
+
<%- if current_user.has_role?('Librarian') -%>
|
22
|
+
<%= f.text_field :expired_at, value: profile.expired_at.try(:strftime, "%Y-%m-%d"), class: 'date_text_field', placeholder: "#{t('page.example')}: 2011-04-12"-%>
|
23
|
+
<%- else -%>
|
24
|
+
<%= l(profile.expired_at) if profile.expired_at -%>
|
25
|
+
<%- end -%>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="field">
|
29
|
+
<%= user_form.label :locked -%>
|
30
|
+
<%= user_form.check_box :locked -%>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<div class="field">
|
34
|
+
<%= user_form.label t('activerecord.models.role') -%><br />
|
35
|
+
<%= user_form.fields_for :user_has_role do |u| %>
|
36
|
+
<%- if current_user.has_role?('Administrator') and current_user != profile.user -%>
|
37
|
+
<%= u.select :role_id, @roles.collect{|r| [r.display_name.localize, r.id]} %>
|
38
|
+
<% else %>
|
39
|
+
<%= u.select(:role_id, @roles.collect{|r| [r.display_name.localize, r.id]}, {}, {disabled: 'disabled'}) -%>
|
40
|
+
<% end %>
|
41
|
+
<% end %>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<div id="right_pane_detail">
|
46
|
+
<%- if current_user.has_role?('Librarian') -%>
|
47
|
+
<div class="field">
|
48
|
+
<%= f.label t('activerecord.models.user_group') -%><br />
|
49
|
+
<%= f.select(:user_group_id, @user_groups.collect{|u| [u.display_name.localize, u.id]}) -%>
|
50
|
+
</div>
|
51
|
+
<%- end -%>
|
52
|
+
|
53
|
+
<div class="field">
|
54
|
+
<%= f.label :user_number -%><br />
|
55
|
+
<%- if current_user.has_role?('Librarian') -%>
|
56
|
+
<%= f.text_field :user_number, class: 'resource_user_number' -%>
|
57
|
+
<%- else -%>
|
58
|
+
<%= profile.user_number -%>
|
59
|
+
<%- end -%>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<%- if current_user.has_role?('Librarian') -%>
|
63
|
+
<div class="field">
|
64
|
+
<%= f.label t('activerecord.models.library') -%><br />
|
65
|
+
<%= f.select(:library_id, @libraries.collect{|l| [l.display_name.localize, l.id]}) -%>
|
66
|
+
</div>
|
67
|
+
|
68
|
+
<div class="field">
|
69
|
+
<%= f.label t('role.required_role') -%><br />
|
70
|
+
<%= f.select(:required_role_id, @roles.collect{|r| [r.display_name.localize, r.id]}) -%>
|
71
|
+
</div>
|
72
|
+
<%- end -%>
|
73
|
+
<div class="field">
|
74
|
+
<%= f.label :locale -%><br />
|
75
|
+
<%= f.select(:locale, @available_languages.collect{|language| [language.display_name.localize, language.iso_639_1]}) -%>
|
76
|
+
</div>
|
77
|
+
</div>
|
78
|
+
<% end %>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<% if defined?(EnjuCirculation) %>
|
2
|
+
<div class="field">
|
3
|
+
<%= f.label t('user.checkout_history_icalendar_url') -%><br />
|
4
|
+
<div id="feed_token">
|
5
|
+
<%- if profile.checkout_icalendar_token? -%>
|
6
|
+
<%= link_to checkouts_url(icalendar_token: profile.checkout_icalendar_token, format: :ics), checkouts_url(icalendar_token: profile.checkout_icalendar_token, format: :ics) -%>
|
7
|
+
<%= f.hidden_field :checkout_icalendar_token -%>
|
8
|
+
<%- end -%>
|
9
|
+
<br />
|
10
|
+
<input onclick="$.ajax({data:'authenticity_token=' + encodeURIComponent('<%= form_authenticity_token %>'), success:function(request){$('#feed_token').html(request);}, type:'get', url:'<%= edit_my_account_path(mode: 'feed_token') %>'});" type="button" value="<%= t('page.reset') %>" />
|
11
|
+
<input onclick="$.ajax({data:'authenticity_token=' + encodeURIComponent('<%= form_authenticity_token %>'), success:function(request){$('#feed_token').html(request);}, type:'get', url:'<%= edit_my_account_path(disable: true, mode: 'feed_token') %>'});" type="button" value="<%= t('page.delete') %>" />
|
12
|
+
</div>
|
13
|
+
<br />
|
14
|
+
</div>
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
<% if defined?(EnjuSearchLog) %>
|
18
|
+
<div class="field">
|
19
|
+
<%= f.label :save_search_history %>
|
20
|
+
<%= f.check_box :save_search_history %>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<% if defined?(EnjuCirculation) %>
|
25
|
+
<div class="field">
|
26
|
+
<%= f.label :save_checkout_history %>
|
27
|
+
<%= f.check_box :save_checkout_history %>
|
28
|
+
</div>
|
29
|
+
<% end %>
|
30
|
+
|
31
|
+
<% if current_user.has_role?('Librarian') %>
|
32
|
+
<div class="field">
|
33
|
+
<%= f.label :note -%><br />
|
34
|
+
<%= f.text_area :note, class: 'resource_textarea' -%>
|
35
|
+
</div>
|
36
|
+
<% end %>
|
37
|
+
|
38
|
+
<div class="actions">
|
39
|
+
<%= f.submit %>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
|
File without changes
|
File without changes
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
+
<h1 class="title"><%= t('page.edit_user_profile', login_name: @profile.user.username) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
<%= render 'page/required_field' %>
|
5
|
+
<%= simple_form_for(@profile, validate: true) do |f| -%>
|
6
|
+
<%= f.error_messages -%>
|
7
|
+
|
8
|
+
<%= render partial: 'profiles/edit_credential', locals: {f: f, profile: @profile} -%>
|
9
|
+
|
10
|
+
<div class="actions">
|
11
|
+
<%= f.submit %>
|
12
|
+
</div>
|
13
|
+
<div style="clear: both">
|
14
|
+
<div class="field">
|
15
|
+
<%= f.label :keyword_list -%><br />
|
16
|
+
<%= f.text_area :keyword_list, class: 'resource_textarea' -%>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<%= render partial: 'profiles/edit_profile', locals: {f: f, profile: @profile} -%>
|
20
|
+
</div>
|
21
|
+
<%- end -%>
|
22
|
+
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
27
|
+
<ul>
|
28
|
+
<li><%= link_to t('page.show'), @profile -%></li>
|
29
|
+
<li><%= link_to t('page.listing', model: t('activerecord.models.profile')), profiles_path -%></li>
|
30
|
+
<%- if current_user.has_role?('Librarian') -%>
|
31
|
+
<%- unless current_user == @profile.user -%>
|
32
|
+
<li><%= link_to t('page.destroy'), @profile, data: {confirm: t('page.are_you_sure')}, method: :delete -%></li>
|
33
|
+
<%- end -%>
|
34
|
+
<%- end -%>
|
35
|
+
</ul>
|
36
|
+
</div>
|
@@ -0,0 +1,61 @@
|
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
+
<h1 class="title"><%= t('page.listing', model: t('activerecord.models.profile')) -%></h1>
|
3
|
+
<div id="content_list">
|
4
|
+
<p id="notice"><%= notice %></p>
|
5
|
+
|
6
|
+
<div class="search_form">
|
7
|
+
<%= form_for :profiles, url: profiles_path, html: {method: 'get'} do -%>
|
8
|
+
<p>
|
9
|
+
<%= label_tag :query, t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), class: 'search_form', placeholder: t('page.search_term') -%>
|
10
|
+
<%= submit_tag t('page.search') -%>
|
11
|
+
</p>
|
12
|
+
<%- end -%>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<table class="table table-striped index">
|
16
|
+
<tr>
|
17
|
+
<th><%= t('activerecord.attributes.user.username') -%>
|
18
|
+
<%= link_to image_tag('icons/arrow_up.png', size: '16x16', alt: t('page.asc')), url_for(params.merge(sort_by: 'username', order: 'asc', only_path: true)) -%>
|
19
|
+
<%= link_to image_tag('icons/arrow_down.png', size: '16x16', alt: t('page.desc')), url_for(params.merge(sort_by: 'username', order: 'desc', only_path: true)) -%>
|
20
|
+
</th>
|
21
|
+
<th><%= t('activerecord.attributes.profile.user_number') -%></th>
|
22
|
+
<th>
|
23
|
+
<%= t('page.created_at') -%>
|
24
|
+
<%= link_to image_tag('icons/arrow_up.png', size: '16x16', alt: t('page.asc')), url_for(params.merge(sort_by: 'created_at', order: 'asc', only_path: true)) -%>
|
25
|
+
<%= link_to image_tag('icons/arrow_down.png', size: '16x16', alt: t('page.desc')), url_for(params.merge(sort_by: 'created_at', order: 'desc', only_path: true)) -%>
|
26
|
+
</th>
|
27
|
+
<th></th>
|
28
|
+
</tr>
|
29
|
+
|
30
|
+
<%- @profiles.each_with_index do |profile, i| -%>
|
31
|
+
<tr class="line<%= cycle("0", "1") -%>">
|
32
|
+
<td>
|
33
|
+
<%= link_to profile.user.username, profile -%>
|
34
|
+
</td>
|
35
|
+
<td><%= profile.user_number -%></td>
|
36
|
+
<td><%= l(profile.created_at) -%></td>
|
37
|
+
<td>
|
38
|
+
<%= link_to t('page.edit'), edit_profile_path(profile) -%>
|
39
|
+
</td>
|
40
|
+
</tr>
|
41
|
+
<%- end -%>
|
42
|
+
</table>
|
43
|
+
|
44
|
+
<br />
|
45
|
+
<%= paginate(@profiles) -%>
|
46
|
+
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
|
50
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
51
|
+
<ul>
|
52
|
+
<%- if current_user.try(:has_role?, 'Librarian') -%>
|
53
|
+
<li><%= link_to t('page.new', model: t('activerecord.models.profile')), new_profile_path -%></li>
|
54
|
+
<li><%= link_to t('page.new', model: t('activerecord.models.user_import_file')), new_user_import_file_path -%></li>
|
55
|
+
<li><%= link_to t('page.listing', model: t('activerecord.models.user_import_file')), user_import_files_path -%></li>
|
56
|
+
<%- if current_user.has_role?('Administrator') -%>
|
57
|
+
<li><%= link_to t('activerecord.models.user_export_file'), user_export_files_path -%></li>
|
58
|
+
<%- end -%>
|
59
|
+
<%- end -%>
|
60
|
+
</ul>
|
61
|
+
</div>
|
@@ -1,29 +1,30 @@
|
|
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.profile')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<%= render 'page/required_field' %>
|
5
|
-
<%= simple_form_for(@
|
5
|
+
<%= simple_form_for(@profile, validate: true) do |f| -%>
|
6
6
|
<%= f.error_messages -%>
|
7
7
|
|
8
|
-
|
9
|
-
<
|
10
|
-
|
11
|
-
<%=
|
12
|
-
</
|
13
|
-
|
14
|
-
|
8
|
+
<%= f.fields_for :user do |user_form| %>
|
9
|
+
<div class="field">
|
10
|
+
<%= user_form.label :username -%>
|
11
|
+
<%= user_form.text_field :username, class: 'resource_user' -%>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="field">
|
15
|
+
<%= user_form.label :email -%>
|
16
|
+
<%= user_form.email_field :email, class: 'resource_email' -%>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="field">
|
20
|
+
<%= user_form.label :email_confirmation -%>
|
21
|
+
<%= user_form.email_field :email_confirmation, class: 'resource_email' -%>
|
22
|
+
</div>
|
23
|
+
<% end %>
|
15
24
|
|
16
25
|
<div class="field">
|
17
|
-
<%= f.label :
|
18
|
-
<%= f.text_field :
|
19
|
-
</div>
|
20
|
-
<div class="field">
|
21
|
-
<%= f.label :email -%>
|
22
|
-
<%= f.email_field :email, :class => 'resource_email' -%>
|
23
|
-
</div>
|
24
|
-
<div class="field">
|
25
|
-
<%= f.label :email_confirmation -%>
|
26
|
-
<%= f.email_field :email_confirmation, :class => 'resource_email' -%>
|
26
|
+
<%= f.label :expired_at -%>
|
27
|
+
<%= f.text_field :expired_at, class: 'date_text_field', placeholder: "#{t('page.example')}: 2011-04-12"-%>
|
27
28
|
</div>
|
28
29
|
|
29
30
|
<div class="field">
|
@@ -31,55 +32,52 @@
|
|
31
32
|
<%= f.select(:user_group_id, @user_groups.collect{|u| [u.display_name.localize, u.id]}) -%>
|
32
33
|
</div>
|
33
34
|
|
34
|
-
<%- if current_user.has_role?('Librarian') -%>
|
35
|
-
<div class="field">
|
36
|
-
<%= f.label t('activerecord.models.library') -%>
|
37
|
-
<%= f.select(:library_id, @libraries.collect{|l| [l.display_name.localize, l.id]}) -%>
|
38
|
-
</div>
|
39
|
-
|
40
|
-
<%- end -%>
|
41
35
|
<div class="field">
|
42
|
-
<%= f.label
|
43
|
-
<%= f.select(:
|
36
|
+
<%= f.label t('activerecord.models.library') -%>
|
37
|
+
<%= f.select(:library_id, @libraries.collect{|l| [l.display_name.localize, l.id]}) -%>
|
44
38
|
</div>
|
45
39
|
|
46
40
|
<div class="field">
|
47
|
-
<%= f.label :
|
48
|
-
<%= f.
|
41
|
+
<%= f.label :locale -%>
|
42
|
+
<%= f.select(:locale, @available_languages.collect{|language| [language.display_name.localize, language.iso_639_1]}) -%>
|
49
43
|
</div>
|
50
44
|
|
51
45
|
<% if defined?(EnjuSearchLog) %>
|
52
46
|
<div class="field">
|
53
|
-
<%= f.check_box :save_search_history %>
|
54
47
|
<%= f.label :save_search_history %>
|
48
|
+
<%= f.check_box :save_search_history %>
|
55
49
|
</div>
|
56
50
|
<% end %>
|
57
51
|
|
58
52
|
<% if defined?(EnjuCirculation) %>
|
59
53
|
<div class="field">
|
60
|
-
<%= f.check_box :save_checkout_history %>
|
61
54
|
<%= f.label :save_checkout_history %>
|
55
|
+
<%= f.check_box :save_checkout_history %>
|
62
56
|
</div>
|
63
57
|
<% end %>
|
64
58
|
|
65
59
|
<% if current_user.has_role?('Librarian') %>
|
66
60
|
<div class="field">
|
67
61
|
<%= f.label :note -%><br />
|
68
|
-
<%= f.text_area :note, :
|
62
|
+
<%= f.text_area :note, class: 'resource_textarea' -%>
|
69
63
|
</div>
|
70
64
|
<% end %>
|
71
65
|
|
66
|
+
<div class="field">
|
67
|
+
<%= f.label :user_number -%>
|
68
|
+
<%= f.text_field :user_number, class: 'resource_user' -%>
|
69
|
+
</div>
|
70
|
+
|
72
71
|
<div class="actions">
|
73
72
|
<%= f.submit t('user.sign_up') -%>
|
74
73
|
</div>
|
75
74
|
<%- end -%>
|
76
|
-
<%= javascript_tag("$(function(){$('#user_username').focus()})") %>
|
77
75
|
</div>
|
78
76
|
</div>
|
79
77
|
|
80
78
|
<div id="submenu" class="ui-corner-all ui-widget-content">
|
81
79
|
<ul>
|
82
|
-
<li><%= link_to t('page.listing', :
|
83
|
-
<li><%= link_to t('page.import'),
|
80
|
+
<li><%= link_to t('page.listing', model: t('activerecord.models.profile')), profiles_path -%></li>
|
81
|
+
<li><%= link_to t('page.import'), new_user_import_file_path -%></li>
|
84
82
|
</ul>
|
85
83
|
</div>
|
@@ -1,17 +1,17 @@
|
|
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.user')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<p id="notice"><%= notice %></p>
|
5
5
|
|
6
6
|
<h2 class="resource_title">
|
7
7
|
[U]
|
8
|
-
<%= @user.username -%>
|
9
|
-
<% if @
|
10
|
-
(<%= @
|
8
|
+
<%= @profile.user.username -%>
|
9
|
+
<% if @profile.full_name %>
|
10
|
+
(<%= @profile.full_name %>)
|
11
11
|
<% end %>
|
12
12
|
</h2>
|
13
13
|
|
14
|
-
<p><%= t('activerecord.attributes.
|
14
|
+
<p><%= t('activerecord.attributes.profile.user_number') %>: <%= @profile.user_number %></p>
|
15
15
|
<%- if flash[:temporary_password] -%>
|
16
16
|
<p><%= t('user.your_temporary_password_is') -%>: </p>
|
17
17
|
<p style="font-size: 200%"><%= flash[:temporary_password] -%></p>
|
@@ -24,14 +24,15 @@
|
|
24
24
|
<th><%= t('activerecord.models.item') %></th>
|
25
25
|
<th><%= t('activerecord.attributes.checkout.due_date') %></th>
|
26
26
|
</tr>
|
27
|
-
<% @user
|
27
|
+
<% if @profile.user %>
|
28
|
+
<% @profile.user.checkouts.not_returned.each do |checkout| %>
|
28
29
|
<tr class="line<%= cycle("0", "1") -%>">
|
29
30
|
<td>
|
30
31
|
<%= link_to checkout.item.item_identifier, checkout.item %><br />
|
31
32
|
(<%= link_to checkout.item.manifestation.original_title, checkout.item.manifestation %>)
|
32
33
|
</td>
|
33
34
|
<td>
|
34
|
-
<%=l checkout.due_date, :
|
35
|
+
<%=l checkout.due_date, formats: :only_date %>
|
35
36
|
<br />
|
36
37
|
<%- if can? :update, checkout -%>
|
37
38
|
<% unless checkout.checkin %>
|
@@ -41,6 +42,7 @@
|
|
41
42
|
</td>
|
42
43
|
</tr>
|
43
44
|
<% end %>
|
45
|
+
<% end %>
|
44
46
|
</table>
|
45
47
|
<% end %>
|
46
48
|
</div>
|
@@ -49,46 +51,46 @@
|
|
49
51
|
<div id="submenu" class="ui-corner-all ui-widget-content">
|
50
52
|
<% if defined?(EnjuCirculation) %>
|
51
53
|
<ul>
|
52
|
-
<%- @
|
54
|
+
<%- @profile.user_group.user_group_has_checkout_types.each do |available_checkout_type| -%>
|
53
55
|
<li>
|
54
56
|
<%= available_checkout_type.checkout_type.display_name.localize -%>:
|
55
|
-
<%= @user.checked_item_count[:"#{available_checkout_type.checkout_type.name}"] -%> / <%= available_checkout_type.checkout_limit -%>
|
57
|
+
<%= @profile.user.checked_item_count[:"#{available_checkout_type.checkout_type.name}"] -%> / <%= available_checkout_type.checkout_limit -%>
|
56
58
|
</li>
|
57
59
|
<%- end -%>
|
58
60
|
</ul>
|
59
61
|
<% end %>
|
60
62
|
<ul>
|
61
63
|
<%- if flash[:query] -%>
|
62
|
-
<li><%= link_to t('page.back'),
|
64
|
+
<li><%= link_to t('page.back'), profiles_path(query: flash[:query]) -%></li>
|
63
65
|
<% else %>
|
64
66
|
<li><%= back_to_index %></li>
|
65
67
|
<% end %>
|
66
68
|
<% if user_signed_in? %>
|
67
|
-
<% if can? :update, @
|
68
|
-
<li><%= link_to t('page.edit'),
|
69
|
+
<% if can? :update, @profile %>
|
70
|
+
<li><%= link_to t('page.edit'), edit_profile_path(@profile) -%></li>
|
69
71
|
<% end %>
|
70
72
|
<% if defined?(EnjuMessage) %>
|
71
|
-
<li><%= link_to t('message.send'), new_message_path(:
|
73
|
+
<li><%= link_to t('message.send'), new_message_path(recipient: @profile.user.username) -%></li>
|
72
74
|
<% end %>
|
73
|
-
<%- if can? :create, @
|
74
|
-
<li><%= link_to t('page.new', :
|
75
|
+
<%- if can? :create, @profile -%>
|
76
|
+
<li><%= link_to t('page.new', model: t('activerecord.models.profile')), new_profile_path -%></li>
|
75
77
|
<% end %>
|
76
|
-
<%- if can? :destroy, @
|
77
|
-
<li><%= link_to t('page.destroy'), @
|
78
|
+
<%- if can? :destroy, @profile -%>
|
79
|
+
<li><%= link_to t('page.destroy'), @profile, data: {confirm: t('page.are_you_sure')}, method: :delete -%></li>
|
78
80
|
<% end %>
|
79
81
|
<%- end -%>
|
80
82
|
<% if defined?(EnjuCirculation) %>
|
81
|
-
<li><%= link_to t('activerecord.models.checkout'),
|
82
|
-
<li><%= link_to t('activerecord.models.reserve'),
|
83
|
+
<li><%= link_to t('activerecord.models.checkout'), checkouts_path(user_id: @profile.user.username) %></li>
|
84
|
+
<li><%= link_to t('activerecord.models.reserve'), reserves_path(user_id: @profile.user.username) %></li>
|
83
85
|
<% end %>
|
84
86
|
<% if defined?(EnjuQuestion) %>
|
85
|
-
<li><%= link_to t('activerecord.models.question'),
|
87
|
+
<li><%= link_to t('activerecord.models.question'), questions_path(user_id: @profile.user.username) %></li>
|
86
88
|
<% end %>
|
87
89
|
<% if defined?(EnjuBookmark) %>
|
88
|
-
<li><%= link_to t('activerecord.models.bookmark'),
|
90
|
+
<li><%= link_to t('activerecord.models.bookmark'), bookmarks_path(user_id: @profile.user.username) %></li>
|
89
91
|
<% end %>
|
90
92
|
<% if defined?(EnjuPurchaseRequest) %>
|
91
|
-
<li><%= link_to t('activerecord.models.purchase_request'),
|
93
|
+
<li><%= link_to t('activerecord.models.purchase_request'), purchase_requests_path(user_id: @profile.user.username) %></li>
|
92
94
|
<% end %>
|
93
95
|
</ul>
|
94
96
|
</div>
|
File without changes
|
@@ -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.role')) -%></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.role')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
|
5
5
|
<table class="table table-striped index">
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<td><%= link_to role.display_name.localize, role -%></td>
|
16
16
|
<td>
|
17
17
|
<%= link_to t('page.edit'), edit_role_path(role) -%>
|
18
|
-
<%= link_to t('page.destroy'), role, :
|
18
|
+
<%= link_to t('page.destroy'), role, data: {confirm: t('page.are_you_sure')}, method: :delete -%>
|
19
19
|
</td>
|
20
20
|
</tr>
|
21
21
|
<%- end -%>
|
@@ -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.role')) -%></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.role')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<p id="notice"><%= notice %></p>
|
5
5
|
|