spree_core 1.3.2 → 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. checksums.yaml +7 -0
  2. data/app/assets/images/credit_cards/icons/diners_club.png +0 -0
  3. data/app/assets/javascripts/admin/address_states.js +1 -1
  4. data/app/assets/javascripts/admin/admin.js.erb +18 -13
  5. data/app/assets/javascripts/admin/calculator.js +2 -2
  6. data/app/assets/javascripts/admin/checkouts/edit.js +3 -1
  7. data/app/assets/javascripts/admin/image_settings.js.erb +5 -5
  8. data/app/assets/javascripts/admin/orders/edit.js +1 -1
  9. data/app/assets/javascripts/admin/payments/new.js +9 -2
  10. data/app/assets/javascripts/admin/spree_core.js +13 -1
  11. data/app/assets/javascripts/admin/taxon_autocomplete.js.erb +2 -1
  12. data/app/assets/javascripts/admin/variant_autocomplete.js.erb +23 -19
  13. data/app/assets/javascripts/spree.js.coffee +37 -0
  14. data/app/assets/javascripts/store/checkout.js.coffee +8 -0
  15. data/app/assets/javascripts/store/product.js.coffee +1 -1
  16. data/app/assets/javascripts/store/spree_core.js +1 -0
  17. data/app/assets/stylesheets/admin/components/_sidebar.scss +7 -6
  18. data/app/assets/stylesheets/admin/components/_states.scss +16 -12
  19. data/app/assets/stylesheets/admin/globals/_variables.scss +102 -96
  20. data/app/assets/stylesheets/admin/shared/_forms.scss +2 -1
  21. data/app/assets/stylesheets/admin/shared/_icons.scss +2 -1
  22. data/app/assets/stylesheets/admin/shared/_layout.scss +4 -1
  23. data/app/assets/stylesheets/admin/shared/_tables.scss +8 -0
  24. data/app/assets/stylesheets/store/screen.css.scss +28 -16
  25. data/app/assets/stylesheets/store/variables.css.scss +4 -2
  26. data/app/controllers/spree/admin/adjustments_controller.rb +7 -3
  27. data/app/controllers/spree/admin/base_controller.rb +10 -5
  28. data/app/controllers/spree/admin/line_items_controller.rb +3 -2
  29. data/app/controllers/spree/admin/orders/customer_details_controller.rb +3 -2
  30. data/app/controllers/spree/admin/orders_controller.rb +2 -2
  31. data/app/controllers/spree/admin/payments_controller.rb +1 -1
  32. data/app/controllers/spree/admin/resource_controller.rb +5 -5
  33. data/app/controllers/spree/admin/shipments_controller.rb +1 -1
  34. data/app/controllers/spree/admin/taxons_controller.rb +1 -1
  35. data/app/controllers/spree/admin/users_controller.rb +96 -0
  36. data/app/controllers/spree/checkout_controller.rb +18 -7
  37. data/app/controllers/spree/locale_controller.rb +1 -1
  38. data/app/controllers/spree/orders_controller.rb +20 -2
  39. data/app/controllers/spree/taxons_controller.rb +8 -2
  40. data/app/helpers/spree/admin/images_helper.rb +6 -2
  41. data/app/helpers/spree/admin/navigation_helper.rb +23 -3
  42. data/app/helpers/spree/base_helper.rb +9 -5
  43. data/app/helpers/spree/orders_helper.rb +13 -0
  44. data/app/helpers/spree/products_helper.rb +9 -4
  45. data/app/mailers/spree/base_mailer.rb +16 -0
  46. data/app/mailers/spree/order_mailer.rb +12 -11
  47. data/app/mailers/spree/shipment_mailer.rb +4 -7
  48. data/app/mailers/spree/test_mailer.rb +2 -3
  49. data/app/models/spree/adjustment.rb +1 -1
  50. data/app/models/spree/app_configuration.rb +9 -3
  51. data/app/models/spree/calculator/default_tax.rb +5 -1
  52. data/app/models/spree/calculator/per_item.rb +1 -1
  53. data/app/models/spree/classification.rb +7 -0
  54. data/app/models/spree/credit_card.rb +1 -5
  55. data/app/models/spree/gateway.rb +10 -2
  56. data/app/models/spree/gateway/bogus.rb +5 -5
  57. data/app/models/spree/inventory_unit.rb +4 -4
  58. data/app/models/spree/line_item.rb +1 -1
  59. data/app/models/spree/order.rb +15 -35
  60. data/app/models/spree/order/checkout.rb +52 -0
  61. data/app/models/spree/order_populator.rb +11 -3
  62. data/app/models/spree/order_updater.rb +3 -4
  63. data/app/models/spree/payment.rb +23 -1
  64. data/app/models/spree/payment/processing.rb +18 -5
  65. data/app/models/spree/payment_method.rb +4 -0
  66. data/app/models/spree/price.rb +2 -3
  67. data/app/models/spree/product.rb +12 -4
  68. data/app/models/spree/product/scopes.rb +29 -16
  69. data/app/models/spree/return_authorization.rb +1 -1
  70. data/app/models/spree/shipment.rb +1 -1
  71. data/app/models/spree/taxon.rb +21 -6
  72. data/app/models/spree/variant.rb +7 -2
  73. data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +2 -2
  74. data/app/views/spree/admin/countries/index.html.erb +1 -0
  75. data/app/views/spree/admin/general_settings/edit.html.erb +10 -2
  76. data/app/views/spree/admin/images/index.html.erb +7 -3
  77. data/app/views/spree/admin/mail_methods/index.html.erb +2 -2
  78. data/app/views/spree/admin/orders/_form.html.erb +3 -3
  79. data/app/views/spree/admin/orders/_line_item.html.erb +1 -1
  80. data/app/views/spree/admin/orders/customer_details/_form.html.erb +4 -4
  81. data/app/views/spree/admin/orders/index.html.erb +60 -52
  82. data/app/views/spree/admin/payment_methods/_form.html.erb +2 -2
  83. data/app/views/spree/admin/payment_methods/index.html.erb +39 -35
  84. data/app/views/spree/admin/payments/_list.html.erb +1 -1
  85. data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +10 -10
  86. data/app/views/spree/admin/products/_form.html.erb +7 -12
  87. data/app/views/spree/admin/products/index.html.erb +13 -15
  88. data/app/views/spree/admin/products/new.html.erb +3 -1
  89. data/app/views/spree/admin/return_authorizations/_form.html.erb +7 -7
  90. data/app/views/spree/admin/return_authorizations/edit.html.erb +17 -11
  91. data/app/views/spree/admin/return_authorizations/index.html.erb +4 -4
  92. data/app/views/spree/admin/return_authorizations/new.html.erb +13 -6
  93. data/app/views/spree/admin/shared/_alert.html.erb +1 -1
  94. data/app/views/spree/admin/shared/_configuration_menu.html.erb +6 -2
  95. data/app/views/spree/admin/shared/_order_details.html.erb +6 -6
  96. data/app/views/spree/admin/shared/_order_tabs.html.erb +20 -37
  97. data/app/views/spree/admin/shared/_routes.html.erb +1 -1
  98. data/app/views/spree/admin/shared/_tabs.html.erb +1 -2
  99. data/app/views/spree/admin/shared/_update_order_state.js +1 -1
  100. data/app/views/spree/admin/shipments/_form.html.erb +24 -24
  101. data/app/views/spree/admin/shipments/edit.html.erb +13 -13
  102. data/app/views/spree/admin/shipments/index.html.erb +35 -31
  103. data/app/views/spree/admin/shipping_methods/index.html.erb +35 -32
  104. data/app/views/spree/admin/tax_rates/_form.html.erb +2 -1
  105. data/app/views/spree/admin/taxons/_form.html.erb +17 -0
  106. data/app/views/spree/admin/taxons/edit.html.erb +3 -1
  107. data/app/views/spree/admin/trackers/_form.html.erb +2 -2
  108. data/app/views/spree/admin/trackers/index.html.erb +2 -2
  109. data/app/views/spree/admin/users/_form.html.erb +37 -0
  110. data/app/views/spree/admin/users/edit.html.erb +28 -0
  111. data/app/views/spree/admin/users/index.html.erb +53 -0
  112. data/app/views/spree/admin/users/new.html.erb +23 -0
  113. data/app/views/spree/admin/users/show.html.erb +21 -0
  114. data/app/views/spree/admin/variants/edit.html.erb +6 -4
  115. data/app/views/spree/admin/variants/index.html.erb +1 -1
  116. data/app/views/spree/admin/zones/_form.html.erb +4 -4
  117. data/app/views/spree/admin/zones/index.html.erb +3 -1
  118. data/app/views/spree/checkout/_delivery.html.erb +1 -1
  119. data/app/views/spree/checkout/_payment.html.erb +1 -1
  120. data/app/views/spree/checkout/_summary.html.erb +2 -2
  121. data/app/views/spree/checkout/payment/_gateway.html.erb +6 -6
  122. data/app/views/spree/layouts/spree_application.html.erb +0 -1
  123. data/app/views/spree/order_mailer/cancel_email.text.erb +1 -1
  124. data/app/views/spree/order_mailer/confirm_email.text.erb +1 -1
  125. data/app/views/spree/orders/_adjustments.html.erb +1 -1
  126. data/app/views/spree/orders/_line_item.html.erb +2 -2
  127. data/app/views/spree/orders/edit.html.erb +1 -1
  128. data/app/views/spree/payments/_payment.html.erb +16 -0
  129. data/app/views/spree/products/_cart_form.html.erb +2 -2
  130. data/app/views/spree/products/_thumbnails.html.erb +3 -3
  131. data/app/views/spree/products/index.html.erb +1 -1
  132. data/app/views/spree/shared/_google_analytics.html.erb +1 -1
  133. data/app/views/spree/shared/_main_nav_bar.html.erb +1 -1
  134. data/app/views/spree/shared/_order_details.html.erb +10 -24
  135. data/app/views/spree/shared/_products.html.erb +1 -1
  136. data/app/views/spree/shared/_search.html.erb +1 -1
  137. data/app/views/spree/taxons/show.html.erb +1 -1
  138. data/config/initializers/check_for_orphaned_preferences.rb +5 -2
  139. data/config/locales/en.yml +24 -5
  140. data/config/routes.rb +4 -3
  141. data/db/default/spree/countries.rb +229 -0
  142. data/db/default/spree/roles.rb +2 -0
  143. data/db/default/spree/states.rb +57 -0
  144. data/db/default/spree/zones.rb +17 -0
  145. data/db/migrate/20130207155350_add_order_id_index_to_payments.rb +9 -0
  146. data/db/migrate/20130208032954_add_primary_to_spree_products_taxons.rb +5 -0
  147. data/db/migrate/20130222032153_add_order_id_index_to_shipments.rb +5 -0
  148. data/db/migrate/20130226032817_change_meta_description_on_spree_products_to_text.rb +5 -0
  149. data/db/migrate/20130226054936_add_variant_id_index_to_spree_prices.rb +5 -0
  150. data/db/migrate/20130319062004_change_orders_total_precision.rb +8 -0
  151. data/db/migrate/20130319063911_change_spree_payments_amount_precision.rb +7 -0
  152. data/db/migrate/20130319064308_change_spree_return_authorization_amount_precision.rb +7 -0
  153. data/db/migrate/20130319082943_change_adjustments_amount_precision.rb +7 -0
  154. data/db/migrate/20130328195253_add_seo_metas_to_taxons.rb +9 -0
  155. data/lib/generators/spree/dummy/templates/rails/database.yml +9 -6
  156. data/lib/spree/core/calculated_adjustments.rb +1 -1
  157. data/lib/spree/core/controller_helpers/auth.rb +3 -3
  158. data/lib/spree/core/controller_helpers/common.rb +1 -11
  159. data/lib/spree/core/controller_helpers/order.rb +15 -12
  160. data/lib/spree/core/engine.rb +5 -1
  161. data/lib/spree/core/mail_interceptor.rb +4 -6
  162. data/lib/spree/core/mail_settings.rb +52 -23
  163. data/lib/spree/core/permalinks.rb +1 -3
  164. data/lib/spree/core/testing_support/authorization_helpers.rb +1 -1
  165. data/lib/spree/core/testing_support/capybara_ext.rb +30 -0
  166. data/lib/spree/core/testing_support/common_rake.rb +8 -0
  167. data/lib/spree/core/testing_support/factories/payment_factory.rb +1 -1
  168. data/lib/spree/core/testing_support/factories/product_factory.rb +7 -2
  169. data/lib/spree/core/testing_support/factories/variant_factory.rb +4 -2
  170. data/lib/spree/core/validators/email.rb +1 -1
  171. data/lib/spree/core/version.rb +1 -1
  172. data/lib/spree/money.rb +14 -3
  173. data/lib/spree/product_filters.rb +1 -1
  174. data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +3 -2
  175. data/vendor/assets/javascripts/jsuri.js +2 -0
  176. data/vendor/assets/javascripts/modernizr.js +3 -3
  177. metadata +78 -69
  178. data/db/default/spree/countries.yml +0 -1589
  179. data/db/default/spree/roles.yml +0 -5
  180. data/db/default/spree/states.yml +0 -256
  181. data/db/default/spree/zone_members.yml +0 -169
  182. data/db/default/spree/zones.yml +0 -13
@@ -30,11 +30,11 @@
30
30
  <ul>
31
31
  <li>
32
32
  <%= radio_button :payment_method, :active, true %>
33
- <%= label_tag nil, t(:yes) %>
33
+ <%= label_tag nil, t(:say_yes) %>
34
34
  </li>
35
35
  <li>
36
36
  <%= radio_button :payment_method, :active, false %>
37
- <%= label_tag nil, t(:no) %>
37
+ <%= label_tag nil, t(:say_no) %>
38
38
  </li>
39
39
  </ul>
40
40
  </div>
@@ -10,38 +10,42 @@
10
10
  </li>
11
11
  <% end %>
12
12
 
13
- <table class="index" id='listing_payment_methods'>
14
- <colgroup>
15
- <col style="width: 15%">
16
- <col style="width: 35%">
17
- <col style="width: 15%">
18
- <col style="width: 10%">
19
- <col style="width: 10%">
20
- <col style="width: 15%">
21
- </colgroup>
22
- <thead>
23
- <tr data-hook="admin_payment_methods_index_headers">
24
- <th><%= t(:name) %></th>
25
- <th><%= t(:provider) %></th>
26
- <th><%= t(:environment) %></th>
27
- <th><%= t(:display) %></th>
28
- <th><%= t(:active) %></th>
29
- <th data-hook="admin_payment_methods_index_header_actions" class="actions"></th>
30
- </tr>
31
- </thead>
32
- <tbody>
33
- <% @payment_methods.each do |method|%>
34
- <tr id="<%= spree_dom_id method %>" data-hook="admin_payment_methods_index_rows" class="<%= cycle('odd', 'even')%>">
35
- <td class="align-center"><%= method.name %></td>
36
- <td><%= method.type %></td>
37
- <td class="align-center"><%= method.environment.to_s.titleize %></td>
38
- <td class="align-center"><%= method.display_on.blank? ? t(:both) : t(method.display_on) %></td>
39
- <td class="align-center"><%= method.active ? t(:yes) : t(:no) %></td>
40
- <td data-hook="admin_payment_methods_index_row_actions" class="actions">
41
- <%= link_to_edit method, :no_text => true %>
42
- <%= link_to_delete method, :no_text => true %>
43
- </td>
44
- </tr>
45
- <% end %>
46
- </tbody>
47
- </table>
13
+ <% if @payment_methods.any? %>
14
+ <table class="index" id='listing_payment_methods'>
15
+ <colgroup>
16
+ <col style="width: 15%">
17
+ <col style="width: 35%">
18
+ <col style="width: 15%">
19
+ <col style="width: 10%">
20
+ <col style="width: 10%">
21
+ <col style="width: 15%">
22
+ </colgroup>
23
+ <thead>
24
+ <tr data-hook="admin_payment_methods_index_headers">
25
+ <th><%= t(:name) %></th>
26
+ <th><%= t(:provider) %></th>
27
+ <th><%= t(:environment) %></th>
28
+ <th><%= t(:display) %></th>
29
+ <th><%= t(:active) %></th>
30
+ <th data-hook="admin_payment_methods_index_header_actions" class="actions"></th>
31
+ </tr>
32
+ </thead>
33
+ <tbody>
34
+ <% @payment_methods.each do |method|%>
35
+ <tr id="<%= spree_dom_id method %>" data-hook="admin_payment_methods_index_rows" class="<%= cycle('odd', 'even')%>">
36
+ <td class="align-center"><%= method.name %></td>
37
+ <td><%= method.type %></td>
38
+ <td class="align-center"><%= method.environment.to_s.titleize %></td>
39
+ <td class="align-center"><%= method.display_on.blank? ? t(:both) : t(method.display_on) %></td>
40
+ <td class="align-center"><%= method.active ? t(:say_yes) : t(:say_no) %></td>
41
+ <td data-hook="admin_payment_methods_index_row_actions" class="actions">
42
+ <%= link_to_edit method, :no_text => true %>
43
+ <%= link_to_delete method, :no_text => true %>
44
+ </td>
45
+ </tr>
46
+ <% end %>
47
+ </tbody>
48
+ </table>
49
+ <% else %>
50
+ <div class="alpha twelve columns no-objects-found"><%= t(:no_payment_methods_found) %></div>
51
+ <% end %>
@@ -12,7 +12,7 @@
12
12
  <% payments.each do |payment| %>
13
13
  <tr data-hook="payments_row" class="<%= cycle('odd', 'even')%>">
14
14
  <td><%= pretty_time(payment.created_at) %></td>
15
- <td class='align-center'><%= payment.display_amount %></td>
15
+ <td class='align-center'><%= payment.display_amount.to_html %></td>
16
16
  <td class="align-center"><%= link_to payment_method_name(payment), spree.admin_order_payment_path(@order, payment) %></td>
17
17
  <td class="align-center"> <span class="state <%= payment.state %>"><%= t(payment.state, :scope => :payment_states, :default => payment.state.capitalize) %></span></td>
18
18
  <td class="actions">
@@ -9,7 +9,7 @@
9
9
  <div class="nine columns">
10
10
  <%= image_tag 'credit_cards/credit_card.gif', :id => 'credit-card-image' %>
11
11
  </div>
12
-
12
+
13
13
  <% param_prefix = "payment_source[#{payment_method.id}]" %>
14
14
 
15
15
  <div class="clear"></div>
@@ -17,8 +17,8 @@
17
17
  <div class="alpha four columns">
18
18
  <div data-hook="card_number">
19
19
  <div class="field">
20
- <%= label_tag nil, raw(t(:card_number) + content_tag(:span, ' *', :class => 'required')) %>
21
- <%= text_field_tag "#{param_prefix}[number]", '', :class => 'required fullwidth', :maxlength => 19 %>
20
+ <%= label_tag 'card_number', raw(t(:card_number) + content_tag(:span, ' *', :class => 'required')) %>
21
+ <%= text_field_tag "#{param_prefix}[number]", '', :class => 'required fullwidth', :id => 'card_number', :maxlength => 19 %>
22
22
  <span id="card_type" style="display:none;">
23
23
  ( <span id="looks_like" ><%= t(:card_type_is) %> <span id="type"></span></span>
24
24
  <span id="unrecognized"><%= t(:unrecognized_card_type) %></span>
@@ -29,17 +29,17 @@
29
29
  </div>
30
30
  <div class="three columns">
31
31
  <div data-hook="card_expiration" class="field">
32
- <%= label_tag nil, raw(t(:expiration) + content_tag(:span, ' *', :class => 'required')) %><br>
33
- <%= select_month(Date.today, :prefix => param_prefix, :field_name => 'month', :use_month_numbers => true, :class => 'required select2') %>
34
- <%= select_year(Date.today, :prefix => param_prefix, :field_name => 'year', :start_year => Date.today.year, :end_year => Date.today.year + 15, :class => 'required select2') %>
32
+ <%= label_tag 'card_month', raw(t(:expiration) + content_tag(:span, ' *', :class => 'required')) %><br>
33
+ <%= select_month(Date.today, { :prefix => param_prefix, :field_name => 'month', :use_month_numbers => true }, :class => 'required select2', :id => 'card_month') %>
34
+ <%= select_year(Date.today, { :prefix => param_prefix, :field_name => 'year', :start_year => Date.today.year, :end_year => Date.today.year + 15 }, :class => 'required select2', :id => 'card_year') %>
35
35
  </div>
36
36
  </div>
37
37
  <div class="omega two columns">
38
38
  <div data-hook="card_code" class="field">
39
- <%= label_tag nil, raw(t(:card_code) + content_tag(:span, ' *', :class => "required")) %>
40
- <%= text_field_tag "#{param_prefix}[verification_value]", '', :class => 'required fullwidth', :size => 5 %>
41
- <a href="/content/cvv" class="info" target="_blank" onclick="window.open(this.href,'cvv_info','left=20,top=20,width=500,height=500,toolbar=0,resizable=0,scrollbars=1');return false">
42
- (<%= t(:whats_this) %>)
39
+ <%= label_tag 'card_code', raw(t(:card_code) + content_tag(:span, ' *', :class => "required")) %>
40
+ <%= text_field_tag "#{param_prefix}[verification_value]", '', :class => 'required fullwidth', :size => 5, :id => 'card_code' %>
41
+ <a href="/content/cvv" class="info" target="_blank" id="cvv_link">
42
+ (<%= t(:whats_is_this) %>)
43
43
  </a>
44
44
  </div>
45
45
  </div>
@@ -1,6 +1,6 @@
1
1
  <div data-hook="admin_product_form_fields">
2
-
3
- <div class="left eight columns alpha" data-hook="admin_product_form_left">
2
+
3
+ <div class="left eight columns alpha" data-hook="admin_product_form_left">
4
4
  <%= f.field_container :name do %>
5
5
  <%= f.label :name, raw(t(:name) + content_tag(:span, ' *', :class => 'required')) %>
6
6
  <%= f.text_field :name, :class => 'fullwidth title' %>
@@ -56,7 +56,7 @@
56
56
  <%= f.text_field :sku, :size => 16 %>
57
57
  <% end %>
58
58
 
59
- <% if Spree::Config[:track_inventory_levels] %>
59
+ <% if Spree::Config[:track_inventory_levels] %>
60
60
  <div class="alpha two columns">
61
61
  <%= f.field_container :on_hand do %>
62
62
  <%= f.label :on_hand, t(:on_hand) %>
@@ -116,11 +116,10 @@
116
116
 
117
117
  <%= f.field_container :option_types do %>
118
118
  <%= f.label :option_type_ids, t(:option_types) %>
119
- <%= f.select :option_type_ids, option_types_options_for(@product), {}, :class => "select2", :multiple => true %>
119
+ <%= f.select :option_type_ids, option_types_options_for(@product), {}, :multiple => true %>
120
120
  <% end %>
121
121
  </div>
122
122
 
123
- <!-- <h2><%= t(:metadata) %></h2> -->
124
123
  <div data-hook="admin_product_form_meta" class="alpha omega twelve columns">
125
124
  <%= f.field_container :meta_keywords do %>
126
125
  <%= f.label :meta_keywords, t(:meta_keywords) %>
@@ -140,10 +139,6 @@
140
139
  <div class="clear"></div>
141
140
  </div>
142
141
 
143
- <% unless Rails.env.test? %>
144
- <script>
145
- $("#product_option_type_ids").select2();
146
-
147
- $('.select2-container').css({width: '20em'})
148
- </script>
149
- <% end %>
142
+ <script>
143
+ $("#product_option_type_ids").select2();
144
+ </script>
@@ -3,13 +3,9 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <div class="toolbar" data-hook="toolbar">
7
- <ul class="actions header-action-links inline-menu">
8
- <li id="new_product_link">
9
- <%= button_link_to t(:new_product), new_object_url, { :remote => true, :icon => 'icon-plus', :id => 'admin_new_product' } %>
10
- </li>
11
- </ul>
12
- </div>
6
+ <li id="new_product_link">
7
+ <%= button_link_to t(:new_product), new_object_url, { :remote => true, :icon => 'icon-plus', :id => 'admin_new_product' } %>
8
+ </li>
13
9
  <% end %>
14
10
 
15
11
  <%= render :partial => 'spree/admin/shared/product_sub_menu' %>
@@ -20,8 +16,8 @@
20
16
 
21
17
  <% content_for :table_filter do %>
22
18
  <div data-hook="admin_products_sidebar">
23
-
24
- <%= search_form_for [:admin, @search] do |f| %>
19
+
20
+ <%= search_form_for [:admin, @search] do |f| %>
25
21
 
26
22
  <%- locals = {:f => f} %>
27
23
 
@@ -30,7 +26,7 @@
30
26
  <div class="field">
31
27
  <%= f.label :name_cont, t(:name) %>
32
28
  <%= f.text_field :name_cont, :size => 15 %>
33
- </div>
29
+ </div>
34
30
  </div>
35
31
  <div class="four columns">
36
32
  <div class="field">
@@ -42,12 +38,12 @@
42
38
  <div class="field checkbox">
43
39
  <label>
44
40
  <%= f.check_box :deleted_at_null, {:checked => params[:q][:deleted_at_null].blank?}, '', '1' %>
45
- <%= t(:show_deleted) %>
41
+ <%= t(:show_deleted) %>
46
42
  </label>
47
43
  </div>
48
44
  </div>
49
45
  </div>
50
-
46
+
51
47
  <div class="clear"></div>
52
48
 
53
49
  <div class="form-buttons actions filter-actions" data-hook="admin_products_index_search_buttons">
@@ -59,6 +55,8 @@
59
55
 
60
56
  <div id="new_product" data-hook></div>
61
57
 
58
+ <%= paginate @collection %>
59
+
62
60
  <% if @collection.any? %>
63
61
  <table class="index" id="listing_products">
64
62
  <colgroup>
@@ -74,15 +72,15 @@
74
72
  <th colspan="2"><%= sort_link @search,:name, t(:name), { :default_order => "desc" }, {:title => 'admin_products_listing_name_title'} %></th>
75
73
  <th><%= sort_link @search,:master_default_price_amount, t(:master_price), {}, {:title => 'admin_products_listing_price_title'} %></th>
76
74
  <th data-hook="admin_products_index_header_actions" class="actions"></th>
77
- </tr>
78
- </thead>
75
+ </tr>
76
+ </thead>
79
77
  <tbody>
80
78
  <% @collection.each do |product| %>
81
79
  <tr <%= "style='color: red;'" if product.deleted? %> id="<%= spree_dom_id product %>" data-hook="admin_products_index_rows" class="<%= cycle('odd', 'even') %>">
82
80
  <td class="align-center"><%= product.sku rescue '' %></td>
83
81
  <td class="align-center"><%= mini_image(product) %></td>
84
82
  <td><%= link_to product.try(:name), edit_admin_product_path(product) %></td>
85
- <td class="align-center"><%= product.display_price rescue '' %></td>
83
+ <td class="align-center"><%= product.display_price.to_html rescue '' %></td>
86
84
  <td class="actions" data-hook="admin_products_index_row_actions">
87
85
  <%= link_to_edit product, :no_text => true, :class => 'edit' unless product.deleted? %>
88
86
  &nbsp;
@@ -67,7 +67,9 @@
67
67
  prototype_select.change(function() {
68
68
  var id = prototype_select.val();
69
69
  if (id.length) {
70
- $('#product-from-prototype').load([ base_url, id ].join("/"));
70
+ var url = new Uri(base_url);
71
+ url.setPath(url.path() + '/' + id);
72
+ $('#product-from-prototype').load(url.toString());
71
73
  } else {
72
74
  $('#product-from-prototype').empty();
73
75
  }
@@ -6,25 +6,25 @@
6
6
  <th><%= t(:quantity_shipped) %></th>
7
7
  <th><%= t(:quantity_returned) %></th>
8
8
  <th><%= t(:return_quantity) %></th>
9
- </tr>
9
+ </tr>
10
10
  </thead>
11
11
  <tbody>
12
12
  <% @return_authorization.order.inventory_units.group_by(&:variant).each do | variant, units| %>
13
13
  <tr id="<%= dom_id(variant) %>" data-hook="rma_row" class="<%= cycle('odd', 'even')%>">
14
14
  <td>
15
- <h4 style="margin-bottom:0px;"><%= variant.name %></h4>
16
- <%= variant.options_text %>
15
+ <div class="variant-name"><%= variant.name %></div>
16
+ <div class="variant-options"><%= variant.options_text %></div>
17
17
  </td>
18
- <td><%= units.select(&:shipped?).size %></td>
19
- <td><%= units.select(&:returned?).size %></td>
20
- <td class="return_quantity">
18
+ <td class="align-center"><%= units.select(&:shipped?).size %></td>
19
+ <td class="align-center"><%= units.select(&:returned?).size %></td>
20
+ <td class="return_quantity align-center">
21
21
  <% if @return_authorization.received? %>
22
22
  <%= @return_authorization.inventory_units.group_by(&:variant)[variant].try(:size) || 0 %>
23
23
  <% elsif units.select(&:shipped?).empty? %>
24
24
  0
25
25
  <% else %>
26
26
  <%= number_field_tag "return_quantity[#{variant.id}]",
27
- @return_authorization.inventory_units.group_by(&:variant)[variant].try(:size) || 0, {:style => 'width:50px;', :min => 0} %>
27
+ @return_authorization.inventory_units.group_by(&:variant)[variant].try(:size) || 0, {:style => 'width:100px;', :min => 0} %>
28
28
  <% end %>
29
29
  </td>
30
30
  </tr>
@@ -1,26 +1,32 @@
1
- <% content_for :page_title do %>
2
- <%= t(:return_authorization) %> <%= @return_authorization.number %> (<%= t(@return_authorization.state.downcase) %>)
3
- <% end %>
4
-
5
1
  <% content_for :page_actions do %>
6
2
  <li>
7
3
  <% if @return_authorization.can_receive? %>
8
- <%= button_link_to t(:receive), fire_admin_order_return_authorization_url(@order, @return_authorization, :e => 'receive'), :method => :put, :data => { :confirm => t(:are_you_sure) } %>
4
+ <%= button_link_to t(:receive), fire_admin_order_return_authorization_url(@order, @return_authorization, :e => 'receive'), :method => :put, :data => { :confirm => t(:are_you_sure) }, :icon => 'icon-download-alt' %>
9
5
  <% end %>
6
+ </li>
7
+ <li>
10
8
  <% if @return_authorization.can_cancel? %>
11
- <%= button_link_to t(:cancel), fire_admin_order_return_authorization_url(@order, @return_authorization, :e => 'cancel'), :method => :put, :data => { :confirm => t(:are_you_sure) } %>
9
+ <%= button_link_to t(:cancel), fire_admin_order_return_authorization_url(@order, @return_authorization, :e => 'cancel'), :method => :put, :data => { :confirm => t(:are_you_sure) }, :icon => 'icon-remove' %>
12
10
  <% end %>
13
11
  </li>
14
12
  <% end %>
15
13
 
16
14
  <%= render :partial => 'spree/admin/shared/order_tabs', :locals => { :current => 'Return Authorizations' } %>
17
15
 
16
+ <% content_for :page_title do %>
17
+ <i class="icon-arrow-right"></i> <%= t(:return_authorization) %> <%= @return_authorization.number %> (<%= t(@return_authorization.state.downcase) %>)
18
+ <% end %>
19
+
20
+
18
21
  <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @return_authorization } %>
19
22
  <%= form_for [:admin, @order, @return_authorization] do |f| %>
20
- <%= render :partial => 'form', :locals => { :f => f } %>
23
+ <fieldset class="no-border-top">
24
+ <%= render :partial => 'form', :locals => { :f => f } %>
21
25
 
22
- <div class="form-buttons" data-hook="buttons">
23
- <%= button t(:update) %>
24
- <%= t(:or) %> <%= link_to t('actions.cancel'), admin_order_return_authorizations_url(@order) %>
25
- </div>
26
+ <div class="form-buttons filter-actions actions" data-hook="buttons">
27
+ <%= button t(:update), 'icon-repeat' %>
28
+ <span class="or"><%= t(:or) %></span>
29
+ <%= button_link_to t(:cancel), admin_order_return_authorizations_url(@order), :icon => 'icon-remove' %>
30
+ </div>
31
+ </fieldset>
26
32
  <% end %>
@@ -13,7 +13,7 @@
13
13
  <i class="icon-arrow-right"></i> <%= t(:return_authorizations) %>
14
14
  <% end %>
15
15
 
16
- <% if @order.inventory_units.any?(&:shipped?) || @order.return_authorizations.any? %>
16
+ <% if @order.inventory_units.any? &:shipped? %>
17
17
  <table class="index">
18
18
  <thead data-hook="rma_header">
19
19
  <tr>
@@ -21,15 +21,15 @@
21
21
  <th><%= t(:status) %></th>
22
22
  <th><%= t(:amount) %></th>
23
23
  <th><%= "#{t('spree.date')}/#{t('spree.time')}" %></th>
24
- <th class="action"></th>
25
- </tr>
24
+ <th class="actions"></th>
25
+ </tr>
26
26
  </thead>
27
27
  <tbody>
28
28
  <% @return_authorizations.each do |return_authorization| %>
29
29
  <tr id="<%= spree_dom_id(return_authorization) %>" data-hook="rma_row" class="<%= cycle('odd', 'even')%>">
30
30
  <td><%= return_authorization.number %></td>
31
31
  <td><%= t(return_authorization.state.downcase) %></td>
32
- <td><%= return_authorization.display_amount %></td>
32
+ <td><%= return_authorization.display_amount.to_html %></td>
33
33
  <td><%= pretty_time(return_authorization.created_at) %></td>
34
34
  <td class="actions">
35
35
  <%= link_to_edit return_authorization %>
@@ -1,15 +1,22 @@
1
1
  <%= render :partial => 'spree/admin/shared/order_tabs', :locals => { :current => 'Return Authorizations' } %>
2
2
 
3
3
  <% content_for :page_title do %>
4
- <%= t(:new_return_authorization) %>
4
+ <i class="icon-arrow-right"></i> <%= t(:new_return_authorization) %>
5
+ <% end %>
6
+
7
+ <% content_for :page_actions do %>
8
+ <li><%= button_link_to t(:back_to_return_authorizations_list), spree.admin_order_return_authorizations_url, :icon => 'icon-arrow-left' %></li>
5
9
  <% end %>
6
10
 
7
11
  <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @return_authorization } %>
8
12
  <%= form_for [:admin, @order, @return_authorization] do |f| %>
9
- <%= render :partial => 'form', :locals => { :f => f } %>
13
+ <fieldset class="no-border-top">
14
+ <%= render :partial => 'form', :locals => { :f => f } %>
10
15
 
11
- <div class="form-buttons" data-hook="buttons">
12
- <%= button t(:continue) %>
13
- <%= t(:or) %> <%= link_to t('actions.cancel'), admin_order_return_authorizations_url(@order) %>
14
- </div>
16
+ <div class="form-buttons filter-actions actions" data-hook="buttons">
17
+ <%= button t(:continue), 'icon-arrow-right' %>
18
+ <span class="or"><%= t(:or) %></span>
19
+ <%= button_link_to t(:cancel), admin_order_return_authorizations_url(@order), :icon => 'icon-remove' %>
20
+ </div>
21
+ </fieldset>
15
22
  <% end %>
@@ -1,5 +1,5 @@
1
1
  <div class="alert <%= alert.severity.downcase %>">
2
2
  <%= alert.message %> <%= link_to alert.url_name, alert.url if alert.url %>
3
- <%= link_to 'X', dismiss_alert_admin_general_settings_path(:alert_id => alert.id),
3
+ <%= link_to 'X', spree.dismiss_alert_admin_general_settings_path(:alert_id => alert.id),
4
4
  :remote => true, :method => :post, :class => 'dismiss' %>
5
5
  </div>
@@ -6,14 +6,18 @@
6
6
  <nav class="menu">
7
7
  <ul class="sidebar" data-hook="admin_configurations_sidebar_menu">
8
8
  <%= configurations_sidebar_menu_item t(:general_settings), edit_admin_general_settings_path %>
9
- <%= configurations_sidebar_menu_item t(:mail_methods), admin_mail_methods_path %>
9
+ <% if Spree::Config[:override_actionmailer_config] %>
10
+ <%= configurations_sidebar_menu_item t(:mail_methods), admin_mail_methods_path %>
11
+ <% end %>
10
12
  <%= configurations_sidebar_menu_item t(:image_settings), edit_admin_image_settings_path %>
11
13
  <%= configurations_sidebar_menu_item t(:tax_categories), admin_tax_categories_path %>
12
14
  <%= configurations_sidebar_menu_item t(:tax_rates), admin_tax_rates_path %>
13
15
  <%= configurations_sidebar_menu_item t(:tax_settings), edit_admin_tax_settings_path %>
14
16
  <%= configurations_sidebar_menu_item t(:zones), admin_zones_path %>
15
17
  <%= configurations_sidebar_menu_item t(:countries), admin_countries_path %>
16
- <%= configurations_sidebar_menu_item t(:states), admin_country_states_path(Spree::Config[:default_country_id]) %>
18
+ <% if Spree::Config[:default_country_id] %>
19
+ <%= configurations_sidebar_menu_item t(:states), admin_country_states_path(Spree::Config[:default_country_id]) %>
20
+ <% end %>
17
21
  <%= configurations_sidebar_menu_item t(:payment_methods), admin_payment_methods_path %>
18
22
  <%= configurations_sidebar_menu_item t(:taxonomies), admin_taxonomies_path %>
19
23
  <%= configurations_sidebar_menu_item t(:shipping_methods), admin_shipping_methods_path %>