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
@@ -19,8 +19,8 @@
|
|
19
19
|
<col style="width: 10%">
|
20
20
|
<col style="width: 13%">
|
21
21
|
<col style="width: 33%">
|
22
|
-
<col style="width:
|
23
|
-
<col style="width:
|
22
|
+
<col style="width: 16%">
|
23
|
+
<col style="width: 16%">
|
24
24
|
<col style="width: 19%">
|
25
25
|
<col style="width: 13%">
|
26
26
|
</colgroup>
|
@@ -29,7 +29,8 @@
|
|
29
29
|
<th class="no-border"></th>
|
30
30
|
<th><%= Spree::PaymentMethod.human_attribute_name(:name) %></th>
|
31
31
|
<th><%= Spree::PaymentMethod.human_attribute_name(:type) %></th>
|
32
|
-
<th><%= Spree::PaymentMethod.human_attribute_name(:
|
32
|
+
<th><%= Spree::PaymentMethod.human_attribute_name(:available_to_users) %></th>
|
33
|
+
<th><%= Spree::PaymentMethod.human_attribute_name(:available_to_admin) %></th>
|
33
34
|
<th><%= Spree::PaymentMethod.human_attribute_name(:active) %></th>
|
34
35
|
<th data-hook="admin_payment_methods_index_header_actions" class="actions"></th>
|
35
36
|
</tr>
|
@@ -40,7 +41,8 @@
|
|
40
41
|
<td class="no-border"><span class="handle"></span></td>
|
41
42
|
<td class="align-center"><%= method.name %></td>
|
42
43
|
<td class="align-center"><%= method.type %></td>
|
43
|
-
<td class="align-center"><%= method.
|
44
|
+
<td class="align-center"><%= method.available_to_users ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
|
45
|
+
<td class="align-center"><%= method.available_to_admin ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
|
44
46
|
<td class="align-center"><%= method.active ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
|
45
47
|
<td data-hook="admin_payment_methods_index_row_actions" class="actions">
|
46
48
|
<% if can?(:update, method.becomes(Spree::PaymentMethod)) %>
|
@@ -55,7 +57,7 @@
|
|
55
57
|
</tbody>
|
56
58
|
</table>
|
57
59
|
<% else %>
|
58
|
-
<div class="
|
60
|
+
<div class="col-xs-9 no-objects-found">
|
59
61
|
<%= render 'spree/admin/shared/no_objects_found',
|
60
62
|
resource: Spree::PaymentMethod,
|
61
63
|
new_resource_url: new_object_url %>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<div data-hook="admin_payment_form_fields" class="row">
|
2
|
-
<div class="
|
2
|
+
<div class="col-xs-3">
|
3
3
|
<div class="field">
|
4
4
|
<%= f.label :amount %>
|
5
5
|
<%= f.text_field :amount, :value => @order.display_outstanding_balance.money, :class => 'fullwidth' %>
|
6
6
|
</div>
|
7
7
|
</div>
|
8
|
-
<div class="
|
8
|
+
<div class="col-xs-9">
|
9
9
|
<div class="field">
|
10
10
|
<label><%= Spree::PaymentMethod.model_name.human %></label>
|
11
11
|
<ul>
|
@@ -13,41 +13,43 @@
|
|
13
13
|
|
14
14
|
<div class="clear"></div>
|
15
15
|
|
16
|
-
<div class="
|
17
|
-
<div
|
18
|
-
<div
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
<span id="
|
25
|
-
|
26
|
-
|
16
|
+
<div class="row">
|
17
|
+
<div class="col-xs-5">
|
18
|
+
<div data-hook="card_number">
|
19
|
+
<div class="field">
|
20
|
+
<%= hidden_field_tag "#{param_prefix}[cc_type]", '', {class: 'ccType'} %>
|
21
|
+
<%= label_tag "card_number#{payment_method.id}", Spree::CreditCard.human_attribute_name(:number), class: 'required' %>
|
22
|
+
<%= text_field_tag "#{param_prefix}[number]", '', :class => 'required fullwidth cardNumber', :id => "card_number#{payment_method.id}", :maxlength => 19 %>
|
23
|
+
<span id="card_type" style="display:none;">
|
24
|
+
( <span id="looks_like" ><%= Spree.t(:card_type_is) %> <span id="type"></span></span>
|
25
|
+
<span id="unrecognized"><%= Spree.t(:unrecognized_card_type) %></span>
|
26
|
+
)
|
27
|
+
</span>
|
28
|
+
</div>
|
27
29
|
</div>
|
28
30
|
</div>
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
<div class="col-xs-5">
|
32
|
+
<div data-hook="card_name">
|
33
|
+
<div class="field">
|
34
|
+
<%= label_tag "card_name#{payment_method.id}", Spree::CreditCard.human_attribute_name(:name), class: 'required' %>
|
35
|
+
<%= text_field_tag "#{param_prefix}[name]", '', id: "card_name#{payment_method.id}", class: 'required fullwidth', maxlength: 19 %>
|
36
|
+
</div>
|
35
37
|
</div>
|
36
38
|
</div>
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
<div class="col-xs-4">
|
40
|
+
<div data-hook="card_expiration" class="field">
|
41
|
+
<%= label_tag "card_expiry#{payment_method.id}", Spree::CreditCard.human_attribute_name(:expiration), class: 'required' %>
|
42
|
+
<%= text_field_tag "#{param_prefix}[expiry]", '', id: "card_expiry#{payment_method.id}", class: "required cardExpiry", placeholder: "MM / YY" %>
|
43
|
+
</div>
|
42
44
|
</div>
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
</
|
45
|
+
<div class="col-xs-3">
|
46
|
+
<div data-hook="card_code" class="field">
|
47
|
+
<%= label_tag "card_code#{payment_method.id}", Spree::CreditCard.human_attribute_name(:card_code), class: 'required' %>
|
48
|
+
<%= text_field_tag "#{param_prefix}[verification_value]", '', id: "card_code#{payment_method.id}", class: 'required fullwidth cardCode', size: 5 %>
|
49
|
+
<a href="/content/cvv" class="info cvvLink" target="_blank">
|
50
|
+
(<%= Spree.t(:what_is_this) %>)
|
51
|
+
</a>
|
52
|
+
</div>
|
51
53
|
</div>
|
52
54
|
</div>
|
53
55
|
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= t('.not_supported') %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<legend align="center"><%= Spree::StoreCredit.model_name.human %></legend>
|
3
3
|
|
4
4
|
<div class="row">
|
5
|
-
<div class="
|
5
|
+
<div class="col-xs-4">
|
6
6
|
<dl>
|
7
7
|
<dt><%= Spree::StoreCreditCategory.model_name.human %>:</dt>
|
8
8
|
<dd><%= payment.source.category.name%></dd>
|
@@ -16,6 +16,13 @@
|
|
16
16
|
<dt><%= Spree::StoreCredit.human_attribute_name(:issued_on) %>:</dt>
|
17
17
|
<dd><%= l payment.source.created_at.to_date %></dd>
|
18
18
|
</dl>
|
19
|
+
|
20
|
+
<p>
|
21
|
+
<%= link_to(
|
22
|
+
Spree.t("admin.store_credits.view"),
|
23
|
+
admin_user_store_credit_path(payment.source.user, payment.source)
|
24
|
+
) %>
|
25
|
+
</p>
|
19
26
|
</div>
|
20
27
|
</div>
|
21
28
|
</fieldset>
|
@@ -1,53 +1,48 @@
|
|
1
1
|
<div data-hook="admin_product_price_fields">
|
2
2
|
|
3
3
|
<div data-hook="admin_product_price_form">
|
4
|
-
<div class="
|
5
|
-
|
6
|
-
<%= f.
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
4
|
+
<div class="row">
|
5
|
+
<div class="col-xs-3" data-hook="admin_product_price_form_variant">
|
6
|
+
<%= f.field_container :variant do %>
|
7
|
+
<%= f.label :variant %>
|
8
|
+
<%= f.select :variant_id,
|
9
|
+
@product.variants_including_master.map { |v| [v.descriptive_name, v.id] },
|
10
|
+
{},
|
11
|
+
class: "select2 fullwidth", disabled: !f.object.new_record? %>
|
12
|
+
<% end %>
|
13
|
+
</div>
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
15
|
+
<div class="col-xs-2" data-hook="admin_product_price_form_currency">
|
16
|
+
<%= f.field_container :currency do %>
|
17
|
+
<%= f.label :currency %>
|
18
|
+
<%= f.select :currency,
|
19
|
+
Money::Currency.all.map { |c| ["#{c.iso_code} (#{c.name})", c.iso_code] },
|
20
|
+
{},
|
21
|
+
class: "select2 fullwidth", disabled: !f.object.new_record? %>
|
22
|
+
<% end %>
|
23
|
+
</div>
|
23
24
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
25
|
+
<div class="col-xs-2" data-hook="admin_product_price_form_country">
|
26
|
+
<%= f.field_container :country do %>
|
27
|
+
<%= f.label :country %>
|
28
|
+
<%= f.field_hint :country %>
|
29
|
+
<%= f.collection_select :country_iso, available_countries, :iso, :name,
|
30
|
+
{
|
31
|
+
include_blank: t(:any_country, scope: [:spree, :admin, :prices]),
|
32
|
+
selected: Spree::Config.admin_vat_country_iso
|
33
|
+
},
|
34
|
+
{ class: 'select2 fullwidth', disabled: !f.object.new_record? } %>
|
35
|
+
<% end %>
|
36
|
+
</div>
|
36
37
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
<div class="field three columns checkbox omega" data-hook="is_default_price">
|
45
|
-
<%= f.label :is_default do %>
|
46
|
-
<%= f.check_box :is_default %>
|
47
|
-
<%= Spree::Price.human_attribute_name(:is_default) %>
|
48
|
-
<% end %>
|
49
|
-
</div>
|
38
|
+
<div class="col-xs-2" data-hook="admin_product_price_form_amount">
|
39
|
+
<%= f.field_container :price do %>
|
40
|
+
<%= f.label :price %>
|
41
|
+
<%= f.text_field :price, value: f.object.money.format, class: 'fullwidth title' %>
|
42
|
+
<% end %>
|
43
|
+
</div>
|
50
44
|
</div>
|
45
|
+
|
51
46
|
</div>
|
52
47
|
|
53
48
|
<div class="clear"></div>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-xs-12">
|
3
|
+
<fieldset class="no-border-bottom <%= "no-border-top" if !variants %>">
|
4
|
+
<% if variants %>
|
5
|
+
<legend align="center"><%= I18n.t(:master_variant, scope: :spree) %> <%= admin_hint I18n.t(:master_variant, scope: :spree), I18n.t(:master_variant, scope: [:spree, :hints, "spree/price"]) %></legend>
|
6
|
+
<% end %>
|
7
|
+
<table class="index master_prices">
|
8
|
+
<colgroup>
|
9
|
+
<col style="width: 30%">
|
10
|
+
<col style="width: 30%">
|
11
|
+
<col style="width: 20%">
|
12
|
+
<col style="width: 20%">
|
13
|
+
</colgroup>
|
14
|
+
<thead data-hook="master_prices_header">
|
15
|
+
<tr>
|
16
|
+
<th><%= Spree::Price.human_attribute_name(:country) %></th>
|
17
|
+
<th><%= Spree::Price.human_attribute_name(:currency) %></th>
|
18
|
+
<th><%= Spree::Price.human_attribute_name(:amount) %></th>
|
19
|
+
<th class="actions"></th>
|
20
|
+
</tr>
|
21
|
+
</thead>
|
22
|
+
<% master_prices.each do |price| %>
|
23
|
+
<tr id="<%= spree_dom_id price %>" data-hook="prices_row" class="<%= "deleted" if price.deleted? %> <%= cycle('odd', 'even')%>">
|
24
|
+
<td><%= price.display_country %></td>
|
25
|
+
<td><%= price.currency %></td>
|
26
|
+
<td class="align-right"><%= price.money.to_html %></td>
|
27
|
+
<td class="actions">
|
28
|
+
<% if can?(:update, price) %>
|
29
|
+
<%= link_to_edit(price, :no_text => true) unless price.deleted? %>
|
30
|
+
<% end %>
|
31
|
+
<% if can?(:destroy, price) %>
|
32
|
+
|
33
|
+
<%= link_to_delete(price, :no_text => true) unless price.deleted? %>
|
34
|
+
<% end %>
|
35
|
+
</td>
|
36
|
+
</tr>
|
37
|
+
<% end %>
|
38
|
+
</table>
|
39
|
+
</fieldset>
|
40
|
+
</div>
|
41
|
+
</div>
|
@@ -1,35 +1,37 @@
|
|
1
|
-
<%= paginate
|
1
|
+
<%= paginate variant_prices, theme: "solidus_admin" %>
|
2
2
|
|
3
|
-
<
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
<
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
3
|
+
<fieldset class="no-border-bottom">
|
4
|
+
<legend align="center"><%= I18n.t(:variant_pricing, scope: :spree) %></legend>
|
5
|
+
<table class="index prices">
|
6
|
+
<thead data-hook="prices_header">
|
7
|
+
<tr>
|
8
|
+
<th><%= Spree::Variant.model_name.human %> </th>
|
9
|
+
<th><%= Spree::Price.human_attribute_name(:country) %></th>
|
10
|
+
<th><%= Spree::Price.human_attribute_name(:currency) %></th>
|
11
|
+
<th><%= Spree::Price.human_attribute_name(:amount) %></th>
|
12
|
+
<th class="actions"></th>
|
13
|
+
</tr>
|
14
|
+
</thead>
|
15
|
+
<tbody>
|
16
|
+
<% variant_prices.each do |price| %>
|
17
|
+
<tr id="<%= spree_dom_id price %>" data-hook="prices_row" class="<%= "deleted" if price.deleted? %> <%= cycle('odd', 'even')%>">
|
18
|
+
<td><%= price.variant.descriptive_name %></td>
|
19
|
+
<td><%= price.display_country %></td>
|
20
|
+
<td><%= price.currency %></td>
|
21
|
+
<td class="align-right"><%= price.money.to_html %></td>
|
22
|
+
<td class="actions">
|
23
|
+
<% if can?(:update, price) %>
|
24
|
+
<%= link_to_edit(price, :no_text => true) unless price.deleted? %>
|
25
|
+
<% end %>
|
26
|
+
<% if can?(:destroy, price) %>
|
27
|
+
|
28
|
+
<%= link_to_delete(price, :no_text => true) unless price.deleted? %>
|
29
|
+
<% end %>
|
30
|
+
</td>
|
31
|
+
</tr>
|
32
|
+
<% end %>
|
33
|
+
</tbody>
|
34
|
+
</table>
|
35
|
+
</fieldset>
|
13
36
|
|
14
|
-
|
15
|
-
<% prices.each do |price| %>
|
16
|
-
<tr id="<%= spree_dom_id price %>" data-hook="prices_row" class="<%= "deleted" if price.deleted? %> <%= cycle('odd', 'even')%>">
|
17
|
-
<td><%= price.variant.descriptive_name %></td>
|
18
|
-
<td><%= price.display_country %>
|
19
|
-
<td><%= price.currency %></td>
|
20
|
-
<td class="align-right"><%= price.money.to_html %></td>
|
21
|
-
<td class="actions">
|
22
|
-
<% if can?(:update, price) %>
|
23
|
-
<%= link_to_edit(price, :no_text => true) unless price.deleted? %>
|
24
|
-
<% end %>
|
25
|
-
<% if can?(:destroy, price) %>
|
26
|
-
|
27
|
-
<%= link_to_delete(price, :no_text => true) unless price.deleted? %>
|
28
|
-
<% end %>
|
29
|
-
</td>
|
30
|
-
</tr>
|
31
|
-
<% end %>
|
32
|
-
</tbody>
|
33
|
-
</table>
|
34
|
-
|
35
|
-
<%= paginate prices, theme: "solidus_admin" %>
|
37
|
+
<%= paginate variant_prices, theme: "solidus_admin" %>
|
@@ -14,50 +14,51 @@
|
|
14
14
|
<div data-hook="admin_product_prices_index_search">
|
15
15
|
<%= search_form_for [:admin, :product, @search] do |f| %>
|
16
16
|
|
17
|
-
<div class="
|
18
|
-
<div class="
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
17
|
+
<div class="row">
|
18
|
+
<div class="col-xs-4">
|
19
|
+
<div class="field" data-hook="sku-select">
|
20
|
+
<%= label_tag :q_variant_id_eq, Spree::Variant.model_name.human %>
|
21
|
+
<%= f.select :variant_id_eq,
|
22
|
+
@product.variants_including_master.map { |v| [v.descriptive_name, v.id] },
|
23
|
+
{include_blank: true},
|
24
|
+
class: "select2 fullwidth" %>
|
25
|
+
</div>
|
24
26
|
</div>
|
25
|
-
</div>
|
26
27
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
28
|
+
<div class="col-xs-2">
|
29
|
+
<div class="field" data-hook="currency-select">
|
30
|
+
<%= label_tag :q_currency_eq, Spree::Price.human_attribute_name(:currency) %>
|
31
|
+
<%= f.select :currency_eq,
|
32
|
+
@prices.map(&:currency).uniq,
|
33
|
+
{include_blank: true},
|
34
|
+
class: "select2 fullwidth" %>
|
35
|
+
</div>
|
34
36
|
</div>
|
35
|
-
</div>
|
36
37
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
38
|
+
<div class="col-xs-2">
|
39
|
+
<div class="field" data-hook="country-select">
|
40
|
+
<%= label_tag :q_country_iso_eq, Spree::Price.human_attribute_name(:country) %>
|
41
|
+
<%= f.select :country_iso_eq,
|
42
|
+
@prices.map(&:country).compact.uniq.map { |c| [c.name, c.iso]},
|
43
|
+
{include_blank: true},
|
44
|
+
class: "select2 fullwidth" %>
|
45
|
+
</div>
|
44
46
|
</div>
|
45
|
-
</div>
|
46
47
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
48
|
+
<div class="col-xs-2">
|
49
|
+
<div class="field">
|
50
|
+
<%= label_tag :q_amount_gt, t(".amount_greater_than") %>
|
51
|
+
<%= f.text_field :amount_gt %>
|
52
|
+
</div>
|
51
53
|
</div>
|
52
|
-
</div>
|
53
54
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
55
|
+
<div class="col-xs-2">
|
56
|
+
<div class="field">
|
57
|
+
<%= label_tag :q_amount_lt, t(".amount_less_than") %>
|
58
|
+
<%= f.text_field :amount_lt %>
|
59
|
+
</div>
|
58
60
|
</div>
|
59
61
|
</div>
|
60
|
-
|
61
62
|
<div class="clearfix"></div>
|
62
63
|
|
63
64
|
<div class="actions filter-actions">
|
@@ -70,4 +71,5 @@
|
|
70
71
|
</div>
|
71
72
|
<% end %>
|
72
73
|
|
73
|
-
<%= render '
|
74
|
+
<%= render 'master_variant_table', master_prices: @master_prices, variants: @product.variants.any? %>
|
75
|
+
<%= render 'table', variant_prices: @variant_prices if @product.variants.any? %>
|
@@ -9,11 +9,6 @@
|
|
9
9
|
<li>
|
10
10
|
<%= link_to_add_fields Spree.t(:add_product_properties), 'tbody#product_properties', :class => 'plus button' %>
|
11
11
|
</li>
|
12
|
-
<li>
|
13
|
-
<span id="new_ptype_link">
|
14
|
-
<%= link_to Spree.t(:select_from_prototype), available_admin_prototypes_url, :remote => true, :class => 'button fa fa-copy' %>
|
15
|
-
</span>
|
16
|
-
</li>
|
17
12
|
</ul>
|
18
13
|
<% end %>
|
19
14
|
<% end %>
|
@@ -23,8 +18,6 @@
|
|
23
18
|
<legend align="center"><%= plural_resource_name(Spree::ProductProperty) %></legend>
|
24
19
|
<div class="add_product_properties" data-hook="add_product_properties"></div>
|
25
20
|
|
26
|
-
<div id="prototypes" data-hook></div>
|
27
|
-
|
28
21
|
<table class="index sortable" data-hook data-sortable-link="<%= update_positions_admin_product_product_properties_url %>">
|
29
22
|
<thead>
|
30
23
|
<tr data-hook="product_properties_header">
|