solidus_backend 2.0.3 → 2.1.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of solidus_backend might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree/backend/handlebars_extensions.coffee +14 -6
- data/app/assets/javascripts/spree/backend/images/upload.js +203 -0
- data/app/assets/javascripts/spree/backend/option_value_picker.js +2 -1
- data/app/assets/javascripts/spree/backend/stock_management/index_update_forms.coffee +1 -1
- data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +5 -1
- data/app/assets/javascripts/spree/backend/taxons.js.coffee +1 -1
- data/app/assets/javascripts/spree/backend/templates/index.js +15 -0
- data/app/assets/javascripts/spree/backend/templates/products/upload_progress.hbs +12 -0
- data/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_flat_rate.hbs +13 -11
- data/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_percent.hbs +12 -10
- data/app/assets/javascripts/spree/backend/templates/promotions/rules/option_values.hbs +7 -5
- data/app/assets/javascripts/spree/backend.js +57 -3
- data/app/assets/stylesheets/spree/backend/_bootstrap_custom.scss +1 -1
- data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +2 -0
- data/app/assets/stylesheets/spree/backend/components/_table-filter.scss +3 -1
- data/app/assets/stylesheets/spree/backend/components/_tabs.scss +2 -0
- data/app/assets/stylesheets/spree/backend/sections/_adjustments.scss +3 -0
- data/app/assets/stylesheets/spree/backend/sections/_products.scss +29 -17
- data/app/assets/stylesheets/spree/backend/sections/_stock_management.scss +6 -0
- data/app/assets/stylesheets/spree/backend/shared/_header.scss +2 -0
- data/app/assets/stylesheets/spree/backend/shared/_layout.scss +5 -0
- data/app/assets/stylesheets/spree/backend/shared/_utilities.scss +1 -2
- data/app/assets/stylesheets/spree/backend/spree_admin.scss +1 -3
- data/app/controllers/spree/admin/orders_controller.rb +2 -0
- data/app/controllers/spree/admin/payments_controller.rb +1 -1
- data/app/controllers/spree/admin/prices_controller.rb +7 -1
- data/app/controllers/spree/admin/products_controller.rb +0 -6
- data/app/controllers/spree/admin/promotions_controller.rb +0 -2
- data/app/controllers/spree/admin/users_controller.rb +3 -0
- data/app/helpers/spree/admin/adjustments_helper.rb +1 -1
- data/app/helpers/spree/admin/base_helper.rb +0 -35
- data/app/helpers/spree/admin/stock_transfers_helper.rb +14 -0
- data/app/models/spree/backend_configuration.rb +2 -2
- data/app/views/spree/admin/adjustment_reasons/index.html.erb +1 -1
- data/app/views/spree/admin/adjustment_reasons/shared/_form.html.erb +14 -16
- data/app/views/spree/admin/adjustments/_adjustment.html.erb +4 -1
- data/app/views/spree/admin/adjustments/_form.html.erb +24 -20
- data/app/views/spree/admin/cancellations/index.html.erb +2 -3
- data/app/views/spree/admin/countries/_form.html.erb +4 -4
- data/app/views/spree/admin/customer_returns/index.html.erb +1 -1
- data/app/views/spree/admin/customer_returns/new.html.erb +5 -7
- data/app/views/spree/admin/general_settings/edit.html.erb +55 -46
- data/app/views/spree/admin/images/_form.html.erb +13 -11
- data/app/views/spree/admin/images/_image_row.html.erb +22 -0
- data/app/views/spree/admin/images/create.js.erb +9 -0
- data/app/views/spree/admin/images/edit.html.erb +12 -8
- data/app/views/spree/admin/images/index.html.erb +57 -49
- data/app/views/spree/admin/option_types/_form.html.erb +2 -2
- data/app/views/spree/admin/option_types/index.html.erb +1 -1
- data/app/views/spree/admin/orders/_add_line_item.html.erb +5 -3
- data/app/views/spree/admin/orders/_add_product.html.erb +5 -3
- data/app/views/spree/admin/orders/_shipment.html.erb +14 -6
- data/app/views/spree/admin/orders/cart.html.erb +1 -1
- data/app/views/spree/admin/orders/confirm/_customer_details.html.erb +17 -15
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +28 -26
- data/app/views/spree/admin/orders/customer_details/show.html.erb +1 -1
- data/app/views/spree/admin/orders/edit.html.erb +1 -1
- data/app/views/spree/admin/orders/index.html.erb +70 -63
- data/app/views/spree/admin/payment_methods/_form.html.erb +54 -48
- data/app/views/spree/admin/payment_methods/index.html.erb +7 -5
- data/app/views/spree/admin/payments/_form.html.erb +2 -2
- data/app/views/spree/admin/payments/index.html.erb +1 -1
- data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +32 -30
- data/app/views/spree/admin/payments/source_forms/_storecredit.html.erb +1 -0
- data/app/views/spree/admin/payments/source_views/_gateway.html.erb +1 -1
- data/app/views/spree/admin/payments/source_views/_storecredit.html.erb +8 -1
- data/app/views/spree/admin/prices/_form.html.erb +38 -43
- data/app/views/spree/admin/prices/_master_variant_table.html.erb +41 -0
- data/app/views/spree/admin/prices/_table.html.erb +35 -33
- data/app/views/spree/admin/prices/index.html.erb +37 -35
- data/app/views/spree/admin/product_properties/index.html.erb +0 -7
- data/app/views/spree/admin/products/_form.html.erb +153 -144
- data/app/views/spree/admin/products/edit.html.erb +1 -1
- data/app/views/spree/admin/products/index.html.erb +19 -13
- data/app/views/spree/admin/products/new.html.erb +5 -38
- data/app/views/spree/admin/promotion_categories/_form.html.erb +1 -1
- data/app/views/spree/admin/promotion_rules/create.js.erb +6 -0
- data/app/views/spree/admin/promotions/_actions.html.erb +1 -1
- data/app/views/spree/admin/promotions/_form.html.erb +48 -44
- data/app/views/spree/admin/promotions/_promotion_rule.html.erb +1 -1
- data/app/views/spree/admin/promotions/_rules.html.erb +8 -4
- data/app/views/spree/admin/promotions/actions/_create_quantity_adjustments.html.erb +9 -5
- data/app/views/spree/admin/promotions/actions/_promotion_calculators_with_custom_fields.html.erb +30 -24
- data/app/views/spree/admin/promotions/edit.html.erb +2 -2
- data/app/views/spree/admin/promotions/index.html.erb +22 -20
- data/app/views/spree/admin/promotions/new.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_first_repeat_purchase_since.html.erb +11 -5
- data/app/views/spree/admin/promotions/rules/_item_total.html.erb +18 -8
- data/app/views/spree/admin/promotions/rules/_landing_page.html.erb +7 -5
- data/app/views/spree/admin/promotions/rules/_nth_order.html.erb +13 -6
- data/app/views/spree/admin/promotions/rules/_option_value.html.erb +11 -7
- data/app/views/spree/admin/promotions/rules/_product.html.erb +11 -7
- data/app/views/spree/admin/promotions/rules/_taxon.html.erb +15 -9
- data/app/views/spree/admin/promotions/rules/_user.html.erb +5 -3
- data/app/views/spree/admin/promotions/rules/_user_role.html.erb +12 -0
- data/app/views/spree/admin/properties/_form.html.erb +2 -2
- data/app/views/spree/admin/properties/index.html.erb +7 -5
- data/app/views/spree/admin/refund_reasons/index.html.erb +1 -1
- data/app/views/spree/admin/refund_reasons/shared/_form.html.erb +14 -16
- data/app/views/spree/admin/refunds/edit.html.erb +2 -2
- data/app/views/spree/admin/refunds/new.html.erb +4 -4
- data/app/views/spree/admin/shared/_configuration_menu.html.erb +0 -4
- data/app/views/spree/admin/shared/_head.html.erb +1 -1
- data/app/views/spree/admin/shared/_product_sub_menu.html.erb +0 -3
- data/app/views/spree/admin/shared/_rebuild_vat_prices_checkbox.html.erb +1 -1
- data/app/views/spree/admin/shared/_settings_sub_menu.html.erb +2 -2
- data/app/views/spree/admin/shared/_sidebar.html.erb +1 -1
- data/app/views/spree/admin/shared/_variant_search.html.erb +12 -8
- data/app/views/spree/admin/shared/named_types/_form.html.erb +1 -1
- data/app/views/spree/admin/shared/named_types/_index.html.erb +1 -1
- data/app/views/spree/admin/shipping_categories/index.html.erb +1 -1
- data/app/views/spree/admin/shipping_methods/_form.html.erb +74 -81
- data/app/views/spree/admin/shipping_methods/index.html.erb +3 -3
- data/app/views/spree/admin/states/_form.html.erb +2 -2
- data/app/views/spree/admin/states/index.html.erb +9 -5
- data/app/views/spree/admin/stock_locations/_form.html.erb +42 -28
- data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +4 -4
- data/app/views/spree/admin/stock_locations/index.html.erb +1 -1
- data/app/views/spree/admin/stock_movements/_form.html.erb +1 -1
- data/app/views/spree/admin/stock_movements/index.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/_stock_movements.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/_transfer_item_table.html.erb +10 -1
- data/app/views/spree/admin/stock_transfers/index.html.erb +29 -27
- data/app/views/spree/admin/stock_transfers/show.html.erb +26 -24
- data/app/views/spree/admin/store_credits/_form.html.erb +3 -3
- data/app/views/spree/admin/store_credits/_update_reason_field.html.erb +1 -1
- data/app/views/spree/admin/store_credits/edit_amount.html.erb +1 -1
- data/app/views/spree/admin/store_credits/index.html.erb +2 -2
- data/app/views/spree/admin/style_guide/topics/forms/_building_forms.html.erb +49 -47
- data/app/views/spree/admin/style_guide/topics/messaging/_loading.html.erb +11 -1
- data/app/views/spree/admin/tax_categories/_form.html.erb +4 -4
- data/app/views/spree/admin/tax_categories/index.html.erb +1 -1
- data/app/views/spree/admin/tax_rates/_form.html.erb +28 -28
- data/app/views/spree/admin/tax_rates/index.html.erb +1 -1
- data/app/views/spree/admin/taxonomies/index.html.erb +1 -1
- data/app/views/spree/admin/taxons/_form.html.erb +6 -6
- data/app/views/spree/admin/taxons/index.html.erb +2 -2
- data/app/views/spree/admin/users/_addresses_form.html.erb +19 -15
- data/app/views/spree/admin/users/_form.html.erb +9 -6
- data/app/views/spree/admin/users/_user_page_actions.html.erb +1 -1
- data/app/views/spree/admin/users/addresses.html.erb +1 -1
- data/app/views/spree/admin/users/edit.html.erb +2 -2
- data/app/views/spree/admin/users/items.html.erb +2 -2
- data/app/views/spree/admin/users/orders.html.erb +2 -2
- data/app/views/spree/admin/variants/_form.html.erb +73 -49
- data/app/views/spree/admin/variants/_table_filter.html.erb +12 -8
- data/app/views/spree/admin/variants/index.html.erb +2 -2
- data/app/views/spree/admin/zones/_country_members.html.erb +1 -1
- data/app/views/spree/admin/zones/_form.html.erb +34 -31
- data/app/views/spree/admin/zones/_state_members.html.erb +1 -1
- data/app/views/spree/admin/zones/index.html.erb +1 -3
- data/app/views/spree/layouts/admin.html.erb +4 -4
- data/config/routes.rb +0 -11
- data/solidus_backend.gemspec +4 -1
- data/spec/controllers/spree/admin/payments_controller_spec.rb +2 -3
- data/spec/controllers/spree/admin/prices_controller_spec.rb +5 -3
- data/spec/features/admin/configuration/general_settings_spec.rb +12 -0
- data/spec/features/admin/configuration/payment_methods_spec.rb +3 -2
- data/spec/features/admin/configuration/shipping_methods_spec.rb +1 -1
- data/spec/features/admin/homepage_spec.rb +0 -3
- data/spec/features/admin/orders/adjustments_spec.rb +28 -25
- data/spec/features/admin/orders/customer_details_spec.rb +1 -1
- data/spec/features/admin/orders/order_details_spec.rb +27 -1
- data/spec/features/admin/orders/payments_spec.rb +1 -1
- data/spec/features/admin/products/edit/images_spec.rb +28 -1
- data/spec/features/admin/products/pricing_spec.rb +17 -2
- data/spec/features/admin/products/products_spec.rb +0 -104
- data/spec/features/admin/store_credits_spec.rb +3 -3
- data/spec/features/admin/users_spec.rb +7 -1
- metadata +21 -32
- data/app/assets/javascripts/spree/backend/nested-attribute.js +0 -27
- data/app/assets/stylesheets/spree/backend/sections/_adjustments_table.scss +0 -8
- data/app/assets/stylesheets/spree/backend/sections/_edit_checkouts.scss +0 -72
- data/app/assets/stylesheets/spree/backend/sections/_tax_zones.scss +0 -15
- data/app/controllers/spree/admin/prototypes_controller.rb +0 -26
- data/app/controllers/spree/admin/trackers_controller.rb +0 -6
- data/app/views/spree/admin/prototypes/_form.html.erb +0 -36
- data/app/views/spree/admin/prototypes/_prototypes.html.erb +0 -25
- data/app/views/spree/admin/prototypes/available.js.erb +0 -2
- data/app/views/spree/admin/prototypes/edit.html.erb +0 -15
- data/app/views/spree/admin/prototypes/index.html.erb +0 -50
- data/app/views/spree/admin/prototypes/new.html.erb +0 -9
- data/app/views/spree/admin/prototypes/new.js.erb +0 -5
- data/app/views/spree/admin/prototypes/select.js.erb +0 -4
- data/app/views/spree/admin/prototypes/show.html.erb +0 -42
- data/app/views/spree/admin/trackers/_form.html.erb +0 -28
- data/app/views/spree/admin/trackers/edit.html.erb +0 -19
- data/app/views/spree/admin/trackers/index.html.erb +0 -54
- data/app/views/spree/admin/trackers/new.html.erb +0 -18
- data/spec/features/admin/configuration/analytics_tracker_spec.rb +0 -50
- data/spec/features/admin/products/prototypes_spec.rb +0 -110
@@ -11,57 +11,65 @@
|
|
11
11
|
|
12
12
|
<div id="images" data-hook></div>
|
13
13
|
|
14
|
-
|
15
|
-
<
|
16
|
-
|
14
|
+
<fieldset>
|
15
|
+
<legend align="center"><%= t(".upload_images") %></legend>
|
16
|
+
|
17
|
+
<div id="upload-zone">
|
18
|
+
<%= form_for [:admin, @product, Spree::Image.new],
|
19
|
+
:html => { :multipart => true, id: 'upload-form' } do |f| %>
|
20
|
+
<label class="upload">
|
21
|
+
<i class="fa fa-5x fa-cloud-upload"></i>
|
22
|
+
<p>
|
23
|
+
<span class="button"><%= t(".choose_files") %></span>
|
24
|
+
</p>
|
25
|
+
<p>
|
26
|
+
<%= t(".drag_and_drop") %>
|
27
|
+
</p>
|
28
|
+
|
29
|
+
<%= f.file_field :attachment, multiple: '', class: 'hidden' %>
|
30
|
+
<%= f.hidden_field :viewable_id, value: @product.master.id %>
|
31
|
+
</label>
|
32
|
+
<% end %>
|
17
33
|
</div>
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
34
|
+
|
35
|
+
|
36
|
+
<p id="filereader">File API & FileReader API not supported</p>
|
37
|
+
<p id="formdata">XHR2's FormData is not supported</p>
|
38
|
+
<p id="progress">XHR2's upload progress isn't supported</p>
|
39
|
+
|
40
|
+
<div id="progress-zone" class="row"></div>
|
41
|
+
</fieldset>
|
42
|
+
|
43
|
+
<% no_images = @product.images.empty? && @product.variant_images.empty? %>
|
44
|
+
|
45
|
+
<table class="index sortable <%= 'hidden' if no_images %>" id="images-table" data-hook="images_table" data-sortable-link="<%= update_positions_admin_product_images_url(@product) %>">
|
46
|
+
<colgroup>
|
47
|
+
<col style="width: 5%">
|
48
|
+
<col style="width: 10%">
|
49
|
+
<% if @product.has_variants? %>
|
50
|
+
<col style="width: 25%">
|
51
|
+
<% end %>
|
52
|
+
<col style="width: 45%">
|
53
|
+
<col style="width: 15%">
|
54
|
+
</colgroup>
|
55
|
+
<thead>
|
56
|
+
<tr data-hook="images_header">
|
57
|
+
<th colspan="2"><%= Spree.t(:thumbnail) %></th>
|
23
58
|
<% if @product.has_variants? %>
|
24
|
-
<
|
59
|
+
<th><%= Spree::Variant.model_name.human %></th>
|
25
60
|
<% end %>
|
26
|
-
<
|
27
|
-
<
|
28
|
-
</
|
29
|
-
|
30
|
-
<tr data-hook="images_header">
|
31
|
-
<th colspan="2"><%= Spree.t(:thumbnail) %></th>
|
32
|
-
<% if @product.has_variants? %>
|
33
|
-
<th><%= Spree::Variant.model_name.human %></th>
|
34
|
-
<% end %>
|
35
|
-
<th><%= Spree::Image.human_attribute_name(:alt) %></th>
|
36
|
-
<th class="actions"></th>
|
37
|
-
</tr>
|
38
|
-
</thead>
|
61
|
+
<th><%= Spree::Image.human_attribute_name(:alt) %></th>
|
62
|
+
<th class="actions"></th>
|
63
|
+
</tr>
|
64
|
+
</thead>
|
39
65
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<%= link_to image_tag(image.attachment.url(:mini)), image.attachment.url(:product) %>
|
50
|
-
</td>
|
51
|
-
<% if @product.has_variants? %>
|
52
|
-
<td><%= options_text_for(image) %></td>
|
53
|
-
<% end %>
|
54
|
-
<td><%= image.alt %></td>
|
55
|
-
<td class="actions">
|
56
|
-
<% if can?(:update, image) %>
|
57
|
-
<%= link_to_with_icon 'edit', Spree.t('actions.edit'), edit_admin_product_image_url(@product, image), :no_text => true, :data => {:action => 'edit'} %>
|
58
|
-
<% end %>
|
59
|
-
<% if can?(:destroy, image) %>
|
60
|
-
<%= link_to_delete image, { :url => admin_product_image_url(@product, image), :no_text => true } %>
|
61
|
-
<% end %>
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
<% end %>
|
65
|
-
</tbody>
|
66
|
-
</table>
|
66
|
+
<tbody>
|
67
|
+
<%= render partial: 'image_row', collection: @product.variant_images, as: :image %>
|
68
|
+
</tbody>
|
69
|
+
</table>
|
70
|
+
|
71
|
+
<% if no_images %>
|
72
|
+
<div class="no-objects-found">
|
73
|
+
<%= Spree.t(:no_images_found) %>.
|
74
|
+
</div>
|
67
75
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div data-hook="admin_option_type_form_fields" class="align-center row">
|
2
|
-
<div class="
|
2
|
+
<div class="col-xs-6">
|
3
3
|
<%= f.field_container :name do %>
|
4
4
|
<%= f.label :name, class: 'required' %><br />
|
5
5
|
<%= f.text_field :name, :class => "fullwidth" %>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<% end %>
|
8
8
|
</div>
|
9
9
|
|
10
|
-
<div class="
|
10
|
+
<div class="col-xs-6">
|
11
11
|
<%= f.field_container :presentation do %>
|
12
12
|
<%= f.label :presentation, class: 'required' %><br />
|
13
13
|
<%= f.text_field :presentation, :class => "fullwidth" %>
|
@@ -2,9 +2,11 @@
|
|
2
2
|
<fieldset class="no-border-bottom">
|
3
3
|
<legend align="center"><%= Spree.t(:add_product) %></legend>
|
4
4
|
|
5
|
-
<div
|
6
|
-
|
7
|
-
|
5
|
+
<div class="col-xs-9">
|
6
|
+
<div data-hook="add_product_name" class="field">
|
7
|
+
<%= label_tag :add_line_item_variant_id, Spree.t(:name_or_sku) %>
|
8
|
+
<%= text_field_tag :add_line_item_variant_id, "", :class => "variant_autocomplete fullwidth" %>
|
9
|
+
</div>
|
8
10
|
</div>
|
9
11
|
|
10
12
|
</fieldset>
|
@@ -2,9 +2,11 @@
|
|
2
2
|
<fieldset class="no-border-bottom">
|
3
3
|
<legend align="center"><%= Spree.t(:add_product) %></legend>
|
4
4
|
|
5
|
-
<div
|
6
|
-
|
7
|
-
|
5
|
+
<div class="col-xs-9">
|
6
|
+
<div data-hook="add_product_name" class="field">
|
7
|
+
<%= label_tag :add_variant_id, Spree.t(:name_or_sku) %>
|
8
|
+
<%= text_field_tag :add_variant_id, "", :class => "variant_autocomplete fullwidth" %>
|
9
|
+
</div>
|
8
10
|
</div>
|
9
11
|
|
10
12
|
</fieldset>
|
@@ -1,7 +1,11 @@
|
|
1
1
|
<% admin_breadcrumb(plural_resource_name(Spree::Shipment)) %>
|
2
2
|
|
3
3
|
|
4
|
-
<%
|
4
|
+
<%
|
5
|
+
manifest_items = Spree::ShippingManifest.new(
|
6
|
+
inventory_units: shipment.inventory_units.where(carton_id: nil),
|
7
|
+
).items.sort_by { |item| item.line_item.created_at }
|
8
|
+
%>
|
5
9
|
|
6
10
|
<div id="<%= "shipment_#{shipment.id}" %>" class="js-shipment-edit" data-hook="admin_shipment_form">
|
7
11
|
<fieldset class="no-border-bottom">
|
@@ -48,11 +52,15 @@
|
|
48
52
|
<% unless shipment.shipped? %>
|
49
53
|
<tr class="edit-method hidden total">
|
50
54
|
<td colspan="5">
|
51
|
-
<div class="
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
55
|
+
<div class="row">
|
56
|
+
<div class="col-xs-4">
|
57
|
+
<div class="field">
|
58
|
+
<%= label_tag 'selected_shipping_rate_id', Spree::ShippingMethod.model_name.human %>
|
59
|
+
<%= select_tag :selected_shipping_rate_id,
|
60
|
+
options_for_select(shipment.shipping_rates.map {|sr| ["#{sr.name} #{sr.display_price}", sr.id] }, shipment.selected_shipping_rate_id),
|
61
|
+
{:class => 'select2 fullwidth', :data => {'shipment-number' => shipment.number } } %>
|
62
|
+
</div>
|
63
|
+
</div>
|
56
64
|
</div>
|
57
65
|
</td>
|
58
66
|
<td class="actions">
|
@@ -17,7 +17,7 @@
|
|
17
17
|
</div>
|
18
18
|
|
19
19
|
<% if @order.payments.exists? && @order.is_risky? %>
|
20
|
-
<%= render 'spree/admin/orders/risk_analysis', latest_payment: @order.payments.
|
20
|
+
<%= render 'spree/admin/orders/risk_analysis', latest_payment: @order.payments.reorder("created_at DESC").first %>
|
21
21
|
<% end %>
|
22
22
|
|
23
23
|
<% if can?(:update, @order) && can?(:create, Spree::LineItem) %>
|
@@ -4,21 +4,23 @@
|
|
4
4
|
</fieldsset>
|
5
5
|
|
6
6
|
<fieldset class="no-border-bottom no-border-top">
|
7
|
-
<div
|
8
|
-
<
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
<div class="row">
|
8
|
+
<div data-hook="bill_address_wrapper" class="col-xs-6">
|
9
|
+
<fieldset class="no-border-bottom">
|
10
|
+
<legend align="center"><%= Spree.t(:billing_address) %></legend>
|
11
|
+
<% if order.bill_address %>
|
12
|
+
<%= render partial: 'spree/admin/shared/address', locals: {address: order.bill_address} %>
|
13
|
+
<% end %>
|
14
|
+
</fieldset>
|
15
|
+
</div>
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
<div class="col-xs-6" data-hook="ship_address_wrapper">
|
18
|
+
<fieldset class="no-border-bottom">
|
19
|
+
<legend align="center"><%= Spree.t(:shipping_address) %></legend>
|
20
|
+
<% if order.ship_address %>
|
21
|
+
<%= render partial: 'spree/admin/shared/address', locals: {address: order.ship_address} %>
|
22
|
+
<% end %>
|
23
|
+
</fieldset>
|
24
|
+
</div>
|
23
25
|
</div>
|
24
26
|
</fieldset>
|
@@ -4,13 +4,13 @@
|
|
4
4
|
<legend align="center"><%= Spree.t(:account) %></legend>
|
5
5
|
|
6
6
|
<div data-hook="customer_fields" class="row">
|
7
|
-
<div class="
|
7
|
+
<div class="col-xs-9">
|
8
8
|
<div class="field">
|
9
9
|
<%= f.label :email %>
|
10
10
|
<%= f.email_field :email, :class => 'fullwidth' %>
|
11
11
|
</div>
|
12
12
|
</div>
|
13
|
-
<div class="
|
13
|
+
<div class="col-xs-3">
|
14
14
|
<div class="field">
|
15
15
|
<%= label_tag nil, Spree.t(:guest_checkout) %>
|
16
16
|
<ul>
|
@@ -36,34 +36,36 @@
|
|
36
36
|
</div>
|
37
37
|
</fieldset>
|
38
38
|
|
39
|
-
<div class="
|
40
|
-
<
|
41
|
-
<legend align="center"><%= Spree.t(:shipping_address) %></legend>
|
42
|
-
<%= f.fields_for :ship_address do |sa_form| %>
|
43
|
-
<% if Spree::Config[:order_bill_address_used] %>
|
44
|
-
<div class="field" style="position: absolute;margin-top: -15px;left: 0;">
|
45
|
-
<span data-hook="use_billing">
|
46
|
-
<%= check_box_tag 'order[use_billing]', '1', ((@order.bill_address.empty? && @order.ship_address.empty?) && @order.bill_address == @order.ship_address) %>
|
47
|
-
<%= label_tag 'order[use_billing]', Spree.t(:use_billing_address) %>
|
48
|
-
</span>
|
49
|
-
</div>
|
50
|
-
<% end %>
|
51
|
-
|
52
|
-
<%= render :partial => 'spree/admin/shared/address_form', :locals => { :f => sa_form, :type => 'shipping' } %>
|
53
|
-
<% end %>
|
54
|
-
</fieldset>
|
55
|
-
</div>
|
56
|
-
|
57
|
-
<% if Spree::Config[:order_bill_address_used] %>
|
58
|
-
<div class="omega six columns" data-hook="bill_address_wrapper">
|
39
|
+
<div class="row">
|
40
|
+
<div class="col-xs-6" data-hook="ship_address_wrapper">
|
59
41
|
<fieldset class="no-border-bottom">
|
60
|
-
<legend align="center"><%= Spree.t(:
|
61
|
-
<%= f.fields_for :
|
62
|
-
|
42
|
+
<legend align="center"><%= Spree.t(:shipping_address) %></legend>
|
43
|
+
<%= f.fields_for :ship_address do |sa_form| %>
|
44
|
+
<% if Spree::Config[:order_bill_address_used] %>
|
45
|
+
<div class="field" style="position: absolute;margin-top: -15px;left: 0;">
|
46
|
+
<span data-hook="use_billing">
|
47
|
+
<%= check_box_tag 'order[use_billing]', '1', ((@order.bill_address.empty? && @order.ship_address.empty?) && @order.bill_address == @order.ship_address) %>
|
48
|
+
<%= label_tag 'order[use_billing]', Spree.t(:use_billing_address) %>
|
49
|
+
</span>
|
50
|
+
</div>
|
51
|
+
<% end %>
|
52
|
+
|
53
|
+
<%= render :partial => 'spree/admin/shared/address_form', :locals => { :f => sa_form, :type => 'shipping' } %>
|
63
54
|
<% end %>
|
64
55
|
</fieldset>
|
65
56
|
</div>
|
66
|
-
|
57
|
+
|
58
|
+
<% if Spree::Config[:order_bill_address_used] %>
|
59
|
+
<div class="col-xs-6" data-hook="bill_address_wrapper">
|
60
|
+
<fieldset class="no-border-bottom">
|
61
|
+
<legend align="center"><%= Spree.t(:billing_address) %></legend>
|
62
|
+
<%= f.fields_for :bill_address do |ba_form| %>
|
63
|
+
<%= render :partial => 'spree/admin/shared/address_form', :locals => { :f => ba_form, :type => "billing" } %>
|
64
|
+
<% end %>
|
65
|
+
</fieldset>
|
66
|
+
</div>
|
67
|
+
<% end %>
|
68
|
+
</div>
|
67
69
|
|
68
70
|
<div class="clear"></div>
|
69
71
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
</div>
|
15
15
|
|
16
16
|
<% if @order.payments.exists? && @order.is_risky? %>
|
17
|
-
<%= render 'spree/admin/orders/risk_analysis', latest_payment: @order.payments.
|
17
|
+
<%= render 'spree/admin/orders/risk_analysis', latest_payment: @order.payments.reorder("created_at DESC").first %>
|
18
18
|
<% end %>
|
19
19
|
|
20
20
|
<% if can?(:update, Spree::Shipment) && can?(:update, @order) && @order.shipment_state != "shipped" %>
|
@@ -14,81 +14,88 @@
|
|
14
14
|
<% content_for :table_filter do %>
|
15
15
|
<div data-hook="admin_orders_index_search">
|
16
16
|
<%= search_form_for [:admin, @search] do |f| %>
|
17
|
-
<div class="
|
18
|
-
<div class="
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
<
|
25
|
-
|
26
|
-
|
27
|
-
|
17
|
+
<div class="row">
|
18
|
+
<div class="field-block col-xs-3">
|
19
|
+
<div class="date-range-filter field">
|
20
|
+
<%= label_tag :q_created_at_gt, Spree.t(:date_range) %>
|
21
|
+
<div class="date-range-fields">
|
22
|
+
<%= f.text_field :created_at_gt, :class => 'datepicker datepicker-from', :value => params[:q][:created_at_gt], :placeholder => Spree.t(:start) %>
|
23
|
+
|
24
|
+
<span class="range-divider">
|
25
|
+
<i class="fa fa-arrow-right"></i>
|
26
|
+
</span>
|
27
|
+
|
28
|
+
<%= f.text_field :created_at_lt, :class => 'datepicker datepicker-to', :value => params[:q][:created_at_lt], :placeholder => Spree.t(:stop) %>
|
29
|
+
</div>
|
28
30
|
</div>
|
29
|
-
</div>
|
30
31
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
<div class="field">
|
37
|
-
<%= label_tag nil, Spree.t(:promotion) %>
|
38
|
-
<%= f.text_field :promotions_codes_value_cont, :size => 25 %>
|
39
|
-
</div>
|
32
|
+
<div class="field">
|
33
|
+
<%= label_tag :q_state_eq, Spree.t(:status) %>
|
34
|
+
<%= f.select :state_eq, Spree::Order.state_machines[:state].states.collect {|s| [Spree.t("order_state.#{s.name}"), s.value]}, {:include_blank => true}, :class => 'select2' %>
|
35
|
+
</div>
|
40
36
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
37
|
+
<div class="field">
|
38
|
+
<%= label_tag nil, Spree.t(:promotion) %>
|
39
|
+
<%= f.text_field :promotions_codes_value_cont, :size => 25 %>
|
40
|
+
</div>
|
45
41
|
|
46
|
-
|
42
|
+
<div class="field">
|
43
|
+
<%= label_tag nil, Spree.t(:shipment_number) %>
|
44
|
+
<%= f.text_field :shipments_number_cont %>
|
45
|
+
</div>
|
47
46
|
|
48
|
-
<div class="four columns">
|
49
|
-
<div class="field">
|
50
|
-
<%= label_tag :q_number_cont, Spree.t(:order_number, :number => '') %>
|
51
|
-
<%= f.text_field :number_cont %>
|
52
47
|
</div>
|
53
48
|
|
54
|
-
<div class="
|
55
|
-
|
56
|
-
|
49
|
+
<div class="col-xs-6">
|
50
|
+
<div class="row">
|
51
|
+
<div class="col-xs-6">
|
52
|
+
<div class="field">
|
53
|
+
<%= label_tag :q_number_cont, Spree.t(:order_number, :number => '') %>
|
54
|
+
<%= f.text_field :number_cont %>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<div class="field">
|
58
|
+
<%= label_tag :q_email_cont, Spree.t(:email) %>
|
59
|
+
<%= f.text_field :email_cont %>
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
|
63
|
+
<div class="col-xs-6">
|
64
|
+
<div class="field">
|
65
|
+
<%= label_tag :q_bill_address_firstname_start, Spree.t(:first_name_begins_with) %>
|
66
|
+
<%= f.text_field :bill_address_firstname_start, :size => 25 %>
|
67
|
+
</div>
|
68
|
+
<div class="field">
|
69
|
+
<%= label_tag :q_bill_address_lastname_start, Spree.t(:last_name_begins_with) %>
|
70
|
+
<%= f.text_field :bill_address_lastname_start, :size => 25%>
|
71
|
+
</div>
|
72
|
+
</div>
|
73
|
+
|
74
|
+
<div class="col-xs-12">
|
75
|
+
<div class="field" data-hook="sku-select">
|
76
|
+
<%= label_tag :q_line_items_variant_id_in, Spree.t(:variant) %>
|
77
|
+
<%= f.text_field :line_items_variant_id_in, class: "variant_autocomplete fullwidth" %>
|
78
|
+
</div>
|
79
|
+
</div>
|
80
|
+
</div>
|
57
81
|
</div>
|
58
|
-
</div>
|
59
82
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
<%= f.text_field :bill_address_lastname_start, :size => 25%>
|
68
|
-
</div>
|
69
|
-
</div>
|
83
|
+
<div class="col-xs-3">
|
84
|
+
<% if Spree::Store.count > 1 %>
|
85
|
+
<div class="field">
|
86
|
+
<%= label_tag nil, Spree.t(:store) %>
|
87
|
+
<%= f.select :store_id_eq, Spree::Store.all.map { |s| [s.name, s.id] }, { include_blank: true }, { class: "select2" } %>
|
88
|
+
</div>
|
89
|
+
<% end %>
|
70
90
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
91
|
+
<div class="field checkbox">
|
92
|
+
<label>
|
93
|
+
<%= f.check_box :completed_at_not_null, {:checked => @show_only_completed}, '1', '0' %>
|
94
|
+
<%= Spree.t(:show_only_complete_orders) %>
|
95
|
+
</label>
|
76
96
|
</div>
|
77
|
-
<% end %>
|
78
|
-
|
79
|
-
<div class="field checkbox">
|
80
|
-
<label>
|
81
|
-
<%= f.check_box :completed_at_not_null, {:checked => @show_only_completed}, '1', '0' %>
|
82
|
-
<%= Spree.t(:show_only_complete_orders) %>
|
83
|
-
</label>
|
84
97
|
</div>
|
85
|
-
</div>
|
86
98
|
|
87
|
-
<div class="omega eight columns">
|
88
|
-
<div class="field" data-hook="sku-select">
|
89
|
-
<%= label_tag :q_line_items_variant_id_in, Spree.t(:variant) %>
|
90
|
-
<%= f.text_field :line_items_variant_id_in, class: "variant_autocomplete fullwidth" %>
|
91
|
-
</div>
|
92
99
|
</div>
|
93
100
|
|
94
101
|
<div class="clearfix"></div>
|
@@ -162,7 +169,7 @@
|
|
162
169
|
</tbody>
|
163
170
|
</table>
|
164
171
|
<% else %>
|
165
|
-
<div class="
|
172
|
+
<div class="col-xs-9 no-objects-found">
|
166
173
|
<%= render 'spree/admin/shared/no_objects_found',
|
167
174
|
resource: Spree::Order,
|
168
175
|
new_resource_url: spree.new_admin_order_path %>
|
@@ -2,59 +2,65 @@
|
|
2
2
|
|
3
3
|
<div data-hook="payment_method">
|
4
4
|
|
5
|
-
<div class="
|
6
|
-
<div
|
7
|
-
<div
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
<div class="row">
|
6
|
+
<div class="col-xs-3">
|
7
|
+
<div id="preference-settings">
|
8
|
+
<div class="field">
|
9
|
+
<%= f.label :type %>
|
10
|
+
<%= collection_select(:payment_method, :type, @providers, :to_s, :name, {}, {:id => 'gtwy-type', :class => 'select2 fullwidth js-gateway-type'}) %>
|
11
|
+
</div>
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
<div class="field js-preference-source-wrapper">
|
14
|
+
<%= f.label :preference_source %>
|
15
|
+
<%= f.select(:preference_source, [[Spree.t(:preference_source_none), nil]] + @object.class.available_preference_sources, {}, class: 'select2 fullwidth js-preference-source') %>
|
16
|
+
</div>
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
18
|
+
<div class="gateway-settings js-gateway-settings">
|
19
|
+
<% if @object.preference_source.present? %>
|
20
|
+
<%= Spree.t :preference_source_using, name: @object.preference_source %>
|
21
|
+
<% elsif !@object.new_record? %>
|
22
|
+
<%= preference_fields(@object, f) %>
|
23
|
+
<% end %>
|
24
|
+
</div>
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
26
|
+
<div class="info warning js-gateway-settings-warning"><%= Spree.t(:provider_settings_warning) %></div>
|
27
|
+
</div>
|
28
|
+
<div data-hook="available_to_user" class="field">
|
29
|
+
<%= label_tag nil, Spree::PaymentMethod.human_attribute_name(:available_to_users) %>
|
30
|
+
<%= f.check_box :available_to_users %>
|
31
|
+
</div>
|
32
|
+
<div data-hook="available_to_user" class="field">
|
33
|
+
<%= label_tag nil, Spree::PaymentMethod.human_attribute_name(:available_to_admin) %>
|
34
|
+
<%= f.check_box :available_to_admin %>
|
35
|
+
</div>
|
36
|
+
<div data-hook="auto_capture" class="field">
|
37
|
+
<%= f.label :auto_capture %>
|
38
|
+
<%= select(:payment_method, :auto_capture, [["#{Spree.t(:use_app_default)} (#{Spree::Config[:auto_capture]})", ''], [Spree.t(:say_yes), true], [Spree.t(:say_no), false]], {}, {:class => 'select2 fullwidth'}) %>
|
39
|
+
</div>
|
40
|
+
<div data-hook="active" class="field">
|
41
|
+
<%= label_tag nil, Spree::PaymentMethod.human_attribute_name(:active) %>
|
42
|
+
<ul>
|
43
|
+
<li>
|
44
|
+
<%= radio_button :payment_method, :active, true %>
|
45
|
+
<%= label_tag :payment_method_active_true, Spree.t(:say_yes) %>
|
46
|
+
</li>
|
47
|
+
<li>
|
48
|
+
<%= radio_button :payment_method, :active, false %>
|
49
|
+
<%= label_tag :payment_method_active_false, Spree.t(:say_no) %>
|
50
|
+
</li>
|
51
|
+
</ul>
|
52
|
+
</div>
|
47
53
|
</div>
|
48
|
-
</div>
|
49
54
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
55
|
+
<div class="col-xs-6">
|
56
|
+
<div data-hook="name" class="field">
|
57
|
+
<%= f.label :name %>
|
58
|
+
<%= f.text_field :name, :class => 'fullwidth' %>
|
59
|
+
</div>
|
60
|
+
<div data-hook="description" class="field">
|
61
|
+
<%= f.label :description %>
|
62
|
+
<%= f.text_area :description, {:cols => 60, :rows => 6, :class => 'fullwidth'} %>
|
63
|
+
</div>
|
58
64
|
</div>
|
59
65
|
</div>
|
60
66
|
</div>
|