spree_core 0.40.4 → 0.50.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -1
- data/app/controllers/admin/base_controller.rb +0 -57
- data/app/controllers/admin/configurations_controller.rb +1 -1
- data/app/controllers/admin/general_settings_controller.rb +1 -1
- data/app/controllers/admin/images_controller.rb +18 -8
- data/app/controllers/admin/inventory_settings_controller.rb +1 -1
- data/app/controllers/admin/mail_settings_controller.rb +1 -1
- data/app/controllers/admin/option_types_controller.rb +11 -0
- data/app/controllers/admin/orders_controller.rb +16 -20
- data/app/controllers/admin/overview_controller.rb +1 -1
- data/app/controllers/admin/payment_methods_controller.rb +6 -6
- data/app/controllers/admin/product_groups_controller.rb +10 -11
- data/app/controllers/admin/product_properties_controller.rb +5 -5
- data/app/controllers/admin/product_scopes_controller.rb +12 -4
- data/app/controllers/admin/products_controller.rb +17 -12
- data/app/controllers/admin/properties_controller.rb +7 -7
- data/app/controllers/admin/prototypes_controller.rb +15 -15
- data/app/controllers/admin/reports_controller.rb +12 -11
- data/app/controllers/admin/shipments_controller.rb +0 -5
- data/app/controllers/admin/shipping_categories_controller.rb +6 -6
- data/app/controllers/admin/shipping_methods_controller.rb +1 -2
- data/app/controllers/admin/states_controller.rb +12 -12
- data/app/controllers/admin/tax_categories_controller.rb +2 -2
- data/app/controllers/admin/tax_rates_controller.rb +8 -8
- data/app/controllers/admin/tax_settings_controller.rb +1 -1
- data/app/controllers/admin/taxonomies_controller.rb +3 -3
- data/app/controllers/admin/taxons_controller.rb +1 -8
- data/app/controllers/admin/trackers_controller.rb +1 -1
- data/app/controllers/admin/users_controller.rb +6 -9
- data/app/controllers/admin/variants_controller.rb +13 -2
- data/app/controllers/admin/zones_controller.rb +9 -9
- data/app/controllers/checkout_controller.rb +5 -5
- data/app/controllers/products_controller.rb +1 -1
- data/app/controllers/taxons_controller.rb +3 -1
- data/app/helpers/admin/navigation_helper.rb +36 -19
- data/app/helpers/admin/payments_helper.rb +1 -1
- data/app/helpers/admin/product_groups_helper.rb +1 -1
- data/app/helpers/admin/product_properties_helper.rb +5 -5
- data/app/helpers/admin/products_helper.rb +2 -2
- data/app/helpers/admin/users_helper.rb +5 -2
- data/app/helpers/hook_helper.rb +3 -3
- data/app/helpers/products_helper.rb +0 -19
- data/app/helpers/spree/base_helper.rb +33 -2
- data/app/helpers/taxons_helper.rb +3 -3
- data/app/mailers/order_mailer.rb +2 -2
- data/app/mailers/shipment_mailer.rb +2 -2
- data/app/models/address.rb +42 -9
- data/app/models/adjustment.rb +8 -8
- data/app/models/app_configuration.rb +0 -6
- data/app/models/billing_integration.rb +1 -1
- data/app/models/calculator/sales_tax.rb +3 -3
- data/app/models/configuration.rb +1 -1
- data/app/models/country.rb +4 -5
- data/app/models/creditcard.rb +38 -31
- data/app/models/gateway.rb +14 -14
- data/app/models/gateway/beanstream.rb +4 -4
- data/app/models/gateway/bogus.rb +6 -6
- data/app/models/gateway/braintree.rb +88 -0
- data/app/models/gateway/eway.rb +3 -3
- data/app/models/image.rb +5 -4
- data/app/models/option_type.rb +1 -0
- data/app/models/order.rb +60 -21
- data/app/models/payment.rb +5 -32
- data/app/models/preference.rb +7 -7
- data/app/models/product.rb +22 -7
- data/app/models/product_group.rb +22 -26
- data/app/models/product_property.rb +5 -5
- data/app/models/product_scope.rb +26 -6
- data/app/models/property.rb +1 -1
- data/app/models/state.rb +2 -3
- data/app/models/tax_category.rb +1 -0
- data/app/models/tax_rate.rb +1 -2
- data/app/models/taxon.rb +12 -10
- data/app/models/taxonomy.rb +7 -4
- data/app/models/tracker.rb +1 -1
- data/app/models/user.rb +4 -0
- data/app/models/variant.rb +1 -1
- data/app/models/zone.rb +1 -1
- data/app/models/zone_member.rb +3 -3
- data/app/views/admin/{shared → adjustments}/_adjustments_table.html.erb +7 -4
- data/app/views/admin/adjustments/edit.html.erb +1 -1
- data/app/views/admin/adjustments/index.html.erb +2 -2
- data/app/views/admin/adjustments/new.html.erb +2 -1
- data/app/views/admin/general_settings/edit.html.erb +4 -12
- data/app/views/admin/general_settings/show.html.erb +0 -5
- data/app/views/admin/images/index.html.erb +8 -5
- data/app/views/admin/inventory_settings/show.html.erb +1 -1
- data/app/views/admin/mail_methods/index.html.erb +4 -4
- data/app/views/admin/option_types/_form.html.erb +4 -4
- data/app/views/admin/option_types/_option_value_fields.html.erb +2 -2
- data/app/views/admin/option_types/edit.html.erb +4 -2
- data/app/views/admin/option_types/index.html.erb +5 -5
- data/app/views/admin/orders/_line_item.html.erb +2 -1
- data/app/views/admin/orders/history.html.erb +6 -2
- data/app/views/admin/orders/index.html.erb +22 -19
- data/app/views/admin/orders/show.html.erb +1 -1
- data/app/views/admin/orders/user.html.erb +1 -1
- data/app/views/admin/payment_methods/index.html.erb +7 -5
- data/app/views/admin/payments/_list.html.erb +3 -3
- data/app/views/admin/payments/index.html.erb +1 -1
- data/app/views/admin/payments/show.html.erb +2 -2
- data/app/views/admin/product_groups/edit.html.erb +7 -7
- data/app/views/admin/product_groups/index.html.erb +5 -3
- data/app/views/admin/product_groups/update.js.erb +4 -3
- data/app/views/admin/product_properties/_product_property_fields.html.erb +3 -3
- data/app/views/admin/product_properties/index.html.erb +10 -5
- data/app/views/admin/product_scopes/destroy.js.erb +1 -0
- data/app/views/admin/products/index.html.erb +32 -33
- data/app/views/admin/properties/_form.html.erb +2 -2
- data/app/views/admin/properties/index.html.erb +4 -4
- data/app/views/admin/prototypes/index.html.erb +4 -4
- data/app/views/admin/shared/_address_form.html.erb +1 -1
- data/app/views/admin/shared/_calculator_fields.html.erb +1 -1
- data/app/views/admin/shared/_destroy.js.erb +15 -2
- data/app/views/admin/shared/_order_tabs.html.erb +1 -1
- data/app/views/admin/shared/_report_criteria.html.erb +1 -1
- data/app/views/admin/shipments/_form.html.erb +6 -2
- data/app/views/admin/shipments/edit.html.erb +1 -1
- data/app/views/admin/shipments/index.html.erb +4 -2
- data/app/views/admin/shipping_methods/_form.html.erb +2 -0
- data/app/views/admin/shipping_methods/index.html.erb +3 -2
- data/app/views/admin/states/_state_list.html.erb +11 -5
- data/app/views/admin/tax_categories/index.html.erb +9 -4
- data/app/views/admin/tax_settings/show.html.erb +2 -2
- data/app/views/admin/taxonomies/_list.html.erb +4 -2
- data/app/views/admin/taxonomies/index.html.erb +2 -2
- data/app/views/admin/taxons/_form.html.erb +1 -1
- data/app/views/admin/trackers/index.html.erb +5 -5
- data/app/views/admin/users/_form.html.erb +3 -4
- data/app/views/admin/users/index.html.erb +7 -6
- data/app/views/admin/users/show.html.erb +3 -3
- data/app/views/admin/variants/index.html.erb +21 -6
- data/app/views/admin/zones/_form.html.erb +9 -9
- data/app/views/admin/zones/_member_type.html.erb +5 -5
- data/app/views/admin/zones/index.html.erb +7 -5
- data/app/views/checkout/_address.html.erb +2 -2
- data/app/views/checkout/_payment.html.erb +3 -6
- data/app/views/layouts/admin.html.erb +3 -9
- data/app/views/layouts/spree_application.html.erb +2 -1
- data/app/views/orders/_line_item.html.erb +1 -1
- data/app/views/orders/edit.html.erb +17 -16
- data/app/views/orders/show.html.erb +1 -1
- data/app/views/shared/_admin_head.html.erb +1 -1
- data/app/views/shared/_error_messages.html.erb +2 -2
- data/app/views/shared/_filters.html.erb +4 -4
- data/app/views/shared/_head.html.erb +2 -2
- data/app/views/shared/_nav_bar.html.erb +2 -2
- data/app/views/shared/_products.html.erb +4 -2
- data/app/views/shared/_taxonomies.html.erb +15 -8
- data/app/views/shipment_mailer/shipped_email.text.erb +2 -2
- data/config/cucumber.yml +10 -0
- data/config/initializers/form_builder.rb +1 -5
- data/config/initializers/workarounds_for_ruby19.rb +5 -5
- data/config/locales/en.yml +33 -6
- data/config/routes.rb +18 -13
- data/db/migrate/20090923100315_add_count_on_hand_to_variants_and_products.rb +5 -5
- data/db/migrate/20091213222815_creditcard_last_four_digits.rb +5 -5
- data/db/migrate/20100105132138_shipment_id_for_inventory_units.rb +2 -2
- data/db/migrate/20100209025806_create_payment_methods.rb +3 -3
- data/db/migrate/20100209144531_polymorphic_payments.rb +1 -1
- data/db/migrate/20100214212536_assign_creditcard_txns_to_payment.rb +2 -2
- data/db/migrate/20100224153127_deleted_at_for_payment_methods.rb +1 -1
- data/db/migrate/20100506185838_add_description_to_taxons.rb +1 -1
- data/db/migrate/20100816212146_shipping_method_id_for_orders.rb +1 -1
- data/db/migrate/20101026184808_migrate_checkout_to_orders.rb +2 -2
- data/db/migrate/20101223215658_add_position_to_variants.rb +9 -0
- data/db/migrate/20110110130847_add_next_state_to_state_events.rb +9 -0
- data/db/migrate/20110111122537_add_position_to_option_types.rb +9 -0
- data/db/migrate/20110314192118_remove_trailing_slashes_in_taxon_permalinks.rb +17 -0
- data/lib/custom_fixtures.rb +1 -1
- data/lib/{seo_assist.rb → middleware/seo_assist.rb} +14 -8
- data/lib/product_filters.rb +49 -43
- data/lib/redirect_legacy_product_url.rb +5 -5
- data/lib/scopes.rb +2 -2
- data/lib/scopes/dynamic.rb +9 -16
- data/lib/scopes/product.rb +33 -16
- data/lib/scopes/variant.rb +4 -3
- data/lib/spree/calculated_adjustments.rb +5 -2
- data/lib/spree/config.rb +2 -0
- data/lib/spree/current_order.rb +4 -4
- data/lib/spree/mail_settings.rb +3 -2
- data/lib/spree/search/base.rb +9 -10
- data/lib/spree_base.rb +22 -23
- data/lib/spree_core.rb +10 -69
- data/lib/spree_core/authorize_net_cim_hack.rb +1 -1
- data/lib/spree_core/delegate_belongs_to.rb +18 -24
- data/lib/spree_core/enumerable_constants.rb +38 -38
- data/lib/spree_core/find_by_param.rb +8 -6
- data/lib/spree_core/preferences/preference_definition.rb +7 -7
- data/lib/spree_core/railtie.rb +58 -0
- data/lib/spree_core/ssl_requirement.rb +4 -3
- data/lib/spree_core/testing_support/factories.rb +13 -0
- data/lib/spree_core/testing_support/factories/address_factory.rb +20 -0
- data/lib/spree_core/testing_support/factories/adjustment_factory.rb +6 -0
- data/lib/spree_core/testing_support/factories/calculator_factory.rb +5 -0
- data/lib/spree_core/testing_support/factories/configuraion_factory.rb +4 -0
- data/lib/spree_core/testing_support/factories/country_factory.rb +7 -0
- data/lib/spree_core/testing_support/factories/creditcard_factory.rb +11 -0
- data/lib/spree_core/testing_support/factories/inventory_unit_factory.rb +7 -0
- data/lib/spree_core/testing_support/factories/line_item_factory.rb +8 -0
- data/lib/spree_core/testing_support/factories/mail_method_factory.rb +4 -0
- data/lib/spree_core/testing_support/factories/options_factory.rb +10 -0
- data/lib/spree_core/testing_support/factories/order_factory.rb +18 -0
- data/lib/spree_core/testing_support/factories/payment_factory.rb +26 -0
- data/lib/spree_core/testing_support/factories/payment_method_factory.rb +17 -0
- data/lib/spree_core/testing_support/factories/product_factory.rb +16 -0
- data/lib/spree_core/testing_support/factories/product_group_factory.rb +3 -0
- data/lib/spree_core/testing_support/factories/product_option_type_factory.rb +4 -0
- data/lib/spree_core/testing_support/factories/product_property_factory.rb +4 -0
- data/lib/spree_core/testing_support/factories/product_scope_factory.rb +6 -0
- data/lib/spree_core/testing_support/factories/property_factory.rb +4 -0
- data/lib/spree_core/testing_support/factories/prototype_factory.rb +4 -0
- data/lib/spree_core/testing_support/factories/return_authorization_factory.rb +8 -0
- data/lib/spree_core/testing_support/factories/role_factory.rb +9 -0
- data/lib/spree_core/testing_support/factories/shipment_factory.rb +9 -0
- data/lib/spree_core/testing_support/factories/shipping_category_factory.rb +5 -0
- data/lib/spree_core/testing_support/factories/shipping_method_factory.rb +7 -0
- data/lib/spree_core/testing_support/factories/state_factory.rb +11 -0
- data/lib/spree_core/testing_support/factories/tax_category_factory.rb +8 -0
- data/lib/spree_core/testing_support/factories/tax_rate_factory.rb +5 -0
- data/lib/spree_core/testing_support/factories/taxon_factory.rb +5 -0
- data/lib/spree_core/testing_support/factories/taxonomy_factory.rb +3 -0
- data/lib/spree_core/testing_support/factories/tracker_factory.rb +5 -0
- data/lib/spree_core/testing_support/factories/user_factory.rb +15 -0
- data/lib/spree_core/testing_support/factories/variant_factory.rb +14 -0
- data/lib/spree_core/testing_support/factories/zone_factory.rb +18 -0
- data/lib/spree_core/theme_support/hook.rb +1 -1
- data/lib/spree_core/theme_support/more_patches.rb +20 -20
- data/lib/spree_core/version.rb +5 -0
- data/lib/tasks/common.rb +30 -0
- data/lib/tasks/install.rake +1 -1
- data/lib/tasks/rake_util.rb +19 -0
- data/lib/tasks/taxon.rake +14 -0
- data/public/images/reorder.jpg +0 -0
- data/public/javascripts/admin.js +0 -6
- data/public/javascripts/admin/unobtrusive_handlers.js +28 -0
- data/public/javascripts/checkout.js +3 -3
- data/public/stylesheets/admin/admin-forms.css +1 -6
- data/public/stylesheets/admin/admin.css +0 -28
- data/public/stylesheets/screen.css +0 -280
- metadata +81 -43
- data/app/controllers/countries_controller.rb +0 -11
- data/app/models/spree/alert.rb +0 -13
- data/app/models/state_monitor.rb +0 -25
- data/app/views/admin/shared/_alert.html.erb +0 -6
- data/app/views/countries/index.js.erb +0 -1
- data/app/views/shared/_doc_and_xmlns.html.erb +0 -2
- data/app/views/users/edit.html.erb +0 -9
- data/app/views/users/show.html.erb +0 -46
- data/lib/spree_core/validation_group.rb +0 -143
- data/public/stylesheets/scaffold.css +0 -54
@@ -1,11 +1,11 @@
|
|
1
1
|
<%= f.field_container :name do %>
|
2
|
-
<%= f.label :name, t("name")
|
2
|
+
<%= f.label :name, t("name") %> <span class="required">*</span><br />
|
3
3
|
<%= f.text_field :name %>
|
4
4
|
<%= f.error_message_on :name %>
|
5
5
|
<% end %>
|
6
6
|
|
7
|
-
<%= f.field_container :
|
8
|
-
<%= f.label :presentation, t("presentation")
|
7
|
+
<%= f.field_container :presentation do %>
|
8
|
+
<%= f.label :presentation, t("presentation") %> <span class="required">*</span><br />
|
9
9
|
<%= f.text_field :presentation %>
|
10
10
|
<%= f.error_message_on :presentation %>
|
11
|
-
<% end %>
|
11
|
+
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<tr class="option_value fields" id="<%= dom_id(f.object) %>">
|
2
|
-
<td><%= f.text_field :name %></td>
|
3
|
-
<td><%= f.text_field :presentation %></td>
|
2
|
+
<td class='name'><%= f.text_field :name %></td>
|
3
|
+
<td class='presentation'><%= f.text_field :presentation %></td>
|
4
4
|
<td class="actions"><%= link_to_remove_fields t("remove"), f %></td>
|
5
5
|
</tr>
|
@@ -18,12 +18,14 @@
|
|
18
18
|
<tr id="none">
|
19
19
|
<td colspan="3"><%= @option_type.option_values.empty? ? t("none") : "" %></td>
|
20
20
|
</tr>
|
21
|
-
|
21
|
+
<%= f.fields_for :option_values do |option_value_form| %>
|
22
22
|
<%= render "option_value_fields", :f => option_value_form %>
|
23
23
|
<% end %>
|
24
24
|
</tbody>
|
25
25
|
</table>
|
26
|
-
|
26
|
+
<span id='new_add_option_value'>
|
27
|
+
<%= link_to_add_fields t("add_option_value"), "tbody#option_values", f, :option_values %>
|
28
|
+
</span>
|
27
29
|
|
28
30
|
<%= render :partial => 'admin/shared/edit_resource_links' %>
|
29
31
|
</fieldset>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<div class='toolbar'>
|
4
4
|
<ul class='actions'>
|
5
5
|
<li id="new_ot_link">
|
6
|
-
<%= button_link_to t("new_option_type"), new_admin_option_type_url, {:remote => true, :icon => 'add'} %>
|
6
|
+
<%= button_link_to t("new_option_type"), new_admin_option_type_url, {:remote => true, :icon => 'add', :id => 'new_option_type_link'} %>
|
7
7
|
</li>
|
8
8
|
</ul>
|
9
9
|
<br class='clear' />
|
@@ -13,7 +13,7 @@
|
|
13
13
|
|
14
14
|
<div id="new_option_type"></div>
|
15
15
|
|
16
|
-
<table class="index">
|
16
|
+
<table class="index sortable" id='listing_option_types'>
|
17
17
|
<tr>
|
18
18
|
<th><%= t("name") %></th>
|
19
19
|
<th><%= t("presentation") %></th>
|
@@ -21,10 +21,10 @@
|
|
21
21
|
</tr>
|
22
22
|
<% @option_types.each do |option_type| %>
|
23
23
|
<tr id="<%= dom_id option_type %>">
|
24
|
-
<td
|
25
|
-
<td><%= option_type.presentation %></td>
|
24
|
+
<td><span class="handle"></span> <%= option_type.name %></td>
|
25
|
+
<td class='presentation'><%= option_type.presentation %></td>
|
26
26
|
<td class="actions">
|
27
|
-
<%= link_to_edit(option_type) %>
|
27
|
+
<%= link_to_edit(option_type, :class => 'admin_edit_option_type') %>
|
28
28
|
|
29
29
|
<%= link_to_delete(option_type) %>
|
30
30
|
</td>
|
@@ -10,7 +10,8 @@
|
|
10
10
|
<%= hook :admin_order_form_line_item_actions, locals do %>
|
11
11
|
<%= link_to_delete f.object, {:url => admin_order_line_item_url(@order.number, f.object),
|
12
12
|
:dataType => "html" ,
|
13
|
-
:success => "function(r){ jQuery('#order-form-wrapper').html(r);}"}
|
13
|
+
:success => "function(r){ jQuery('#order-form-wrapper').html(r);}"},
|
14
|
+
:title => "admin_delete_#{dom_id(@order)}" %>
|
14
15
|
<% end %>
|
15
16
|
</td>
|
16
17
|
</tr>
|
@@ -5,12 +5,16 @@
|
|
5
5
|
<table class="index">
|
6
6
|
<tr>
|
7
7
|
<th><%= t("event") %></th>
|
8
|
+
<th><%= t("from_state") %></th>
|
9
|
+
<th><%= t("to_state") %></th>
|
8
10
|
<th><%= t("user") %></th>
|
9
11
|
<th><%= "#{t('spree.date')}/#{t('spree.time')}" %></th>
|
10
12
|
</tr>
|
11
13
|
<% @order.state_events.sort.each do |event| %>
|
12
14
|
<tr>
|
13
|
-
<td><%=t("#{event.name}") %></td>
|
15
|
+
<td><%=t("#{event.name}") if event.name.present? %></td>
|
16
|
+
<td><%=t("#{event.name}_state#{'s' unless event.name == 'order'}.#{event.previous_state}") %></td>
|
17
|
+
<td><%=t("#{event.name}_state#{'s' unless event.name == 'order'}.#{event.next_state}") %></td>
|
14
18
|
<td><%=event.user.email if event.user %></td>
|
15
19
|
<td><%=event.created_at.to_s(:date_time24) %></td>
|
16
20
|
</tr>
|
@@ -22,4 +26,4 @@
|
|
22
26
|
<% end %>
|
23
27
|
</table>
|
24
28
|
|
25
|
-
<%= button_link_to t('continue'), admin_orders_url %>
|
29
|
+
<%= button_link_to t('continue'), admin_orders_url %>
|
@@ -1,22 +1,26 @@
|
|
1
1
|
<div class='toolbar order-links'>
|
2
|
-
<%= button_link_to t("new_order"), new_admin_order_url, :icon => 'add' %>
|
2
|
+
<%= button_link_to t("new_order"), new_admin_order_url, :icon => 'add', :id => 'admin_new_order' %>
|
3
3
|
</div>
|
4
4
|
|
5
5
|
<%= render :partial => 'admin/shared/order_sub_menu' %>
|
6
6
|
|
7
7
|
<h1><%= t("listing_orders") %></h1>
|
8
8
|
|
9
|
-
<table class="index">
|
9
|
+
<table class="index" id='listing_orders'>
|
10
10
|
<thead>
|
11
11
|
<tr>
|
12
12
|
<%= hook :admin_orders_index_headers do %>
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
<th><%=
|
19
|
-
<th><%=
|
13
|
+
<% if @show_only_completed %>
|
14
|
+
<th><%= sort_link @search, :completed_at, t("activerecord.attributes.order.completed_at") %></th>
|
15
|
+
<% else %>
|
16
|
+
<th><%= sort_link @search, :created_at, t("order_date") %></th>
|
17
|
+
<% end %>
|
18
|
+
<th><%= sort_link @search, :number, t("order_number") %></th>
|
19
|
+
<th><%= sort_link @search, :state, t("status") %></th>
|
20
|
+
<th><%= sort_link @search, :payment_state, t("payment_state") %></th>
|
21
|
+
<th><%= sort_link @search, :shipment_state, t("shipment_state") %></th>
|
22
|
+
<th><%= sort_link @search, :email, t("customer") %></th>
|
23
|
+
<th><%= sort_link @search, :total, t("total") %></th>
|
20
24
|
<% end %>
|
21
25
|
<th>
|
22
26
|
<%= hook :admin_orders_index_header_actions %>
|
@@ -28,7 +32,7 @@
|
|
28
32
|
<tr>
|
29
33
|
<%- locals = {:order => order} %>
|
30
34
|
<%= hook :admin_orders_index_rows, locals do %>
|
31
|
-
<td><%= order.completed_at
|
35
|
+
<td><%= (@show_only_completed ? order.completed_at : order.created_at).to_date %></td>
|
32
36
|
<td><%= link_to order.number, object_url(order) %></td>
|
33
37
|
<td><%= t("order_state.#{order.state.downcase}") %></td>
|
34
38
|
<td><%= link_to t("payment_states.#{order.payment_state}"), admin_order_payments_path(order) if order.payment_state %></td>
|
@@ -36,9 +40,9 @@
|
|
36
40
|
<td><%= order.email %></td>
|
37
41
|
<td><%= number_to_currency order.total %></td>
|
38
42
|
<% end %>
|
39
|
-
<td>
|
43
|
+
<td class='actions'>
|
40
44
|
<%= hook :admin_orders_index_row_actions, locals do %>
|
41
|
-
<%= link_to_edit order %>
|
45
|
+
<%= link_to_edit order, :title => "admin_edit_#{dom_id(order)}" %>
|
42
46
|
<% end %>
|
43
47
|
</td>
|
44
48
|
</tr>
|
@@ -51,18 +55,17 @@
|
|
51
55
|
<% content_for :sidebar do %>
|
52
56
|
<div class="box">
|
53
57
|
<h3><%= t(:search) %></h3>
|
54
|
-
|
55
|
-
<%= form_for @search do |f| %>
|
58
|
+
<%= form_for [:admin, @search] do |f| %>
|
56
59
|
<%- locals = {:f => f} %>
|
57
60
|
<%= hook :admin_orders_index_search, locals do %>
|
58
61
|
<label><%= t("date_range") %></label><br />
|
59
62
|
<div class="yui-g date-range-filter">
|
60
63
|
<div class="yui-u sub-field first">
|
61
|
-
<%= f.spree_date_picker :
|
64
|
+
<%= f.spree_date_picker :created_at_greater_than %><br />
|
62
65
|
<label class="sub"><%= t("start") %></label>
|
63
66
|
</div>
|
64
67
|
<div class="yui-u sub-field">
|
65
|
-
<%= f.spree_date_picker :
|
68
|
+
<%= f.spree_date_picker :created_at_less_than %><br />
|
66
69
|
<label><%= t("stop") %></label>
|
67
70
|
</div>
|
68
71
|
</div>
|
@@ -79,14 +82,14 @@
|
|
79
82
|
</p>
|
80
83
|
<p>
|
81
84
|
<label><%= t 'first_name_begins_with' %></label><br />
|
82
|
-
<%= f.text_field :
|
85
|
+
<%= f.text_field :bill_address_firstname_starts_with, :size=>25 %>
|
83
86
|
</p>
|
84
87
|
<p>
|
85
88
|
<label><%= t 'last_name_begins_with' %></label><br />
|
86
|
-
<%= f.text_field :
|
89
|
+
<%= f.text_field :bill_address_lastname_starts_with, :size=>25 %>
|
87
90
|
</p>
|
88
91
|
<p>
|
89
|
-
<%= f.check_box :
|
92
|
+
<%= f.check_box :completed_at_is_not_null, {:checked => @show_only_completed}, "1", "" %>
|
90
93
|
<label>
|
91
94
|
<%= t("show_only_complete_orders") %>
|
92
95
|
</label>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class='toolbar order-links'>
|
2
2
|
<%= hook :admin_order_show_buttons do %>
|
3
|
-
<%= button_link_to t("cancel"), fire_admin_order_url(@order.number, {:e => "cancel"}), :icon => 'delete', :confirm => '
|
3
|
+
<%= button_link_to t("cancel"), fire_admin_order_url(@order.number, {:e => "cancel"}), :icon => 'delete', :confirm => t('are_you_sure') if @order.can_cancel? %>
|
4
4
|
<%= button_link_to t("edit"), edit_admin_order_url(@order.number), :icon => 'edit' %>
|
5
5
|
<% end %>
|
6
6
|
</div>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<div id="add-line-item">
|
6
6
|
<fieldset>
|
7
7
|
<legend><%= t('customer_search') %></legend>
|
8
|
-
<%= label_tag :customer_search, t("
|
8
|
+
<%= label_tag :customer_search, t("enter_atleast_five_letters") %>
|
9
9
|
<%= text_field_tag :customer_search, nil, :class => 'fullwidth title' %>
|
10
10
|
</fieldset>
|
11
11
|
</div>
|
@@ -3,7 +3,8 @@
|
|
3
3
|
<div class='toolbar'>
|
4
4
|
<ul class='actions'>
|
5
5
|
<li>
|
6
|
-
<%= button_link_to t("new_payment_method"), new_object_url, :icon => 'add'
|
6
|
+
<%= button_link_to t("new_payment_method"), new_object_url, :icon => 'add',
|
7
|
+
:id => 'admin_new_payment_methods_link' %>
|
7
8
|
</li>
|
8
9
|
</ul>
|
9
10
|
<br class='clear' />
|
@@ -11,8 +12,8 @@
|
|
11
12
|
|
12
13
|
<h1><%= t("payment_methods") %></h1>
|
13
14
|
|
14
|
-
<table class="index">
|
15
|
-
<
|
15
|
+
<table class="index" id='listing_payment_methods'>
|
16
|
+
<tr>
|
16
17
|
<%= hook :admin_payment_methods_index_headers do %>
|
17
18
|
<th><%= t("name") %></th>
|
18
19
|
<th><%= t("provider") %></th>
|
@@ -23,7 +24,7 @@
|
|
23
24
|
<th>
|
24
25
|
<%= hook :admin_payment_methods_index_header_actions %>
|
25
26
|
</th>
|
26
|
-
</
|
27
|
+
</tr>
|
27
28
|
<tbody>
|
28
29
|
<% @payment_methods.each do |method|%>
|
29
30
|
<tr id="<%= dom_id method %>">
|
@@ -37,7 +38,8 @@
|
|
37
38
|
<% end %>
|
38
39
|
<td width="140px">
|
39
40
|
<%= hook :admin_payment_methods_index_row_actions, locals do %>
|
40
|
-
<%= link_to_edit method %>
|
41
|
+
<%= link_to_edit method, :class => 'edit' %>
|
42
|
+
|
41
43
|
<%= link_to_delete method %>
|
42
44
|
<% end %>
|
43
45
|
</td>
|
@@ -3,15 +3,15 @@
|
|
3
3
|
<th><%= "#{t('spree.date')}/#{t('spree.time')}" %></th>
|
4
4
|
<th><%= t("amount") %></th>
|
5
5
|
<th><%= t("payment_method") %></th>
|
6
|
-
<th><%= t("
|
7
|
-
<th
|
6
|
+
<th><%= t("payment_state") %></th>
|
7
|
+
<th><%= t("payment_actions") %></th>
|
8
8
|
</tr>
|
9
9
|
<% payments.each do |payment| %>
|
10
10
|
<tr>
|
11
11
|
<td><%= payment.created_at.to_s(:date_time24) %></td>
|
12
12
|
<td><%= number_to_currency(payment.amount) %></td>
|
13
13
|
<td><%= link_to payment_method_name(payment), admin_order_payment_path(@order, payment) %></td>
|
14
|
-
<td><%= payment.state.capitalize %></td>
|
14
|
+
<td><%= t(payment.state, :scope => :payment_states, :default => payment.state.capitalize) %></td>
|
15
15
|
<td>
|
16
16
|
<% payment.actions.each do |action| %>
|
17
17
|
<%= button_to t(action), fire_admin_order_payment_path(@order, payment, :e => action), :method => :put %>
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<h2><%= t("activerecord.models.#{@object.class.to_s.underscore}.one") %></h2>
|
4
4
|
|
5
5
|
<p>
|
6
|
-
<label><%= t("amount") %>:</label
|
6
|
+
<label><%= t("amount") %>:</label>
|
7
7
|
<%= object.amount %>
|
8
8
|
</p>
|
9
9
|
|
10
|
-
<%= render "admin/payments/source_views/#{@payment.payment_method.method_type}", :payment => object %>
|
10
|
+
<%= render "admin/payments/source_views/#{@payment.payment_method.method_type}", :payment => object.source.is_a?(Payment) ? object.source : object %>
|
@@ -26,19 +26,19 @@
|
|
26
26
|
<% end %>
|
27
27
|
|
28
28
|
|
29
|
-
<%= form_tag(admin_product_group_product_scopes_path(@product_group), 'data-remote' => true, :id => 'new_product_group_form') do
|
30
|
-
<%
|
31
|
-
options =
|
29
|
+
<%= form_tag(admin_product_group_product_scopes_path(@product_group), 'data-remote' => true, :id => 'new_product_group_form') do %>
|
30
|
+
<%
|
31
|
+
options =
|
32
32
|
grouped_options_for_select(
|
33
|
-
Scopes::Product::SCOPES.map do |group_name, scopes|
|
34
|
-
[
|
35
|
-
t(:name, :scope => [:product_scopes, :groups, group_name]),
|
33
|
+
Scopes::Product::SCOPES.map do |group_name, scopes|
|
34
|
+
[
|
35
|
+
t(:name, :scope => [:product_scopes, :groups, group_name]),
|
36
36
|
scopes.keys.map do |scope_name|
|
37
37
|
[ t(:name, :scope => [:product_scopes, :scopes, scope_name]), scope_name]
|
38
38
|
end
|
39
39
|
]
|
40
40
|
end
|
41
|
-
)
|
41
|
+
)
|
42
42
|
%>
|
43
43
|
<p>
|
44
44
|
<label for="product_scope_name"><%= t('add_scope') %></label>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class='toolbar'>
|
3
3
|
<ul class='actions'>
|
4
4
|
<li>
|
5
|
-
<%= button_link_to t("new_product_group"), new_object_url, :icon => 'add'
|
5
|
+
<%= button_link_to t("new_product_group"), new_object_url, :icon => 'add', :id => 'new_product_group_link' %>
|
6
6
|
</li>
|
7
7
|
</ul>
|
8
8
|
<br class='clear' />
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
<h1><%= t("listing_product_groups") %></h1>
|
12
12
|
|
13
|
-
<table class="index">
|
13
|
+
<table class="index" id='listing_product_groups'>
|
14
14
|
<thead>
|
15
15
|
<tr>
|
16
16
|
<th><%= ProductGroup.human_attribute_name("name") %></th>
|
@@ -27,7 +27,9 @@
|
|
27
27
|
<td><%= link_to pg_search_path(:product_group_name => pg.permalink), pg_search_path(:product_group_name => pg.permalink) %></td>
|
28
28
|
<td><%== pg.product_scopes.map(&:to_sentence).join("<br />") %></td>
|
29
29
|
<td><%= pg.products.count %></td>
|
30
|
-
<td
|
30
|
+
<td>
|
31
|
+
<%= link_to_edit pg, :class => 'admin_edit_product_group' %> <%= link_to_delete pg %>
|
32
|
+
</td>
|
31
33
|
</tr>
|
32
34
|
<% end %>
|
33
35
|
</tbody>
|
@@ -1,7 +1,8 @@
|
|
1
1
|
jQuery('#preview_container').html('<%= escape_javascript( render('admin/product_groups/preview') ) %>');
|
2
|
+
<% notice = flash.delete(:notice) %>
|
2
3
|
flash_notice = jQuery('.flash.notice');
|
3
|
-
if (flash_notice) {
|
4
|
-
flash_notice.html('<%=
|
4
|
+
if (flash_notice.length > 0) {
|
5
|
+
flash_notice.html('<%= notice %>');
|
5
6
|
} else {
|
6
|
-
jQuery('#content').
|
7
|
+
jQuery('#content h1').before('<div class="flash notice"><%= notice %></div>');
|
7
8
|
}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<tr class="product_property fields">
|
2
|
-
<td>
|
2
|
+
<td class='property_name'>
|
3
3
|
<%= f.text_field :property_name, :class => "autocomplete" %>
|
4
4
|
</td>
|
5
|
-
<td>
|
5
|
+
<td class='value'>
|
6
6
|
<%= f.text_field :value, :class => "autocomplete" %>
|
7
|
-
</td>
|
7
|
+
</td>
|
8
8
|
<td class="actions">
|
9
9
|
<%= link_to_remove_fields t("remove"), f %>
|
10
10
|
</td>
|
@@ -22,11 +22,16 @@
|
|
22
22
|
|
23
23
|
<input type="hidden" name="clear_product_properties" value="true">
|
24
24
|
|
25
|
-
<p>
|
26
|
-
<%= link_to_add_fields
|
25
|
+
<p class='add_product_properties'>
|
26
|
+
<%= link_to_add_fields icon('add') + ' ' + t("add_product_properties"),
|
27
|
+
"tbody#product_properties",
|
28
|
+
f,
|
29
|
+
:product_properties %>
|
30
|
+
|
27
31
|
|
32
|
+
|
28
33
|
<span id="new_ptype_link">
|
29
|
-
<%= link_to t("select_from_prototype"), available_admin_prototypes_url,
|
34
|
+
<%= link_to t("select_from_prototype"), available_admin_prototypes_url,
|
30
35
|
:remote => true, 'data-update' => "prototypes" %>
|
31
36
|
</span>
|
32
37
|
</p>
|
@@ -41,8 +46,8 @@
|
|
41
46
|
|
42
47
|
$("#product_properties input.autocomplete").live("keydown", function(){
|
43
48
|
already_auto_completed = $(this).is('ac_input');
|
44
|
-
if (!already_auto_completed) {
|
45
|
-
$(this).autocomplete(properties);
|
49
|
+
if (!already_auto_completed) {
|
50
|
+
$(this).autocomplete(properties);
|
46
51
|
$(this).focus();
|
47
52
|
}
|
48
53
|
});
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<div class='toolbar'>
|
4
4
|
<ul class='actions'>
|
5
5
|
<li id="new_product_link">
|
6
|
-
<%= button_link_to t("new_product"), new_object_url, {:remote => true, :icon => 'add'} %>
|
6
|
+
<%= button_link_to t("new_product"), new_object_url, {:remote => true, :icon => 'add', :id => 'admin_new_product'} %>
|
7
7
|
</li>
|
8
8
|
</ul>
|
9
9
|
<br class='clear' />
|
@@ -13,12 +13,12 @@
|
|
13
13
|
|
14
14
|
<div id="new_product"></div>
|
15
15
|
|
16
|
-
<table class="index">
|
16
|
+
<table class="index" id='listing_products'>
|
17
17
|
<tr>
|
18
18
|
<%= hook :admin_products_index_headers do %>
|
19
19
|
<th><%= t("sku") %></th>
|
20
|
-
<th><%=
|
21
|
-
<th><%=
|
20
|
+
<th><%= sort_link @search,:name, t("name"), {}, {:title => 'admin_products_listing_name_title'} %></th>
|
21
|
+
<th><%= sort_link @search,:master_price, t("master_price") %></th>
|
22
22
|
<% end %>
|
23
23
|
<th>
|
24
24
|
<%= hook :admin_products_index_header_actions %>
|
@@ -34,9 +34,9 @@
|
|
34
34
|
<% end %>
|
35
35
|
<td class="actions">
|
36
36
|
<%= hook :admin_products_index_row_actions, locals do %>
|
37
|
-
<%= link_to_edit product unless product.deleted? %>
|
37
|
+
<%= link_to_edit product, :class => 'edit' unless product.deleted? %>
|
38
38
|
|
39
|
-
<%= link_to_clone product %>
|
39
|
+
<%= link_to_clone product, :class => 'clone' %>
|
40
40
|
|
41
41
|
<%= link_to_delete product unless product.deleted? %>
|
42
42
|
<% end %>
|
@@ -47,35 +47,34 @@
|
|
47
47
|
<%= will_paginate(:previous_label => "« #{t('previous')}", :next_label => "#{t('next')} »") %>
|
48
48
|
|
49
49
|
<% content_for :sidebar do %>
|
50
|
+
<%= hook :admin_products_sidebar do %>
|
51
|
+
<%= form_for [:admin, @search] do |f| %>
|
52
|
+
<div class="box">
|
53
|
+
<h3><%= t(:search) %></h3>
|
50
54
|
|
51
|
-
|
52
|
-
|
53
|
-
|
55
|
+
<%- locals = {:f => f} %>
|
56
|
+
<%= hook :admin_products_index_search, locals do %>
|
57
|
+
<p>
|
58
|
+
<%= f.label :name_contains, t("name") %><br />
|
59
|
+
<%= f.text_field :name_contains, :size => 15 %>
|
60
|
+
</p>
|
61
|
+
<p>
|
62
|
+
<%= f.label :variants_including_master_sku_contains, t("sku") %><br />
|
63
|
+
<%= f.text_field :variants_including_master_sku_contains, :size => 15 %>
|
64
|
+
</p>
|
65
|
+
<p>
|
66
|
+
<%= f.label :deleted_at_is_null, t("show_deleted") %><br />
|
67
|
+
<%= f.check_box :deleted_at_is_null, {:checked => params[:search][:deleted_at_is_null].blank?}, "", "1" %>
|
68
|
+
</p>
|
69
|
+
<% end %>
|
54
70
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
<p>
|
63
|
-
<label><%= t("sku") %></label><br />
|
64
|
-
<%= f.text_field :variants_including_master_sku_contains, :size => 15 %>
|
65
|
-
</p>
|
66
|
-
<p>
|
67
|
-
<label><%= t("show_deleted") %></label><br />
|
68
|
-
<%= f.check_box :deleted_at_not_null, {:checked => (params[:search] and !params[:search][:deleted_at_not_null].blank?)}, "1", "" %>
|
69
|
-
</p>
|
70
|
-
<% end %>
|
71
|
-
|
72
|
-
<%= hook :admin_products_index_search_buttons, locals do %>
|
73
|
-
<p class="form-buttons">
|
74
|
-
<%= button t("search") %>
|
75
|
-
</p>
|
76
|
-
<% end %>
|
77
|
-
</div>
|
71
|
+
<%= hook :admin_products_index_search_buttons, locals do %>
|
72
|
+
<p class="form-buttons">
|
73
|
+
<%= button t("search") %>
|
74
|
+
</p>
|
75
|
+
<% end %>
|
76
|
+
</div>
|
77
|
+
<% end %>
|
78
78
|
<% end %>
|
79
|
-
|
80
79
|
<% end %>
|
81
80
|
|