enju_event 0.1.17.pre17 → 0.1.17.pre18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (203) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/event_import_files_controller.rb +7 -2
  3. data/app/controllers/event_import_results_controller.rb +1 -1
  4. data/app/models/event.rb +11 -13
  5. data/app/models/event_import_file.rb +52 -73
  6. data/app/models/event_import_file_state_machine.rb +19 -0
  7. data/app/models/event_import_file_transition.rb +20 -0
  8. data/app/views/calendar/index.html.erb +2 -2
  9. data/app/views/event_categories/edit.html.erb +2 -2
  10. data/app/views/event_categories/index.html.erb +2 -2
  11. data/app/views/event_categories/new.html.erb +2 -2
  12. data/app/views/event_categories/show.html.erb +2 -2
  13. data/app/views/event_import_files/edit.html.erb +2 -2
  14. data/app/views/event_import_files/index.html.erb +4 -4
  15. data/app/views/event_import_files/new.html.erb +17 -4
  16. data/app/views/event_import_files/show.html.erb +13 -3
  17. data/app/views/event_import_results/index.html.erb +6 -6
  18. data/app/views/event_import_results/{index.csv.erb → index.tsv.erb} +0 -0
  19. data/app/views/event_import_results/show.html.erb +2 -2
  20. data/app/views/events/edit.html.erb +2 -2
  21. data/app/views/events/index.html.erb +2 -2
  22. data/app/views/events/new.html.erb +2 -2
  23. data/app/views/events/show.html.erb +8 -3
  24. data/app/views/participates/edit.html.erb +2 -2
  25. data/app/views/participates/index.html.erb +2 -2
  26. data/app/views/participates/new.html.erb +2 -2
  27. data/app/views/participates/show.html.erb +2 -2
  28. data/app/workers/event_import_file_queue.rb +7 -0
  29. data/config/locales/translation_en.yml +1 -0
  30. data/config/locales/translation_ja.yml +1 -0
  31. data/db/migrate/20081028093607_create_event_import_files.rb +0 -2
  32. data/db/migrate/20140523171309_create_event_import_file_transitions.rb +14 -0
  33. data/db/migrate/20140628071719_add_user_encoding_to_event_import_file.rb +5 -0
  34. data/lib/enju_event/engine.rb +1 -1
  35. data/lib/enju_event/version.rb +1 -1
  36. data/spec/dummy/db/migrate/005_create_manifestations.rb +0 -12
  37. data/spec/dummy/db/migrate/006_create_items.rb +2 -2
  38. data/spec/dummy/db/migrate/029_create_subjects.rb +27 -0
  39. data/spec/dummy/db/migrate/032_create_checkins.rb +17 -0
  40. data/spec/dummy/db/migrate/033_create_checkouts.rb +25 -0
  41. data/spec/dummy/db/migrate/035_create_reserves.rb +27 -0
  42. data/spec/dummy/db/migrate/059_create_libraries.rb +1 -7
  43. data/spec/dummy/db/migrate/069_create_shelves.rb +1 -5
  44. data/spec/dummy/db/migrate/{20111201163342_create_user_groups.rb → 077_create_user_groups.rb} +2 -2
  45. data/spec/dummy/db/migrate/080_create_library_groups.rb +2 -9
  46. data/spec/dummy/db/migrate/120_create_baskets.rb +12 -0
  47. data/spec/dummy/db/migrate/121_create_checked_items.rb +17 -0
  48. data/spec/dummy/db/migrate/124_create_bookstores.rb +17 -0
  49. data/spec/dummy/db/migrate/127_create_use_restrictions.rb +16 -0
  50. data/spec/dummy/db/migrate/129_create_item_has_use_restrictions.rb +16 -0
  51. data/spec/dummy/db/migrate/130_create_request_status_types.rb +12 -0
  52. data/spec/dummy/db/migrate/131_create_request_types.rb +12 -0
  53. data/spec/dummy/db/migrate/132_create_circulation_statuses.rb +16 -0
  54. data/spec/dummy/db/migrate/142_create_classifications.rb +19 -0
  55. data/spec/dummy/db/migrate/143_create_subject_has_classifications.rb +16 -0
  56. data/spec/dummy/db/migrate/144_create_classification_types.rb +16 -0
  57. data/spec/dummy/db/migrate/145_create_subject_heading_types.rb +16 -0
  58. data/spec/dummy/db/migrate/146_create_subject_types.rb +16 -0
  59. data/spec/dummy/db/migrate/149_create_message_templates.rb +18 -0
  60. data/spec/dummy/db/migrate/154_create_messages.rb +24 -0
  61. data/spec/dummy/db/migrate/20080606052544_create_work_has_subjects.rb +18 -0
  62. data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +20 -0
  63. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +17 -0
  64. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +14 -0
  65. data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +17 -0
  66. data/spec/dummy/db/migrate/20081030023412_create_checkout_types.rb +17 -0
  67. data/spec/dummy/db/migrate/20081030023518_create_user_group_has_checkout_types.rb +25 -0
  68. data/spec/dummy/db/migrate/20081030023615_create_carrier_type_has_checkout_types.rb +18 -0
  69. data/spec/dummy/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb +17 -0
  70. data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +16 -0
  71. data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +16 -0
  72. data/spec/dummy/db/migrate/20081215094955_create_checkout_stat_has_users.rb +17 -0
  73. data/spec/dummy/db/migrate/20081216190517_create_reserve_stat_has_manifestations.rb +17 -0
  74. data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +16 -0
  75. data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +16 -0
  76. data/spec/dummy/db/migrate/20081220034117_create_reserve_stat_has_users.rb +17 -0
  77. data/spec/dummy/db/migrate/20090208044541_create_subject_heading_type_has_subjects.rb +16 -0
  78. data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +27 -0
  79. data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +21 -0
  80. data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +9 -0
  81. data/spec/dummy/db/migrate/20110301134521_add_expire_date_to_reserve.rb +9 -0
  82. data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +11 -0
  83. data/spec/dummy/db/migrate/20110328130826_add_current_checkout_count_to_user_group_has_checkout_type.rb +9 -0
  84. data/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +9 -0
  85. data/spec/dummy/db/migrate/20110621093332_remove_expire_date_from_reserve.rb +9 -0
  86. data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +13 -0
  87. data/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +11 -0
  88. data/spec/dummy/db/migrate/20110913120629_add_lft_and_rgt_to_classification.rb +11 -0
  89. data/spec/dummy/db/migrate/20111201155456_devise_create_users.rb +42 -0
  90. data/spec/dummy/db/migrate/20111217234412_add_save_checkout_history_to_user.rb +5 -0
  91. data/spec/dummy/db/migrate/20111218002349_add_checkout_icalendar_token_to_user.rb +6 -0
  92. data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +6 -0
  93. data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +12 -0
  94. data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +14 -0
  95. data/spec/dummy/db/migrate/20120406020752_add_url_to_subject.rb +5 -0
  96. data/spec/dummy/db/migrate/20120424103932_add_librarian_id_to_checked_item.rb +5 -0
  97. data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +5 -0
  98. data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +6 -0
  99. data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +26 -0
  100. data/spec/dummy/db/migrate/20130303104849_add_state_index_to_reserve.rb +5 -0
  101. data/spec/dummy/db/migrate/20130303124821_add_retained_at_to_reserve.rb +5 -0
  102. data/spec/dummy/db/migrate/20130304015019_add_postponed_at_to_reserve.rb +5 -0
  103. data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +6 -0
  104. data/spec/dummy/db/migrate/20130416054135_add_circulation_status_id_to_item.rb +8 -0
  105. data/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb +5 -0
  106. data/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +7 -0
  107. data/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +5 -0
  108. data/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +6 -0
  109. data/spec/dummy/db/migrate/20130504133816_add_manifestation_id_to_subject.rb +6 -0
  110. data/spec/dummy/db/migrate/20130504143515_add_manifestation_id_to_classification.rb +6 -0
  111. data/spec/dummy/db/migrate/20130504195916_add_subject_heading_type_id_to_subject.rb +5 -0
  112. data/spec/dummy/db/migrate/20130506175303_create_identifier_types.rb +12 -0
  113. data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +15 -0
  114. data/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb +5 -0
  115. data/spec/dummy/db/migrate/20130519065638_add_lock_version_to_reserve.rb +5 -0
  116. data/spec/dummy/db/migrate/20130519065837_add_lock_version_to_checkin.rb +5 -0
  117. data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +11 -0
  118. data/spec/dummy/db/schema.rb +613 -92
  119. data/spec/dummy/db/test.sqlite3 +0 -0
  120. data/spec/dummy/private/system/event_import_files/event_imports/000/000/004/original/event_import_file_sample1.tsv +7 -7
  121. data/spec/dummy/solr/default/data/index/_b2.fdt +0 -0
  122. data/spec/dummy/solr/default/data/index/{_14y.fdx → _b2.fdx} +0 -0
  123. data/spec/dummy/solr/default/data/index/{_14y.fnm → _b2.fnm} +0 -0
  124. data/spec/dummy/solr/default/data/index/{_14y.nvd → _b2.nvd} +0 -0
  125. data/spec/dummy/solr/default/data/index/{_14y.nvm → _b2.nvm} +0 -0
  126. data/spec/dummy/solr/default/data/index/{_14y.si → _b2.si} +0 -0
  127. data/spec/dummy/solr/default/data/index/{_14y_Lucene41_0.doc → _b2_Lucene41_0.doc} +0 -0
  128. data/spec/dummy/solr/default/data/index/{_14y_Lucene41_0.pos → _b2_Lucene41_0.pos} +0 -0
  129. data/spec/dummy/solr/default/data/index/{_14y_Lucene41_0.tim → _b2_Lucene41_0.tim} +0 -0
  130. data/spec/dummy/solr/default/data/index/{_14y_Lucene41_0.tip → _b2_Lucene41_0.tip} +0 -0
  131. data/spec/dummy/solr/default/data/index/_b3.fdt +0 -0
  132. data/spec/dummy/solr/default/data/index/{_14z.fdx → _b3.fdx} +0 -0
  133. data/spec/dummy/solr/default/data/index/{_14z.fnm → _b3.fnm} +0 -0
  134. data/spec/dummy/solr/default/data/index/{_14z.nvd → _b3.nvd} +0 -0
  135. data/spec/dummy/solr/default/data/index/{_14z.nvm → _b3.nvm} +0 -0
  136. data/spec/dummy/solr/default/data/index/{_14z.si → _b3.si} +0 -0
  137. data/spec/dummy/solr/default/data/index/{_14z_Lucene41_0.doc → _b3_Lucene41_0.doc} +0 -0
  138. data/spec/dummy/solr/default/data/index/_b3_Lucene41_0.pos +0 -0
  139. data/spec/dummy/solr/default/data/index/_b3_Lucene41_0.tim +0 -0
  140. data/spec/dummy/solr/default/data/index/_b3_Lucene41_0.tip +0 -0
  141. data/spec/dummy/solr/default/data/index/segments.gen +0 -0
  142. data/spec/dummy/solr/default/data/index/segments_ht +0 -0
  143. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000630 +0 -0
  144. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000631 +0 -0
  145. data/spec/dummy/solr/default/data/tlog/{tlog.0000000000000002010 → tlog.0000000000000000632} +0 -0
  146. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000633 +0 -0
  147. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000634 +0 -0
  148. data/spec/dummy/solr/default/data/tlog/{tlog.0000000000000002013 → tlog.0000000000000000635} +0 -0
  149. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000636 +0 -0
  150. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000637 +0 -0
  151. data/spec/dummy/solr/default/data/tlog/{tlog.0000000000000002016 → tlog.0000000000000000638} +0 -0
  152. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000639 +0 -0
  153. data/spec/dummy/solr/test/data/index/segments.gen +0 -0
  154. data/spec/dummy/solr/test/data/index/segments_1 +0 -0
  155. data/spec/fixtures/event_import_files.yml +1 -4
  156. data/spec/fixtures/libraries.yml +0 -5
  157. data/spec/models/event_import_file_spec.rb +14 -6
  158. data/spec/models/event_spec.rb +1 -1
  159. data/spec/spec_helper.rb +3 -0
  160. data/spec/support/resque.rb +32 -0
  161. metadata +271 -140
  162. data/spec/dummy/db/development.sqlite3 +0 -0
  163. data/spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb +0 -9
  164. data/spec/dummy/db/migrate/20100527113752_create_delayed_jobs.rb +0 -21
  165. data/spec/dummy/db/migrate/20110115022329_add_position_to_library_group.rb +0 -9
  166. data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +0 -9
  167. data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +0 -12
  168. data/spec/dummy/db/migrate/20111020063828_remove_dsbl_from_library_group.rb +0 -11
  169. data/spec/dummy/db/migrate/20111201155456_create_users.rb +0 -14
  170. data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +0 -52
  171. data/spec/dummy/solr/default/data/index/_14y.fdt +0 -0
  172. data/spec/dummy/solr/default/data/index/_14z.fdt +0 -0
  173. data/spec/dummy/solr/default/data/index/_14z_Lucene41_0.pos +0 -0
  174. data/spec/dummy/solr/default/data/index/_14z_Lucene41_0.tim +0 -0
  175. data/spec/dummy/solr/default/data/index/_14z_Lucene41_0.tip +0 -0
  176. data/spec/dummy/solr/default/data/index/segments_1k3 +0 -0
  177. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002008 +0 -0
  178. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002009 +0 -0
  179. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002011 +0 -0
  180. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002012 +0 -0
  181. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002014 +0 -0
  182. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002015 +0 -0
  183. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000002017 +0 -0
  184. data/spec/dummy/solr/test/data/index/_a.fdt +0 -0
  185. data/spec/dummy/solr/test/data/index/_a.fdx +0 -0
  186. data/spec/dummy/solr/test/data/index/_a.fnm +0 -0
  187. data/spec/dummy/solr/test/data/index/_a.nvd +0 -0
  188. data/spec/dummy/solr/test/data/index/_a.nvm +0 -0
  189. data/spec/dummy/solr/test/data/index/_a.si +0 -0
  190. data/spec/dummy/solr/test/data/index/_a_Lucene41_0.doc +0 -0
  191. data/spec/dummy/solr/test/data/index/_a_Lucene41_0.pos +0 -0
  192. data/spec/dummy/solr/test/data/index/_a_Lucene41_0.tim +0 -0
  193. data/spec/dummy/solr/test/data/index/_a_Lucene41_0.tip +0 -0
  194. data/spec/dummy/solr/test/data/index/segments_n +0 -0
  195. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000013 +0 -0
  196. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000014 +0 -0
  197. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000015 +0 -0
  198. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000016 +0 -0
  199. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000017 +0 -0
  200. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000018 +0 -0
  201. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000019 +0 -0
  202. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000020 +0 -0
  203. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000000021 +0 -0
@@ -1,10 +1,10 @@
1
- <div id="content_detail" class="ui-corner-all">
1
+ <div id="content_detail" class="ui-corner-all ui-widget-content">
2
2
  <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.event_import_file')) -%></h1>
3
3
  <div id="content_list">
4
4
 
5
5
  <table class="table table-striped index">
6
6
  <tr>
7
- <th>ID</th>
7
+ <th>Id</th>
8
8
  <th><%= t('activerecord.attributes.event_import_file.event_import_file_name') -%></th>
9
9
  <th><%= t('activerecord.attributes.event_import_file.executed_at') -%></th>
10
10
  <th><%= t('activerecord.models.user') -%></th>
@@ -20,7 +20,7 @@
20
20
  <td><%= l(event_import_file.executed_at) if event_import_file.executed_at -%></td>
21
21
  <td><%= link_to event_import_file.user.username, event_import_file.user -%></td>
22
22
  <td><%= event_import_file.edit_mode -%></td>
23
- <td><%= localized_state(event_import_file.state) -%></td>
23
+ <td><%= localized_state(event_import_file.current_state) -%></td>
24
24
  <td>
25
25
  <%= link_to t('page.show'), event_import_file -%>
26
26
  <%= link_to t('page.destroy'), event_import_file, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
@@ -33,7 +33,7 @@
33
33
  </div>
34
34
  </div>
35
35
 
36
- <div id="submenu" class="ui-corner-all">
36
+ <div id="submenu" class="ui-corner-all ui-widget-content">
37
37
  <ul>
38
38
  <li><%= link_to t('page.new', :model => t('activerecord.models.event_import_file')), new_event_import_file_path -%></li>
39
39
  </ul>
@@ -1,4 +1,4 @@
1
- <div id="content_detail" class="ui-corner-all">
1
+ <div id="content_detail" class="ui-corner-all ui-widget-content">
2
2
  <h1 class="title"><%= t('page.new', :model => t('activerecord.models.event_import_file')) -%></h1>
3
3
  <div id="content_list">
4
4
 
@@ -20,16 +20,29 @@
20
20
  <%= f.label :edit_mode, t('page.destroy'), :value => 'destroy' %>
21
21
  </div>
22
22
 
23
+ <div class="field">
24
+ <%= f.label :user_encoding -%><br />
25
+ <%= f.radio_button :user_encoding, 'auto_detect', :checked => 'checked' %>
26
+ <%= f.label :user_encoding, t('import.auto_detect'), :value => 'auto_detect' %>
27
+ <%= f.radio_button :user_encoding, 'utf-8' %>
28
+ <%= f.label :user_encoding, 'UTF-8', :value => 'utf-8' %>
29
+ <%= f.radio_button :user_encoding, 'shift_jis' %>
30
+ <%= f.label :user_encoding, 'Shift_JIS', :value => 'shift_jis' %>
31
+ <%= f.radio_button :user_encoding, 'euc-ho' %>
32
+ <%= f.label :user_encoding, 'EUC-JP', :value => 'euc-jp' %>
33
+ </div>
34
+
23
35
  <div class="actions">
24
- <%= f.submit %>
36
+ <%= f.hidden_field :mode, value: 'import' %>
37
+ <%= f.submit t('page.start_import') %>
25
38
  </div>
26
39
  <%- end -%>
27
40
 
28
41
  </div>
29
42
  </div>
30
43
 
31
- <div id="submenu" class="ui-corner-all">
44
+ <div id="submenu" class="ui-corner-all ui-widget-content">
32
45
  <ul>
33
- <li><%= link_to t('page.back'), event_import_files_path -%></li>
46
+ <li><%= back_to_index(flash[:page_info]) %></li>
34
47
  </ul>
35
48
  </div>
@@ -1,4 +1,4 @@
1
- <div id="content_detail" class="ui-corner-all">
1
+ <div id="content_detail" class="ui-corner-all ui-widget-content">
2
2
  <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.event_import_file')) -%></h1>
3
3
  <div id="content_list">
4
4
  <p id="notice"><%= notice %></p>
@@ -43,9 +43,14 @@
43
43
  <%= @event_import_file.edit_mode -%>
44
44
  </p>
45
45
 
46
+ <p>
47
+ <strong><%= t('activerecord.attributes.event_import_file.user_encoding') -%>:</strong>
48
+ <%= @event_import_file.user_encoding -%>
49
+ </p>
50
+
46
51
  <p>
47
52
  <strong><%= t('activerecord.attributes.event_import_file.state') -%>:</strong>
48
- <%= localized_state(@event_import_file.state) -%>
53
+ <%= localized_state(@event_import_file.current_state) -%>
49
54
  </p>
50
55
 
51
56
  <p>
@@ -61,9 +66,14 @@
61
66
  </div>
62
67
  </div>
63
68
 
64
- <div id="submenu" class="ui-corner-all">
69
+ <div id="submenu" class="ui-corner-all ui-widget-content">
70
+ <%= form_for(@event_import_file) do |f| %>
65
71
  <ul>
66
72
  <li><%= link_to t('activerecord.models.event_import_result'), event_import_file_event_import_results_path(@event_import_file) -%></li>
67
73
  <li><%= back_to_index(flash[:page_info]) -%></li>
74
+ <% if current_user.has_role?('Administrator') %>
75
+ <li><%= link_to 'Resque', resque_path %></li>
76
+ <% end %>
68
77
  </ul>
78
+ <% end %>
69
79
  </div>
@@ -1,4 +1,4 @@
1
- <div id="content_detail" class="ui-corner-all">
1
+ <div id="content_detail" class="ui-corner-all ui-widget-content">
2
2
  <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.event_import_result')) -%></h1>
3
3
  <div id="content_list">
4
4
  <% if @event_import_file %>
@@ -35,15 +35,15 @@
35
35
  </div>
36
36
  </div>
37
37
 
38
- <div id="submenu" class="ui-corner-all">
38
+ <div id="submenu" class="ui-corner-all ui-widget-content">
39
39
  <ul>
40
40
  <li>
41
41
  <% if @event_import_file %>
42
- <%= link_to (image_tag 'icons/page_white_excel.png', :size => '16x16', :alt => 'CSV', :class => 'icon'), event_import_file_event_import_results_path(@event_import_file, :format => :csv, :locale => @locale.to_s) -%>
43
- (<%= link_to 'CSV', event_import_file_event_import_results_path(:format => :csv, :locale => @locale.to_s) -%>)
42
+ <%= link_to (image_tag 'icons/page_white_excel.png', :size => '16x16', :alt => 'TSV', :class => 'icon'), event_import_file_event_import_results_path(@event_import_file, :format => :tsv, :locale => @locale.to_s) -%>
43
+ (<%= link_to 'TSV', event_import_file_event_import_results_path(:format => :tsv, :locale => @locale.to_s) -%>)
44
44
  <% else %>
45
- <%= link_to (image_tag 'icons/page_white_excel.png', :size => '16x16', :alt => 'CSV', :class => 'icon'), event_import_results_path(:format => :csv, :locale => @locale.to_s) -%>
46
- (<%= link_to 'CSV', event_import_results_path(:format => :csv, :locale => @locale.to_s) -%>)
45
+ <%= link_to (image_tag 'icons/page_white_excel.png', :size => '16x16', :alt => 'TSV', :class => 'icon'), event_import_results_path(:format => :tsv, :locale => @locale.to_s) -%>
46
+ (<%= link_to 'TSV', event_import_results_path(:format => :tsv, :locale => @locale.to_s) -%>)
47
47
  <% end %>
48
48
  </li>
49
49
  </ul>
@@ -1,4 +1,4 @@
1
- <div id="content_detail" class="ui-corner-all">
1
+ <div id="content_detail" class="ui-corner-all ui-widget-content">
2
2
  <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.event_import_result')) -%></h1>
3
3
  <div id="content_list">
4
4
  <p id="notice"><%= notice %></p>
@@ -26,7 +26,7 @@
26
26
  </div>
27
27
  </div>
28
28
 
29
- <div id="submenu" class="ui-corner-all">
29
+ <div id="submenu" class="ui-corner-all ui-widget-content">
30
30
  <ul>
31
31
  <li><%= back_to_index(flash[:page_info]) -%></li>
32
32
  </ul>
@@ -1,4 +1,4 @@
1
- <div id="content_detail" class="ui-corner-all">
1
+ <div id="content_detail" class="ui-corner-all ui-widget-content">
2
2
  <h1 class="title"><%= t('page.editing', :model => t('activerecord.models.event')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
@@ -6,7 +6,7 @@
6
6
  </div>
7
7
  </div>
8
8
 
9
- <div id="submenu" class="ui-corner-all">
9
+ <div id="submenu" class="ui-corner-all ui-widget-content">
10
10
  <ul>
11
11
  <li><%= link_to t('page.show'), @event -%></li>
12
12
  <li><%= link_to t('page.back'), events_path(:page => flash[:page] ||= nil) -%></li>
@@ -1,4 +1,4 @@
1
- <div id="content_detail" class="ui-corner-all">
1
+ <div id="content_detail" class="ui-corner-all ui-widget-content">
2
2
  <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.event')) -%></h1>
3
3
  <div id="content_list">
4
4
 
@@ -67,7 +67,7 @@
67
67
  </div>
68
68
  </div>
69
69
 
70
- <div id="submenu" class="ui-corner-all">
70
+ <div id="submenu" class="ui-corner-all ui-widget-content">
71
71
  <ul>
72
72
  <li><%= link_to t('page.calendar'), calendar_path -%></li>
73
73
  </ul>
@@ -1,4 +1,4 @@
1
- <div id="content_detail" class="ui-corner-all">
1
+ <div id="content_detail" class="ui-corner-all ui-widget-content">
2
2
  <h1 class="title"><%= t('page.new', :model => t('activerecord.models.event')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
@@ -6,7 +6,7 @@
6
6
  </div>
7
7
  </div>
8
8
 
9
- <div id="submenu" class="ui-corner-all">
9
+ <div id="submenu" class="ui-corner-all ui-widget-content">
10
10
  <ul>
11
11
  <%- if @library -%>
12
12
  <li><%= link_to t('page.back'), library_events_path(@library) -%></li>
@@ -1,4 +1,4 @@
1
- <div id="content_detail" class="ui-corner-all">
1
+ <div id="content_detail" class="ui-corner-all ui-widget-content">
2
2
  <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.event')) -%></h1>
3
3
  <div id="content_list">
4
4
  <p id="notice"><%= notice %></p>
@@ -19,9 +19,14 @@
19
19
 
20
20
  <%- if @event.all_day -%>
21
21
  <p>
22
- <strong><%= t('activerecord.attributes.event.all_day') -%>:</strong>
22
+ <strong><%= t('activerecord.attributes.event.start_at') -%>:</strong>
23
23
  <%= l(@event.start_at, :format => :only_date) -%>
24
24
  </p>
25
+
26
+ <p>
27
+ <strong><%= t('activerecord.attributes.event.end_at') -%>:</strong>
28
+ <%= l(@event.end_at, :format => :only_date) -%>
29
+ </p>
25
30
  <%- else -%>
26
31
  <p>
27
32
  <strong><%= t('activerecord.attributes.event.start_at') -%>:</strong>
@@ -42,7 +47,7 @@
42
47
  </div>
43
48
  </div>
44
49
 
45
- <div id="submenu" class="ui-corner-all">
50
+ <div id="submenu" class="ui-corner-all ui-widget-content">
46
51
  <ul>
47
52
  <li><%= link_to t('page.edit'), edit_event_path(@event) -%></li>
48
53
  <li><%= back_to_index(flash[:page_info]) -%></li>
@@ -1,4 +1,4 @@
1
- <div id="content_detail" class="ui-corner-all">
1
+ <div id="content_detail" class="ui-corner-all ui-widget-content">
2
2
  <h1 class="title"><%= t('page.editing', :model => t('activerecord.models.participate')) -%></h1>
3
3
  <div id="content_list">
4
4
 
@@ -20,7 +20,7 @@
20
20
  </div>
21
21
  </div>
22
22
 
23
- <div id="submenu" class="ui-corner-all">
23
+ <div id="submenu" class="ui-corner-all ui-widget-content">
24
24
  <ul>
25
25
  <li><%= link_to t('page.show'), @participate %></li>
26
26
  <li><%= link_to t('page.back'), participates_path %></li>
@@ -1,4 +1,4 @@
1
- <div id="content_detail" class="ui-corner-all">
1
+ <div id="content_detail" class="ui-corner-all ui-widget-content">
2
2
  <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.participate')) -%></h1>
3
3
  <div id="content_list">
4
4
 
@@ -23,7 +23,7 @@
23
23
  </div>
24
24
  </div>
25
25
 
26
- <div id="submenu" class="ui-corner-all">
26
+ <div id="submenu" class="ui-corner-all ui-widget-content">
27
27
  <ul>
28
28
  <li><%= link_to t('page.new', :model => t('activerecord.models.participate')), new_participate_path -%></li>
29
29
  </ul>
@@ -1,4 +1,4 @@
1
- <div id="content_detail" class="ui-corner-all">
1
+ <div id="content_detail" class="ui-corner-all ui-widget-content">
2
2
  <h1 class="title"><%= t('page.new', :model => t('activerecord.models.participate')) -%></h1>
3
3
  <div id="content_list">
4
4
 
@@ -20,7 +20,7 @@
20
20
  </div>
21
21
  </div>
22
22
 
23
- <div id="submenu" class="ui-corner-all">
23
+ <div id="submenu" class="ui-corner-all ui-widget-content">
24
24
  <ul>
25
25
  <li><%= link_to t('page.back'), participates_path %></li>
26
26
  </ul>
@@ -1,4 +1,4 @@
1
- <div id="content_detail" class="ui-corner-all">
1
+ <div id="content_detail" class="ui-corner-all ui-widget-content">
2
2
  <h1 class="title"><%= t('page.showing', :model => t('activerecord.models.participate')) -%></h1>
3
3
  <div id="content_list">
4
4
  <p id="notice"><%= notice %></p>
@@ -16,7 +16,7 @@
16
16
  </div>
17
17
  </div>
18
18
 
19
- <div id="submenu" class="ui-corner-all">
19
+ <div id="submenu" class="ui-corner-all ui-widget-content">
20
20
  <ul>
21
21
  <li><%= link_to t('page.edit'), edit_participate_path(@participate) %></li>
22
22
  <li><%= back_to_index(flash[:page_info]) %></li>
@@ -0,0 +1,7 @@
1
+ class EventImportFileQueue
2
+ @queue = :event_import_file
3
+
4
+ def self.perform(event_import_file_id)
5
+ EventImportFile.find(event_import_file_id).import_start
6
+ end
7
+ end
@@ -32,6 +32,7 @@ en:
32
32
  state: State
33
33
  edit_mode: Edit mode
34
34
  error_message: Error message
35
+ user_encoding: Encoding
35
36
  event_import_result:
36
37
  body: Body
37
38
 
@@ -32,6 +32,7 @@ ja:
32
32
  state: 状態
33
33
  edit_mode: 編集モード
34
34
  error_message: エラーメッセージ
35
+ user_encoding: 文字コード
35
36
  event_import_result:
36
37
  body: 本文
37
38
 
@@ -7,7 +7,6 @@ class CreateEventImportFiles < ActiveRecord::Migration
7
7
  t.integer :user_id
8
8
  t.text :note
9
9
  t.datetime :imported_at
10
- t.string :state
11
10
  t.string :event_import_file_name
12
11
  t.string :event_import_content_type
13
12
  t.integer :event_import_file_size
@@ -18,7 +17,6 @@ class CreateEventImportFiles < ActiveRecord::Migration
18
17
  end
19
18
  add_index :event_import_files, :parent_id
20
19
  add_index :event_import_files, :user_id
21
- add_index :event_import_files, :state
22
20
  end
23
21
 
24
22
  def self.down
@@ -0,0 +1,14 @@
1
+ class CreateEventImportFileTransitions < ActiveRecord::Migration
2
+ def change
3
+ create_table :event_import_file_transitions do |t|
4
+ t.string :to_state
5
+ t.text :metadata, default: "{}"
6
+ t.integer :sort_key
7
+ t.integer :event_import_file_id
8
+ t.timestamps
9
+ end
10
+
11
+ add_index :event_import_file_transitions, :event_import_file_id
12
+ add_index :event_import_file_transitions, [:sort_key, :event_import_file_id], unique: true, name: "index_event_import_file_transitions_on_sort_key_and_file_id"
13
+ end
14
+ end
@@ -0,0 +1,5 @@
1
+ class AddUserEncodingToEventImportFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :event_import_files, :user_encoding, :string
4
+ end
5
+ end
@@ -2,7 +2,7 @@ require "enju_seed"
2
2
  require "inherited_resources"
3
3
  require "has_scope"
4
4
  require "paperclip"
5
- require "state_machine"
5
+ require "statesman"
6
6
  require "ri_cal"
7
7
  require "csv"
8
8
  require "nkf"
@@ -1,3 +1,3 @@
1
1
  module EnjuEvent
2
- VERSION = "0.1.17.pre17"
2
+ VERSION = "0.1.17.pre18"
3
3
  end
@@ -19,13 +19,6 @@ class CreateManifestations < ActiveRecord::Migration
19
19
  t.integer :height
20
20
  t.integer :width
21
21
  t.integer :depth
22
- t.string :isbn
23
- t.string :isbn10
24
- t.string :wrong_isbn
25
- t.string :nbn
26
- t.string :lccn
27
- t.string :oclc_number
28
- t.string :issn
29
22
  t.integer :price # TODO: 通貨単位
30
23
  t.text :fulltext
31
24
  t.string :volume_number_list
@@ -43,11 +36,6 @@ class CreateManifestations < ActiveRecord::Migration
43
36
  end
44
37
  add_index :manifestations, :carrier_type_id
45
38
  add_index :manifestations, :required_role_id
46
- add_index :manifestations, :isbn
47
- add_index :manifestations, :nbn
48
- add_index :manifestations, :lccn
49
- add_index :manifestations, :oclc_number
50
- add_index :manifestations, :issn
51
39
  add_index :manifestations, :access_address
52
40
  add_index :manifestations, :frequency_id
53
41
  add_index :manifestations, :manifestation_identifier
@@ -1,7 +1,7 @@
1
1
  class CreateItems < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :items do |t|
4
- #t.integer :manifestation_id
4
+ t.integer :manifestation_id
5
5
  t.string :call_number
6
6
  t.string :item_identifier
7
7
  t.timestamps
@@ -16,7 +16,7 @@ class CreateItems < ActiveRecord::Migration
16
16
  t.string :state
17
17
  t.integer :required_score, :default => 0, :null => false
18
18
  end
19
- #add_index :items, :manifestation_id
19
+ add_index :items, :manifestation_id
20
20
  add_index :items, :shelf_id
21
21
  add_index :items, :item_identifier
22
22
  add_index :items, :required_role_id
@@ -0,0 +1,27 @@
1
+ class CreateSubjects < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :subjects do |t|
4
+ t.integer :parent_id
5
+ t.integer :use_term_id
6
+ t.string :term
7
+ t.text :term_transcription
8
+ t.integer :subject_type_id, :null => false
9
+ t.text :scope_note
10
+ t.text :note
11
+ t.integer :required_role_id, :default => 1, :null => false
12
+ t.integer :lock_version, :default => 0, :null => false
13
+ t.datetime :created_at
14
+ t.datetime :updated_at
15
+ t.datetime :deleted_at
16
+ end
17
+ add_index :subjects, :term
18
+ add_index :subjects, :parent_id
19
+ add_index :subjects, :use_term_id
20
+ add_index :subjects, :subject_type_id
21
+ add_index :subjects, :required_role_id
22
+ end
23
+
24
+ def self.down
25
+ drop_table :subjects
26
+ end
27
+ end