enju_circulation 0.1.0.pre35 → 0.1.0.pre36

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/manifestation_checkout_stats_controller.rb +3 -0
  3. data/app/controllers/manifestation_reserve_stats_controller.rb +3 -0
  4. data/app/controllers/user_checkout_stats_controller.rb +3 -0
  5. data/app/controllers/user_reserve_stats_controller.rb +3 -0
  6. data/app/models/manifestation_checkout_stat.rb +22 -12
  7. data/app/models/manifestation_checkout_stat_state_machine.rb +18 -0
  8. data/app/models/manifestation_checkout_stat_transition.rb +7 -0
  9. data/app/models/manifestation_reserve_stat.rb +22 -12
  10. data/app/models/manifestation_reserve_stat_state_machine.rb +18 -0
  11. data/app/models/manifestation_reserve_stat_transition.rb +7 -0
  12. data/app/models/user_checkout_stat.rb +23 -13
  13. data/app/models/user_checkout_stat_state_machine.rb +18 -0
  14. data/app/models/user_checkout_stat_transition.rb +7 -0
  15. data/app/models/user_reserve_stat.rb +23 -13
  16. data/app/models/user_reserve_stat_state_machine.rb +18 -0
  17. data/app/models/user_reserve_stat_transition.rb +7 -0
  18. data/app/views/carrier_type_has_checkout_types/edit.html.erb +2 -2
  19. data/app/views/carrier_type_has_checkout_types/index.html.erb +12 -5
  20. data/app/views/carrier_type_has_checkout_types/new.html.erb +2 -2
  21. data/app/views/carrier_type_has_checkout_types/show.html.erb +5 -3
  22. data/app/views/checked_items/index.html.erb +2 -2
  23. data/app/views/checked_items/new.html.erb +2 -2
  24. data/app/views/checked_items/show.html.erb +2 -2
  25. data/app/views/checkins/edit.html.erb +2 -2
  26. data/app/views/checkins/index.html.erb +2 -2
  27. data/app/views/checkins/new.html.erb +2 -2
  28. data/app/views/checkins/show.html.erb +2 -2
  29. data/app/views/checkout_stat_has_manifestations/edit.html.erb +2 -2
  30. data/app/views/checkout_stat_has_manifestations/index.html.erb +2 -2
  31. data/app/views/checkout_stat_has_manifestations/new.html.erb +2 -2
  32. data/app/views/checkout_stat_has_manifestations/show.html.erb +2 -2
  33. data/app/views/checkout_stat_has_users/edit.html.erb +2 -2
  34. data/app/views/checkout_stat_has_users/index.html.erb +2 -2
  35. data/app/views/checkout_stat_has_users/new.html.erb +2 -2
  36. data/app/views/checkout_stat_has_users/show.html.erb +2 -2
  37. data/app/views/checkout_types/edit.html.erb +2 -2
  38. data/app/views/checkout_types/index.html.erb +2 -2
  39. data/app/views/checkout_types/new.html.erb +2 -2
  40. data/app/views/checkout_types/show.html.erb +2 -2
  41. data/app/views/checkouts/_index.html.erb +2 -2
  42. data/app/views/checkouts/_index_item.html.erb +2 -2
  43. data/app/views/checkouts/_index_overdue.html.erb +2 -2
  44. data/app/views/checkouts/_index_user.html.erb +2 -2
  45. data/app/views/checkouts/edit.html.erb +2 -2
  46. data/app/views/checkouts/show.html.erb +2 -2
  47. data/app/views/circulation_statuses/edit.html.erb +2 -2
  48. data/app/views/circulation_statuses/index.html.erb +2 -2
  49. data/app/views/circulation_statuses/new.html.erb +2 -2
  50. data/app/views/circulation_statuses/show.html.erb +2 -2
  51. data/app/views/item_has_use_restrictions/show.html.erb +2 -2
  52. data/app/views/lending_policies/edit.html.erb +2 -2
  53. data/app/views/lending_policies/index.html.erb +2 -2
  54. data/app/views/lending_policies/new.html.erb +2 -2
  55. data/app/views/lending_policies/show.html.erb +2 -2
  56. data/app/views/manifestation_checkout_stats/_form.html.erb +2 -1
  57. data/app/views/manifestation_checkout_stats/edit.html.erb +2 -2
  58. data/app/views/manifestation_checkout_stats/index.html.erb +3 -3
  59. data/app/views/manifestation_checkout_stats/new.html.erb +2 -2
  60. data/app/views/manifestation_checkout_stats/show.html.erb +5 -3
  61. data/app/views/manifestation_reserve_stats/_form.html.erb +2 -1
  62. data/app/views/manifestation_reserve_stats/edit.html.erb +2 -2
  63. data/app/views/manifestation_reserve_stats/index.html.erb +3 -3
  64. data/app/views/manifestation_reserve_stats/new.html.erb +2 -2
  65. data/app/views/manifestation_reserve_stats/show.html.erb +5 -3
  66. data/app/views/reserve_stat_has_manifestations/edit.html.erb +2 -2
  67. data/app/views/reserve_stat_has_manifestations/index.html.erb +2 -2
  68. data/app/views/reserve_stat_has_manifestations/new.html.erb +2 -2
  69. data/app/views/reserve_stat_has_manifestations/show.html.erb +2 -2
  70. data/app/views/reserve_stat_has_users/edit.html.erb +2 -2
  71. data/app/views/reserve_stat_has_users/index.html.erb +2 -2
  72. data/app/views/reserve_stat_has_users/new.html.erb +2 -2
  73. data/app/views/reserve_stat_has_users/show.html.erb +2 -2
  74. data/app/views/reserves/_new.html.erb +2 -2
  75. data/app/views/reserves/_new_user.html.erb +2 -2
  76. data/app/views/reserves/edit.html.erb +2 -2
  77. data/app/views/reserves/index.html.erb +3 -3
  78. data/app/views/reserves/show.html.erb +2 -2
  79. data/app/views/use_restrictions/edit.html.erb +2 -2
  80. data/app/views/use_restrictions/index.html.erb +2 -2
  81. data/app/views/use_restrictions/new.html.erb +2 -2
  82. data/app/views/use_restrictions/show.html.erb +2 -2
  83. data/app/views/user_checkout_stats/_form.html.erb +2 -1
  84. data/app/views/user_checkout_stats/edit.html.erb +2 -2
  85. data/app/views/user_checkout_stats/index.html.erb +3 -3
  86. data/app/views/user_checkout_stats/new.html.erb +2 -2
  87. data/app/views/user_checkout_stats/show.html.erb +5 -3
  88. data/app/views/user_group_has_checkout_types/edit.html.erb +2 -2
  89. data/app/views/user_group_has_checkout_types/index.html.erb +11 -5
  90. data/app/views/user_group_has_checkout_types/new.html.erb +2 -2
  91. data/app/views/user_group_has_checkout_types/show.html.erb +5 -3
  92. data/app/views/user_reserve_stats/_form.html.erb +2 -1
  93. data/app/views/user_reserve_stats/edit.html.erb +2 -2
  94. data/app/views/user_reserve_stats/index.html.erb +3 -3
  95. data/app/views/user_reserve_stats/new.html.erb +2 -2
  96. data/app/views/user_reserve_stats/show.html.erb +5 -3
  97. data/app/workers/manifestation_checkout_stat_queue.rb +7 -0
  98. data/app/workers/manifestation_reserve_stat_queue.rb +7 -0
  99. data/app/workers/user_checkout_stat_queue.rb +7 -0
  100. data/app/workers/user_reserve_stat_queue.rb +7 -0
  101. data/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +14 -0
  102. data/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +14 -0
  103. data/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +14 -0
  104. data/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +14 -0
  105. data/lib/enju_circulation/engine.rb +1 -0
  106. data/lib/enju_circulation/version.rb +1 -1
  107. data/lib/generators/enju_circulation/setup/setup_generator.rb +7 -0
  108. data/lib/generators/enju_circulation/setup/templates/config/schedule.rb +0 -4
  109. data/spec/controllers/checked_items_controller_spec.rb +7 -7
  110. data/spec/controllers/checkins_controller_spec.rb +3 -3
  111. data/spec/controllers/checkouts_controller_spec.rb +4 -4
  112. data/spec/controllers/reserves_controller_spec.rb +5 -5
  113. data/spec/dummy/config/initializers/statesman.rb +3 -0
  114. data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +11 -0
  115. data/spec/dummy/db/schema.rb +50 -2
  116. data/spec/dummy/db/test.sqlite3 +0 -0
  117. data/spec/models/checked_item_spec.rb +1 -1
  118. data/spec/models/checkout_spec.rb +5 -5
  119. data/spec/models/manifestation_checkout_stat_spec.rb +5 -1
  120. data/spec/models/manifestation_reserve_stat_spec.rb +5 -1
  121. data/spec/models/reserve_spec.rb +11 -11
  122. data/spec/models/user_checkout_stat_spec.rb +5 -1
  123. data/spec/models/user_group_has_checkout_type_spec.rb +2 -2
  124. data/spec/models/user_reserve_stat_spec.rb +5 -1
  125. data/spec/spec_helper.rb +3 -0
  126. data/spec/support/resque.rb +30 -0
  127. metadata +74 -120
  128. data/spec/dummy/db/development.sqlite3 +0 -0
  129. data/spec/dummy/solr/conf/admin-extra.html +0 -31
  130. data/spec/dummy/solr/conf/elevate.xml +0 -36
  131. data/spec/dummy/solr/conf/mapping-ISOLatin1Accent.txt +0 -246
  132. data/spec/dummy/solr/conf/protwords.txt +0 -21
  133. data/spec/dummy/solr/conf/schema.xml +0 -255
  134. data/spec/dummy/solr/conf/scripts.conf +0 -24
  135. data/spec/dummy/solr/conf/solrconfig.xml +0 -667
  136. data/spec/dummy/solr/conf/spellings.txt +0 -2
  137. data/spec/dummy/solr/conf/stopwords.txt +0 -58
  138. data/spec/dummy/solr/conf/synonyms.txt +0 -31
  139. data/spec/dummy/solr/default/data/index/_6ox.fdt +0 -0
  140. data/spec/dummy/solr/default/data/index/_6ox.fdx +0 -0
  141. data/spec/dummy/solr/default/data/index/_6ox.fnm +0 -0
  142. data/spec/dummy/solr/default/data/index/_6ox.nvd +0 -0
  143. data/spec/dummy/solr/default/data/index/_6ox.nvm +0 -0
  144. data/spec/dummy/solr/default/data/index/_6ox.si +0 -0
  145. data/spec/dummy/solr/default/data/index/_6ox_Lucene41_0.doc +0 -0
  146. data/spec/dummy/solr/default/data/index/_6ox_Lucene41_0.pos +0 -0
  147. data/spec/dummy/solr/default/data/index/_6ox_Lucene41_0.tim +0 -0
  148. data/spec/dummy/solr/default/data/index/_6ox_Lucene41_0.tip +0 -0
  149. data/spec/dummy/solr/default/data/index/segments.gen +0 -0
  150. data/spec/dummy/solr/default/data/index/segments_ajk +0 -0
  151. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000013653 +0 -0
  152. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000013654 +0 -0
  153. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000013655 +0 -0
  154. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000013656 +0 -0
  155. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000013657 +0 -0
  156. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000013658 +0 -0
  157. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000013659 +0 -0
  158. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000013660 +0 -0
  159. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000013661 +0 -0
  160. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000013662 +0 -0
  161. data/spec/dummy/solr/development/data/index/segments.gen +0 -0
  162. data/spec/dummy/solr/development/data/index/segments_1 +0 -0
  163. data/spec/dummy/solr/solr.xml +0 -8
  164. data/spec/dummy/solr/test/data/index/segments.gen +0 -0
  165. data/spec/dummy/solr/test/data/index/segments_1 +0 -0
  166. data/spec/dummy/tmp/cache/assets/test/sprockets/0440b81b0aae840cf287a686585a8cec +0 -0
  167. data/spec/dummy/tmp/cache/assets/test/sprockets/1572dfd6f1e555f4be1aa60ddc3cb0c0 +0 -0
  168. data/spec/dummy/tmp/cache/assets/test/sprockets/2ffe508d0533d0afd2a37bb574eda40d +0 -0
  169. data/spec/dummy/tmp/cache/assets/test/sprockets/49d32c13d390c1b80d8b2705aac86579 +0 -0
  170. data/spec/dummy/tmp/cache/assets/test/sprockets/4aa18096a209e515f5f1df487622cdf4 +0 -0
  171. data/spec/dummy/tmp/cache/assets/test/sprockets/6fcdd2234a7c25f9d4179ca12fd9f7b4 +0 -0
  172. data/spec/dummy/tmp/cache/assets/test/sprockets/aa2e1ada35daa496bb08e85fcb817536 +0 -0
  173. data/spec/dummy/tmp/cache/assets/test/sprockets/c1ab0ecf3cf57db41d9e4cd9306d8829 +0 -0
  174. data/spec/dummy/tmp/cache/assets/test/sprockets/e9738177de2083b68d42e053a1529244 +0 -0
  175. data/spec/dummy/tmp/cache/assets/test/sprockets/e9ce2df3f0160329df69b22a911dbd04 +0 -0
@@ -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.reserve_stat_has_manifestation')) -%></h1>
3
3
  <div id="content_list">
4
4
  <p id="notice"><%= notice %></p>
@@ -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.edit'), edit_reserve_stat_has_manifestation_path(@reserve_stat_has_manifestation) -%></li>
26
26
  <li><%= back_to_index(flash[:page_info]) -%></li>
@@ -1,11 +1,11 @@
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.reserve_stat_has_user')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>
6
6
  </div>
7
7
 
8
- <div id="submenu" class="ui-corner-all">
8
+ <div id="submenu" class="ui-corner-all ui-widget-content">
9
9
  <ul>
10
10
  <li><%= link_to t('page.show'), @reserve_stat_has_user -%></li>
11
11
  <li><%= link_to t('page.back'), reserve_stat_has_users_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('activerecord.models.reserve_stat_has_user') -%></h1>
3
3
  <div id="content_list">
4
4
 
@@ -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><%= link_to t('page.new', :model => t('activerecord.models.reserve_stat_has_user')), new_reserve_stat_has_user_path -%></li>
32
32
  </ul>
@@ -1,11 +1,11 @@
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.reserve_stat_has_user')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>
6
6
  </div>
7
7
 
8
- <div id="submenu" class="ui-corner-all">
8
+ <div id="submenu" class="ui-corner-all ui-widget-content">
9
9
  <ul>
10
10
  <li><%= link_to t('page.back'), reserve_stat_has_users_path -%></li>
11
11
  </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.reserve_stat_has_user')) -%></h1>
3
3
  <div id="content_list">
4
4
  <p id="notice"><%= notice %></p>
@@ -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.edit'), edit_reserve_stat_has_user_path(@reserve_stat_has_user) -%></li>
26
26
  <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.new', :model => t('activerecord.models.reserve')) -%></h1>
3
3
  <div id="content_list">
4
4
 
@@ -37,7 +37,7 @@
37
37
  </div>
38
38
  </div>
39
39
 
40
- <div id="submenu" class="ui-corner-all">
40
+ <div id="submenu" class="ui-corner-all ui-widget-content">
41
41
  <%= render 'manifestations/book_jacket', :manifestation => @reserve.manifestation -%>
42
42
  <ul>
43
43
  <li><%= link_to t('page.listing', :model => t('activerecord.models.reserve')), reserves_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.new', :model => t('activerecord.models.reserve')) -%></h1>
3
3
  <div id="content_list">
4
4
 
@@ -39,7 +39,7 @@
39
39
  </div>
40
40
  </div>
41
41
 
42
- <div id="submenu" class="ui-corner-all">
42
+ <div id="submenu" class="ui-corner-all ui-widget-content">
43
43
  <%= render 'manifestations/book_jacket', :manifestation => @reserve.manifestation -%>
44
44
  <ul>
45
45
  <li><%= link_to t('page.listing', :model => t('activerecord.models.reserve')), user_reserves_path(@reserve.user) -%></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.reserve')) -%></h1>
3
3
  <div id="content_list">
4
4
 
@@ -57,7 +57,7 @@
57
57
  </div>
58
58
  </div>
59
59
 
60
- <div id="submenu" class="ui-corner-all">
60
+ <div id="submenu" class="ui-corner-all ui-widget-content">
61
61
  <ul>
62
62
  <li><%= link_to t('page.show'), @reserve -%></li>
63
63
  <li><%= link_to t('page.back'), :back -%></li>
@@ -1,5 +1,5 @@
1
1
  <div style="color: red"><%= flash[:message] -%></div>
2
- <div id="content_detail" class="ui-corner-all">
2
+ <div id="content_detail" class="ui-corner-all ui-widget-content">
3
3
  <h1 class="title"><%= t('page.listing', :model => t('activerecord.models.reserve')) -%></h1>
4
4
  <div id="content_list">
5
5
 
@@ -32,7 +32,7 @@
32
32
 
33
33
  <table class="table table-striped index">
34
34
  <tr>
35
- <th style="width: 30px">ID</th>
35
+ <th style="width: 30px">Id</th>
36
36
  <th><%= t('activerecord.models.manifestation') -%></th>
37
37
  <th style="width: 80px"><%= t('activerecord.attributes.reserve.state') -%></th>
38
38
  <%- if can? :update, @reserves.first -%>
@@ -79,7 +79,7 @@
79
79
  </div>
80
80
  </div>
81
81
 
82
- <div id="submenu" class="ui-corner-all">
82
+ <div id="submenu" class="ui-corner-all ui-widget-content">
83
83
  <ul>
84
84
  <li>
85
85
  <%= link_to t('page.new', :model => t('activerecord.models.reserve')), manifestations_path(:reservable => true) -%>
@@ -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.reserve')) -%></h1>
3
3
  <div id="content_list">
4
4
  <p id="notice"><%= notice %></p>
@@ -59,7 +59,7 @@
59
59
  </div>
60
60
  </div>
61
61
 
62
- <div id="submenu" class="ui-corner-all">
62
+ <div id="submenu" class="ui-corner-all ui-widget-content">
63
63
  <%= render 'manifestations/book_jacket', :manifestation => @reserve.manifestation if @reserve.manifestation -%>
64
64
  <ul>
65
65
  <li><%= link_to t('page.edit'), edit_reserve_path(@reserve) -%></li>
@@ -1,11 +1,11 @@
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.use_restriction')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>
6
6
  </div>
7
7
 
8
- <div id="submenu" class="ui-corner-all">
8
+ <div id="submenu" class="ui-corner-all ui-widget-content">
9
9
  <ul>
10
10
  <li><%= link_to t('page.show'), @use_restriction -%></li>
11
11
  <li><%= link_to t('page.back'), use_restrictions_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.use_restriction')) -%></h1>
3
3
  <div id="content_list">
4
4
 
@@ -34,7 +34,7 @@
34
34
  </div>
35
35
  </div>
36
36
 
37
- <div id="submenu" class="ui-corner-all">
37
+ <div id="submenu" class="ui-corner-all ui-widget-content">
38
38
  <ul>
39
39
  <%- if can? :create, UseRestriction -%>
40
40
  <li><%= link_to t('page.new', :model => t('activerecord.models.use_restriction')), new_use_restriction_path -%></li >
@@ -1,11 +1,11 @@
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.use_restriction')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>
6
6
  </div>
7
7
 
8
- <div id="submenu" class="ui-corner-all">
8
+ <div id="submenu" class="ui-corner-all ui-widget-content">
9
9
  <ul>
10
10
  <li><%= link_to t('page.back'), use_restrictions_path -%></li>
11
11
  </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.use_restriction')) -%></h1>
3
3
  <div id="content_list">
4
4
  <p id="notice"><%= notice %></p>
@@ -21,7 +21,7 @@
21
21
  </div>
22
22
  </div>
23
23
 
24
- <div id="submenu" class="ui-corner-all">
24
+ <div id="submenu" class="ui-corner-all ui-widget-content">
25
25
  <ul>
26
26
  <li><%= link_to t('page.edit'), edit_use_restriction_path(@use_restriction) -%></li>
27
27
  <li><%= back_to_index(flash[:page_info]) -%></li>
@@ -14,6 +14,7 @@
14
14
  <%= f.text_area :note -%>
15
15
  </div>
16
16
  <div class="actions">
17
- <%= f.submit %>
17
+ <%= f.hidden_field :mode, value: 'import' %>
18
+ <%= f.submit t('page.start_import') %>
18
19
  </div>
19
20
  <%- end -%>
@@ -1,11 +1,11 @@
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.user_checkout_stat')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>
6
6
  </div>
7
7
 
8
- <div id="submenu" class="ui-corner-all">
8
+ <div id="submenu" class="ui-corner-all ui-widget-content">
9
9
  <ul>
10
10
  <li><%= link_to t('page.show'), @user_checkout_stat -%></li>
11
11
  <li><%= link_to t('page.back'), user_checkout_stats_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.user_checkout_stat')) -%></h1>
3
3
  <div id="content_list">
4
4
 
@@ -14,7 +14,7 @@
14
14
  <tr class="line<%= cycle("0", "1") -%>">
15
15
  <td><%= l(user_checkout_stat.start_date) -%></td>
16
16
  <td><%= l(user_checkout_stat.end_date) -%></td>
17
- <td><%= user_checkout_stat.state -%></td>
17
+ <td><%= localized_state(user_checkout_stat.current_state) -%></td>
18
18
  <td>
19
19
  <%= link_to t('page.show'), user_checkout_stat -%>
20
20
  <%= link_to t('page.edit'), edit_user_checkout_stat_path(user_checkout_stat) -%>
@@ -28,7 +28,7 @@
28
28
  </div>
29
29
  </div>
30
30
 
31
- <div id="submenu" class="ui-corner-all">
31
+ <div id="submenu" class="ui-corner-all ui-widget-content">
32
32
  <ul>
33
33
  <li><%= link_to t('page.new', :model => t('activerecord.models.user_checkout_stat')), new_user_checkout_stat_path -%></li>
34
34
  </ul>
@@ -1,11 +1,11 @@
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.user_checkout_stat')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>
6
6
  </div>
7
7
 
8
- <div id="submenu" class="ui-corner-all">
8
+ <div id="submenu" class="ui-corner-all ui-widget-content">
9
9
  <ul>
10
10
  <li><%= link_to t('page.back'), user_checkout_stats_path -%></li>
11
11
  </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.user_checkout_stat')) -%></h1>
3
3
  <div id="content_list">
4
4
  <p id="notice"><%= notice %></p>
@@ -15,7 +15,7 @@
15
15
 
16
16
  <p>
17
17
  <strong><%= t('activerecord.attributes.user_checkout_stat.state') -%>:</strong>
18
- <%= @user_checkout_stat.state -%>
18
+ <%= localized_state(@user_checkout_stat.current_state) -%>
19
19
  </p>
20
20
 
21
21
  <p>
@@ -43,11 +43,13 @@
43
43
  </div>
44
44
  </div>
45
45
 
46
- <div id="submenu" class="ui-corner-all">
46
+ <div id="submenu" class="ui-corner-all ui-widget-content">
47
+ <%= form_for(@user_checkout_stat) do |f| %>
47
48
  <ul>
48
49
  <li><%= link_to t('page.edit'), edit_user_checkout_stat_path(@user_checkout_stat) -%></li>
49
50
  <li><%= back_to_index(flash[:page_info]) -%></li>
50
51
  </ul>
52
+ <% end %>
51
53
  <h4><%= t('page.export') -%></h4>
52
54
  <ul>
53
55
  <li><%= link_to 'CSV', user_checkout_stat_path(@user_checkout_stat, :format => :csv, :locale => @locale.to_s) -%></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.user_group_has_checkout_type')) -%></h1>
3
3
  <div id="content_list">
4
4
 
@@ -55,7 +55,7 @@
55
55
  </div>
56
56
  </div>
57
57
 
58
- <div id="submenu" class="ui-corner-all">
58
+ <div id="submenu" class="ui-corner-all ui-widget-content">
59
59
  <ul>
60
60
  <li><%= link_to t('page.show'), @user_group_has_checkout_type -%></li>
61
61
  <li><%= link_to t('page.back'), user_group_has_checkout_types_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.user_group_has_checkout_type')) -%></h1>
3
3
  <div id="content_list">
4
4
 
@@ -15,8 +15,12 @@
15
15
  <td><%= link_to user_group_has_checkout_type.checkout_type.display_name.localize.localize, user_group_has_checkout_type.checkout_type -%></td>
16
16
  <td>
17
17
  <%= link_to t('page.show'), user_group_has_checkout_type -%>
18
- <%= link_to t('page.edit'), edit_user_group_has_checkout_type_path(user_group_has_checkout_type) -%>
19
- <%= link_to t('page.destroy'), user_group_has_checkout_type, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
18
+ <%- if can? :update, user_group_has_checkout_type -%>
19
+ <%= link_to t('page.edit'), edit_user_group_has_checkout_type_path(user_group_has_checkout_type) -%>
20
+ <% end %>
21
+ <%- if can? :delete, user_group_has_checkout_type -%>
22
+ <%= link_to t('page.destroy'), user_group_has_checkout_type, :data => {:confirm => t('page.are_you_sure')}, :method => :delete -%>
23
+ <% end %>
20
24
  </td>
21
25
  </tr>
22
26
  <%- end -%>
@@ -25,8 +29,10 @@
25
29
  </div>
26
30
  </div>
27
31
 
28
- <div id="submenu" class="ui-corner-all">
32
+ <div id="submenu" class="ui-corner-all ui-widget-content">
29
33
  <ul>
30
- <li><%= link_to t('page.new', :model => t('activerecord.models.user_group_has_checkout_type')), new_user_group_has_checkout_type_path -%></li>
34
+ <%- if can? :create, UserGroupHasCheckoutType -%>
35
+ <li><%= link_to t('page.new', :model => t('activerecord.models.user_group_has_checkout_type')), new_user_group_has_checkout_type_path -%></li>
36
+ <% end %>
31
37
  </ul>
32
38
  </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.new', :model => t('activerecord.models.user_group_has_checkout_type')) -%></h1>
3
3
  <div id="content_list">
4
4
 
@@ -55,7 +55,7 @@
55
55
  </div>
56
56
  </div>
57
57
 
58
- <div id="submenu" class="ui-corner-all">
58
+ <div id="submenu" class="ui-corner-all ui-widget-content">
59
59
  <ul>
60
60
  <li><%= link_to t('page.back'), user_group_has_checkout_types_path -%></li>
61
61
  </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.user_group_has_checkout_type')) -%></h1>
3
3
  <div id="content_list">
4
4
  <p id="notice"><%= notice %></p>
@@ -56,9 +56,11 @@
56
56
  </div>
57
57
  </div>
58
58
 
59
- <div id="submenu" class="ui-corner-all">
59
+ <div id="submenu" class="ui-corner-all ui-widget-content">
60
60
  <ul>
61
- <li><%= link_to t('page.edit'), edit_user_group_has_checkout_type_path(@user_group_has_checkout_type) -%></li>
61
+ <% if can?(:update, @user_group_has_checkout_type) %>
62
+ <li><%= link_to t('page.edit'), edit_user_group_has_checkout_type_path(@user_group_has_checkout_type) -%></li>
63
+ <% end %>
62
64
  <li><%= back_to_index(flash[:page_info]) -%></li>
63
65
  </ul>
64
66
  </div>
@@ -14,6 +14,7 @@
14
14
  <%= f.text_area :note -%>
15
15
  </div>
16
16
  <div class="actions">
17
- <%= f.submit %>
17
+ <%= f.hidden_field :mode, value: 'import' %>
18
+ <%= f.submit t('page.start_import') %>
18
19
  </div>
19
20
  <%- end -%>
@@ -1,11 +1,11 @@
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.user_reserve_stat')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>
6
6
  </div>
7
7
 
8
- <div id="submenu" class="ui-corner-all">
8
+ <div id="submenu" class="ui-corner-all ui-widget-content">
9
9
  <ul>
10
10
  <li><%= link_to t('page.show'), @user_reserve_stat -%></li>
11
11
  <li><%= link_to t('page.back'), user_reserve_stats_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.user_reserve_stat')) -%></h1>
3
3
  <div id="content_list">
4
4
 
@@ -14,7 +14,7 @@
14
14
  <tr class="line<%= cycle("0", "1") -%>">
15
15
  <td><%= l(user_reserve_stat.start_date) -%></td>
16
16
  <td><%= l(user_reserve_stat.end_date) -%></td>
17
- <td><%= user_reserve_stat.state -%></td>
17
+ <td><%= localized_state(user_reserve_stat.current_state) -%></td>
18
18
  <td>
19
19
  <%= link_to t('page.show'), user_reserve_stat -%>
20
20
  <%= link_to t('page.edit'), edit_user_reserve_stat_path(user_reserve_stat) -%>
@@ -28,7 +28,7 @@
28
28
  </div>
29
29
  </div>
30
30
 
31
- <div id="submenu" class="ui-corner-all">
31
+ <div id="submenu" class="ui-corner-all ui-widget-content">
32
32
  <ul>
33
33
  <li><%= link_to t('page.new', :model => t('activerecord.models.user_reserve_stat')), new_user_reserve_stat_path -%></li>
34
34
  </ul>
@@ -1,11 +1,11 @@
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.user_reserve_stat')) -%></h1>
3
3
  <div id="content_list">
4
4
  <%= render 'form' %>
5
5
  </div>
6
6
  </div>
7
7
 
8
- <div id="submenu" class="ui-corner-all">
8
+ <div id="submenu" class="ui-corner-all ui-widget-content">
9
9
  <ul>
10
10
  <li><%= link_to t('page.back'), user_reserve_stats_path -%></li>
11
11
  </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.user_reserve_stat')) -%></h1>
3
3
  <div id="content_list">
4
4
  <p id="notice"><%= notice %></p>
@@ -15,7 +15,7 @@
15
15
 
16
16
  <p>
17
17
  <strong><%= t('activerecord.attributes.user_reserve_stat.state') -%>:</strong>
18
- <%= @user_reserve_stat.state -%>
18
+ <%= localized_state(@user_reserve_stat.current_state) -%>
19
19
  </p>
20
20
 
21
21
  <p>
@@ -42,11 +42,13 @@
42
42
  </div>
43
43
  </div>
44
44
 
45
- <div id="submenu" class="ui-corner-all">
45
+ <div id="submenu" class="ui-corner-all ui-widget-content">
46
+ <%= form_for(@user_reserve_stat) do |f| %>
46
47
  <ul>
47
48
  <li><%= link_to t('page.edit'), edit_user_reserve_stat_path(@user_reserve_stat) -%></li>
48
49
  <li><%= back_to_index(flash[:page_info]) -%></li>
49
50
  </ul>
51
+ <% end %>
50
52
  <h4><%= t('page.export') -%></h4>
51
53
  <ul>
52
54
  <li><%= link_to 'CSV', user_reserve_stat_path(@user_reserve_stat, :format => :csv, :locale => @locale.to_s) -%></li>
@@ -0,0 +1,7 @@
1
+ class ManifestationCheckoutStatQueue
2
+ @queue = :manifestation_checkout_stat
3
+
4
+ def self.perform(manifestation_checkout_stat_id)
5
+ ManifestationCheckoutStat.find(manifestation_checkout_stat_id).transition_to!(:started)
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ class ManifestationReserveStatQueue
2
+ @queue = :manifestation_reserve_stat
3
+
4
+ def self.perform(manifestation_reserve_stat_id)
5
+ ManifestationReserveStat.find(manifestation_reserve_stat_id).transition_to!(:started)
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ class UserCheckoutStatQueue
2
+ @queue = :user_checkout_stat
3
+
4
+ def self.perform(user_checkout_stat_id)
5
+ UserCheckoutStat.find(user_checkout_stat_id).transition_to!(:started)
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ class UserReserveStatQueue
2
+ @queue = :user_reserve_stat
3
+
4
+ def self.perform(user_reserve_stat_id)
5
+ UserReserveStat.find(user_reserve_stat_id).transition_to!(:started)
6
+ end
7
+ end
@@ -0,0 +1,14 @@
1
+ class CreateUserCheckoutStatTransitions < ActiveRecord::Migration
2
+ def change
3
+ create_table :user_checkout_stat_transitions do |t|
4
+ t.string :to_state
5
+ t.text :metadata, default: "{}"
6
+ t.integer :sort_key
7
+ t.integer :user_checkout_stat_id
8
+ t.timestamps
9
+ end
10
+
11
+ add_index :user_checkout_stat_transitions, :user_checkout_stat_id
12
+ add_index :user_checkout_stat_transitions, [:sort_key, :user_checkout_stat_id], unique: true, name: "index_user_checkout_stat_transitions_on_sort_key_and_stat_id"
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ class CreateUserReserveStatTransitions < ActiveRecord::Migration
2
+ def change
3
+ create_table :user_reserve_stat_transitions do |t|
4
+ t.string :to_state
5
+ t.text :metadata, default: "{}"
6
+ t.integer :sort_key
7
+ t.integer :user_reserve_stat_id
8
+ t.timestamps
9
+ end
10
+
11
+ add_index :user_reserve_stat_transitions, :user_reserve_stat_id
12
+ add_index :user_reserve_stat_transitions, [:sort_key, :user_reserve_stat_id], unique: true, name: "index_user_reserve_stat_transitions_on_sort_key_and_stat_id"
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ class CreateManifestationCheckoutStatTransitions < ActiveRecord::Migration
2
+ def change
3
+ create_table :manifestation_checkout_stat_transitions do |t|
4
+ t.string :to_state
5
+ t.text :metadata, default: "{}"
6
+ t.integer :sort_key
7
+ t.integer :manifestation_checkout_stat_id
8
+ t.timestamps
9
+ end
10
+
11
+ add_index :manifestation_checkout_stat_transitions, :manifestation_checkout_stat_id, name: "index_manifestation_checkout_stat_transitions_on_stat_id"
12
+ add_index :manifestation_checkout_stat_transitions, [:sort_key, :manifestation_checkout_stat_id], unique: true, name: "index_manifestation_checkout_stat_transitions_on_transition"
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ class CreateManifestationReserveStatTransitions < ActiveRecord::Migration
2
+ def change
3
+ create_table :manifestation_reserve_stat_transitions do |t|
4
+ t.string :to_state
5
+ t.text :metadata, default: "{}"
6
+ t.integer :sort_key
7
+ t.integer :manifestation_reserve_stat_id
8
+ t.timestamps
9
+ end
10
+
11
+ add_index :manifestation_reserve_stat_transitions, :manifestation_reserve_stat_id, name: "index_manifestation_reserve_stat_transitions_on_stat_id"
12
+ add_index :manifestation_reserve_stat_transitions, [:sort_key, :manifestation_reserve_stat_id], unique: true, name: "index_manifestation_reserve_stat_transitions_on_transition"
13
+ end
14
+ end
@@ -5,6 +5,7 @@ require "inherited_resources"
5
5
  require "state_machine"
6
6
  require "enju_message"
7
7
  require "enju_event"
8
+ require "statesman"
8
9
 
9
10
  module EnjuCirculation
10
11
  class Engine < ::Rails::Engine
@@ -1,3 +1,3 @@
1
1
  module EnjuCirculation
2
- VERSION = "0.1.0.pre35"
2
+ VERSION = "0.1.0.pre36"
3
3
  end