tienda 1.1.2 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/tienda/application.coffee +114 -84
- data/app/assets/javascripts/tienda/custom-scripts.js +182 -0
- data/app/assets/javascripts/tienda/custom.js +200 -0
- data/app/assets/javascripts/tienda/jquery.metisMenu.js +45 -0
- data/app/assets/javascripts/tienda/morris.js +1913 -0
- data/app/assets/javascripts/tienda/raphael-2.1.0.min.js +10 -0
- data/app/assets/stylesheets/tienda/application.scss +2 -577
- data/app/assets/stylesheets/tienda/custom-styles.scss +518 -0
- data/app/assets/stylesheets/tienda/morris-0.4.3.min.css +2 -0
- data/app/controllers/tienda/dashboard_controller.rb +11 -1
- data/app/controllers/tienda/products_controller.rb +7 -3
- data/app/controllers/tienda/sessions_controller.rb +1 -1
- data/app/controllers/tienda/stock_level_adjustments_controller.rb +1 -5
- data/app/helpers/tienda/application_helper.rb +10 -4
- data/app/models/tienda/country.rb +3 -5
- data/app/models/tienda/delivery_service.rb +5 -7
- data/app/models/tienda/order/actions.rb +3 -3
- data/app/models/tienda/order/delivery.rb +1 -1
- data/app/models/tienda/order.rb +8 -8
- data/app/models/tienda/order_item.rb +11 -11
- data/app/models/tienda/product.rb +38 -54
- data/app/models/tienda/stock_level_adjustment.rb +9 -7
- data/app/models/tienda/tax_rate.rb +5 -7
- data/app/models/tienda/user.rb +4 -4
- data/app/validators/permalink_validator.rb +1 -1
- data/app/views/layouts/tienda/application.html.haml +29 -22
- data/app/views/layouts/tienda/sub.html.haml +44 -6
- data/app/views/tienda/application/_navbar.html.haml +164 -0
- data/app/views/tienda/application/_sidebar.html.haml +6 -0
- data/app/views/tienda/countries/_form.html.haml +40 -34
- data/app/views/tienda/countries/edit.html.haml +12 -3
- data/app/views/tienda/countries/index.html.haml +31 -21
- data/app/views/tienda/countries/new.html.haml +11 -3
- data/app/views/tienda/dashboard/home.html.haml +156 -0
- data/app/views/tienda/delivery_service_prices/_form.html.haml +53 -39
- data/app/views/tienda/delivery_service_prices/edit.html.haml +12 -3
- data/app/views/tienda/delivery_service_prices/index.html.haml +28 -19
- data/app/views/tienda/delivery_service_prices/new.html.haml +12 -3
- data/app/views/tienda/delivery_services/_form.html.haml +48 -35
- data/app/views/tienda/delivery_services/edit.html.haml +11 -5
- data/app/views/tienda/delivery_services/index.html.haml +34 -24
- data/app/views/tienda/delivery_services/new.html.haml +12 -3
- data/app/views/tienda/orders/_form.html.haml +78 -53
- data/app/views/tienda/orders/_order_details.html.haml +57 -54
- data/app/views/tienda/orders/_order_items.html.haml +5 -3
- data/app/views/tienda/orders/_payments_form.html.haml +18 -14
- data/app/views/tienda/orders/_payments_table.html.haml +6 -5
- data/app/views/tienda/orders/_search_form.html.haml +40 -24
- data/app/views/tienda/orders/_status_bar.html.haml +36 -32
- data/app/views/tienda/orders/index.html.haml +41 -34
- data/app/views/tienda/orders/new.html.haml +22 -11
- data/app/views/tienda/orders/show.html.haml +24 -18
- data/app/views/tienda/product_categories/_form.html.haml +34 -22
- data/app/views/tienda/product_categories/edit.html.haml +12 -4
- data/app/views/tienda/product_categories/index.html.haml +26 -16
- data/app/views/tienda/product_categories/new.html.haml +11 -3
- data/app/views/tienda/products/_form.html.haml +163 -126
- data/app/views/tienda/products/_table.html.haml +49 -40
- data/app/views/tienda/products/edit.html.haml +14 -6
- data/app/views/tienda/products/index.html.haml +35 -7
- data/app/views/tienda/sessions/new.html.haml +8 -6
- data/app/views/tienda/sessions/reset.html.haml +5 -5
- data/app/views/tienda/settings/edit.html.haml +20 -14
- data/app/views/tienda/stock_level_adjustments/_table.html.haml +33 -0
- data/app/views/tienda/stock_level_adjustments/index.html.haml +20 -39
- data/app/views/tienda/tax_rates/form.html.haml +41 -25
- data/app/views/tienda/tax_rates/index.html.haml +23 -13
- data/app/views/tienda/users/_form.html.haml +36 -24
- data/app/views/tienda/users/edit.html.haml +12 -3
- data/app/views/tienda/users/index.html.haml +23 -13
- data/app/views/tienda/users/new.html.haml +10 -3
- data/app/views/tienda/variants/form.html.haml +98 -57
- data/app/views/tienda/variants/index.html.haml +47 -29
- data/config/initializers/assets.rb +9 -0
- data/config/locales/en.yml +3 -2
- data/config/routes.rb +1 -1
- data/db/migrate/20150517191600_add_stock_counter_cache.rb +5 -0
- data/db/migrate/20150517195800_remove_stock_level_item_polymorphism.rb +6 -0
- data/db/migrate/20150517212100_update_stock_counter_cache.rb +5 -0
- data/db/migrate/20150603235417_add_document_to_orders.rb +5 -0
- data/lib/tienda/default_navigation.rb +9 -8
- data/lib/tienda/navigation_manager.rb +2 -5
- data/lib/tienda/version.rb +1 -1
- data/lib/tienda.rb +2 -6
- metadata +54 -65
@@ -1,27 +1,37 @@
|
|
1
1
|
- @page_title = t('tienda.delivery_services.delivery_services')
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
.row
|
4
|
+
.col-md-12
|
5
|
+
%h1.page-header
|
6
|
+
= t('tienda.delivery_services.delivery_services')
|
7
|
+
-# %small Lorem ipsum dolor
|
8
|
+
/ /. ROW
|
9
|
+
.row
|
10
|
+
.col-md-12
|
11
|
+
%p.pull-right
|
12
|
+
= link_to t('tienda.delivery_services.new'), :new_delivery_service, class: 'btn btn-primary'
|
6
13
|
|
7
|
-
.
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
%
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
%
|
26
|
-
|
27
|
-
|
14
|
+
.panel.panel-default
|
15
|
+
.panel-heading
|
16
|
+
Listing delivery services
|
17
|
+
.panel-body
|
18
|
+
%table.table.table-hover
|
19
|
+
%thead
|
20
|
+
%tr
|
21
|
+
%th= t('tienda.delivery_services.name')
|
22
|
+
%th= t('tienda.delivery_services.prices')
|
23
|
+
%th= t('tienda.delivery_services.courier')
|
24
|
+
%th= t('tienda.delivery_services.active?')
|
25
|
+
%th= t('tienda.delivery_services.default?')
|
26
|
+
%tbody
|
27
|
+
- if @delivery_services.empty?
|
28
|
+
%tr.empty
|
29
|
+
%td{:colspan => 5}= t('tienda.delivery_services.no_services')
|
30
|
+
- else
|
31
|
+
- for delivery_service in @delivery_services
|
32
|
+
%tr
|
33
|
+
%td= link_to delivery_service.name, [:edit, delivery_service]
|
34
|
+
%td= link_to t('tienda.delivery_services.set_prices'), [delivery_service, :delivery_service_prices]
|
35
|
+
%td= delivery_service.courier
|
36
|
+
%td= boolean_tag delivery_service.active?
|
37
|
+
%td= boolean_tag delivery_service.default?
|
@@ -1,6 +1,15 @@
|
|
1
1
|
- @page_title = t('tienda.delivery_services.delivery_services')
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
.row
|
4
|
+
.col-md-12
|
5
|
+
%h1.page-header
|
6
|
+
= t('tienda.delivery_services.delivery_services')
|
7
|
+
-# %small Lorem ipsum dolor
|
8
|
+
/ /. ROW
|
9
|
+
|
10
|
+
.row
|
11
|
+
.col-md-12
|
12
|
+
%p.pull-right
|
13
|
+
= link_to t('tienda.delivery_services.back'), :delivery_services, class: 'btn btn-default'
|
14
|
+
|
6
15
|
= render 'form'
|
@@ -1,55 +1,80 @@
|
|
1
1
|
= field_set_tag t('tienda.orders.billing_address') do
|
2
|
-
.
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
.
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
2
|
+
.row
|
3
|
+
.col-md-4
|
4
|
+
.form-group
|
5
|
+
= f.label :first_name, t('tienda.orders.first_name')
|
6
|
+
= f.text_field :first_name, class: 'focus form-control'
|
7
|
+
.col-md-4
|
8
|
+
.form-group
|
9
|
+
= f.label :last_name, t('tienda.orders.last_name')
|
10
|
+
= f.text_field :last_name, class: 'form-control'
|
11
|
+
.col-md-4
|
12
|
+
.form-group
|
13
|
+
= f.label :company, t('tienda.orders.company')
|
14
|
+
= f.text_field :company, class: 'form-control'
|
15
|
+
.row
|
16
|
+
.col-md-12
|
17
|
+
|
18
|
+
.row
|
19
|
+
.col-md-12
|
20
|
+
.form-group
|
21
|
+
= f.label :billing_address1, t('tienda.orders.address')
|
22
|
+
= f.text_field :billing_address1, class: 'form-control'
|
23
|
+
= f.text_field :billing_address2, class: 'form-control'
|
24
|
+
= f.text_field :billing_address3, class: 'form-control'
|
25
|
+
= f.text_field :billing_address4, class: 'form-control'
|
26
|
+
.row
|
27
|
+
.col-md-12
|
28
|
+
|
29
|
+
.row
|
30
|
+
.col-md-6
|
31
|
+
.form-group
|
32
|
+
= f.label :billing_postcode, t('tienda.orders.post_code')
|
33
|
+
= f.text_field :billing_postcode, class: 'form-control'
|
34
|
+
.col-md-6
|
35
|
+
.form-group
|
36
|
+
= f.label :billing_country_id, t('tienda.orders.country')
|
37
|
+
= f.collection_select :billing_country_id, Tienda::Country.ordered, :id, :name, {include_blank: true}, {class: 'form-control', data: {placeholder: t('tienda.orders.select_country')}}
|
38
|
+
.row
|
39
|
+
.col-md-12
|
40
|
+
|
41
|
+
.row
|
42
|
+
.col-md-4
|
43
|
+
.form-group
|
44
|
+
= f.label :email_address, t('tienda.orders.email_address')
|
45
|
+
= f.text_field :email_address, class: 'form-control'
|
46
|
+
.col-md-4
|
47
|
+
.form-group
|
48
|
+
= f.label :phone_number, t('tienda.orders.phone_number')
|
49
|
+
= f.text_field :phone_number, class: 'form-control'
|
50
|
+
.col-md-4
|
51
|
+
.form-group
|
52
|
+
= f.label :separate_delivery_address, t('tienda.orders.separate_delivery_address')
|
53
|
+
.checkbox
|
54
|
+
%label
|
55
|
+
= f.check_box :separate_delivery_address
|
56
|
+
= t('tienda.orders.use_separate_delivery_address?')
|
25
57
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
= f.
|
37
|
-
= f.
|
38
|
-
|
39
|
-
=
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
.splitContainer
|
50
|
-
%dl.half
|
51
|
-
%dt= f.label :delivery_postcode, t('tienda.orders.post_code')
|
52
|
-
%dd= f.text_field :delivery_postcode, :class => 'text'
|
53
|
-
%dl.half
|
54
|
-
%dt= f.label :delivery_country_id, t('tienda.orders.country')
|
55
|
-
%dd= f.collection_select :delivery_country_id, Tienda::Country.ordered, :id, :name, {:include_blank => true}, {:data => {:placeholder => t('tienda.orders.select_country')}}
|
58
|
+
= field_set_tag t('tienda.orders.delivery_address'), class: 'delivery' do
|
59
|
+
.row
|
60
|
+
.col-md-12
|
61
|
+
.form-group
|
62
|
+
= f.label :delivery_name, t('tienda.orders.delivery_name')
|
63
|
+
= f.text_field :delivery_name, class: 'form-control'
|
64
|
+
.row
|
65
|
+
.col-md-12
|
66
|
+
.form-group
|
67
|
+
= f.label :delivery_address1, t('tienda.orders.address')
|
68
|
+
= f.text_field :delivery_address1, class: 'form-control'
|
69
|
+
= f.text_field :delivery_address2, class: 'form-control'
|
70
|
+
= f.text_field :delivery_address3, class: 'form-control'
|
71
|
+
= f.text_field :delivery_address4, class: 'form-control'
|
72
|
+
.row
|
73
|
+
.col-md-6
|
74
|
+
.form-group
|
75
|
+
= f.label :delivery_postcode, t('tienda.orders.post_code')
|
76
|
+
= f.text_field :delivery_postcode, class: 'form-control'
|
77
|
+
.col-md-6
|
78
|
+
.form-group
|
79
|
+
= f.label :delivery_country_id, t('tienda.orders.country')
|
80
|
+
= f.collection_select :delivery_country_id, Tienda::Country.ordered, :id, :name, {include_blank: true}, {class: 'form-control', data: {placeholder: t('tienda.orders.select_country')}}
|
@@ -1,57 +1,60 @@
|
|
1
|
-
.
|
2
|
-
.
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
%
|
7
|
-
|
8
|
-
|
1
|
+
.panel.panel-default
|
2
|
+
.panel-heading
|
3
|
+
Order Details
|
4
|
+
.panel-body
|
5
|
+
.col-md-6
|
6
|
+
%dl
|
7
|
+
%dt= t('tienda.orders.name')
|
8
|
+
%dd= @order.full_name
|
9
|
+
%dt= t('tienda.orders.company')
|
10
|
+
%dd= @order.company.blank? ? '-' : @order.company
|
11
|
+
%dt
|
12
|
+
- if @order.separate_delivery_address?
|
13
|
+
= t('tienda.orders.billing_address')
|
14
|
+
- else
|
15
|
+
= t('tienda.orders.billing_delivery_address')
|
16
|
+
|
17
|
+
%dd= @order.billing_address1
|
18
|
+
%dd= @order.billing_address2
|
19
|
+
%dd= @order.billing_address3
|
20
|
+
%dd= @order.billing_address4
|
21
|
+
%dd= @order.billing_postcode
|
22
|
+
%dd= @order.billing_country.try(:name)
|
9
23
|
- if @order.separate_delivery_address?
|
10
|
-
= t('tienda.orders.
|
11
|
-
|
12
|
-
=
|
24
|
+
%dt= t('tienda.orders.delivery_address')
|
25
|
+
%dd= @order.delivery_name
|
26
|
+
%dd= @order.delivery_address1
|
27
|
+
%dd= @order.delivery_address2
|
28
|
+
%dd= @order.delivery_address3
|
29
|
+
%dd= @order.delivery_address4
|
30
|
+
%dd= @order.delivery_postcode
|
31
|
+
%dd= @order.delivery_country.try(:name)
|
32
|
+
.col-md-6
|
33
|
+
%dl
|
34
|
+
%dt= t('tienda.orders.email_address')
|
35
|
+
%dd= mail_to @order.email_address
|
36
|
+
%dt= t('tienda.orders.telephone')
|
37
|
+
%dd= @order.phone_number
|
38
|
+
%dt= t('tienda.orders.weight')
|
39
|
+
%dd= number_to_weight @order.total_weight
|
40
|
+
- if @order.received?
|
41
|
+
%dt= t('tienda.orders.build_time')
|
42
|
+
%dd= distance_of_time_in_words(@order.created_at, @order.received_at)
|
43
|
+
- if @order.invoiced?
|
44
|
+
%dt= t('tienda.orders.invoice_number')
|
45
|
+
%dd= @order.invoice_number
|
46
|
+
%dt= t('tienda.orders.order_balance')
|
47
|
+
%dd= boolean_tag @order.paid_in_full?, nil, true_text: number_to_currency(@order.balance), false_text: number_to_currency(@order.balance)
|
48
|
+
- if @order.accepted? && !@order.shipped?
|
49
|
+
= form_tag [:ship, @order] do
|
50
|
+
.form-group
|
51
|
+
= label_tag 'consignment_number', t('tienda.orders.consignment_number')
|
52
|
+
= text_field_tag 'consignment_number', '', class: 'form-control'
|
53
|
+
.form-group
|
54
|
+
= submit_tag t('tienda.orders.mark_as_shipped') , class: 'btn btn-primary btn-sm'
|
13
55
|
|
14
|
-
|
15
|
-
%dd= @order.billing_address2
|
16
|
-
%dd= @order.billing_address3
|
17
|
-
%dd= @order.billing_address4
|
18
|
-
%dd= @order.billing_postcode
|
19
|
-
%dd= @order.billing_country.try(:name)
|
20
|
-
- if @order.separate_delivery_address?
|
21
|
-
%dt= t('tienda.orders.delivery_address')
|
22
|
-
%dd= @order.delivery_name
|
23
|
-
%dd= @order.delivery_address1
|
24
|
-
%dd= @order.delivery_address2
|
25
|
-
%dd= @order.delivery_address3
|
26
|
-
%dd= @order.delivery_address4
|
27
|
-
%dd= @order.delivery_postcode
|
28
|
-
%dd= @order.delivery_country.try(:name)
|
29
|
-
.right
|
30
|
-
%dl
|
31
|
-
%dt= t('tienda.orders.email_address')
|
32
|
-
%dd= mail_to @order.email_address
|
33
|
-
%dt= t('tienda.orders.telephone')
|
34
|
-
%dd= @order.phone_number
|
35
|
-
%dt= t('tienda.orders.weight')
|
36
|
-
%dd= number_to_weight @order.total_weight
|
37
|
-
- if @order.received?
|
38
|
-
%dt= t('tienda.orders.build_time')
|
39
|
-
%dd= distance_of_time_in_words(@order.created_at, @order.received_at)
|
40
|
-
- if @order.invoiced?
|
41
|
-
%dt= t('tienda.orders.invoice_number')
|
42
|
-
%dd= @order.invoice_number
|
43
|
-
%dt= t('tienda.orders.order_balance')
|
44
|
-
%dd= boolean_tag @order.paid_in_full?, nil, :true_text => number_to_currency(@order.balance), :false_text => number_to_currency(@order.balance)
|
45
|
-
- if @order.accepted? && !@order.shipped?
|
46
|
-
= form_tag [:ship, @order] do
|
47
|
-
%dl.form
|
48
|
-
%dt.padding= label_tag 'consignment_number', t('tienda.orders.consignment_number')
|
49
|
-
%dd= text_field_tag 'consignment_number', '', :class => 'text'
|
56
|
+
- unless @order.accepted? || @order.rejected?
|
50
57
|
%dl.form
|
51
|
-
%dd
|
52
|
-
|
53
|
-
|
54
|
-
%dl.form
|
55
|
-
%dd
|
56
|
-
= link_to t('tienda.orders.accept'), [:accept, @order], :method => :post, :class => 'button green'
|
57
|
-
= link_to t('tienda.orders.reject'), [:reject, @order], :method => :post, :class => 'button purple'
|
58
|
+
%dd
|
59
|
+
= link_to t('tienda.orders.accept'), [:accept, @order], method: :post, class: 'btn btn-primary'
|
60
|
+
= link_to t('tienda.orders.reject'), [:reject, @order], method: :post, class: 'btn btn-danger'
|
@@ -1,15 +1,19 @@
|
|
1
1
|
= form_for [@order, Tienda::Payment.new(:amount => @order.balance)] do |f|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
2
|
+
.col-md-3
|
3
|
+
.form-group
|
4
|
+
= f.label :method, t('tienda.orders.method')
|
5
|
+
= f.text_field :method, class: 'form-control'
|
6
|
+
.col-md-3
|
7
|
+
.form-group
|
8
|
+
= f.label :reference, t('tienda.orders.reference')
|
9
|
+
= f.text_field :reference, class: 'form-control'
|
10
|
+
.col-md-3
|
11
|
+
.form-group
|
12
|
+
= f.label :amount, t('tienda.orders.amount')
|
13
|
+
.form-group.input-group
|
14
|
+
%span.input-group-addon= Tienda.settings.currency_unit.html_safe
|
15
|
+
= f.text_field :amount, class: 'form-control'
|
16
|
+
.col-md-3
|
17
|
+
.form-group
|
18
|
+
%br
|
19
|
+
= f.submit t('tienda.orders.add_payment') , class: 'btn btn-primary'
|
@@ -1,6 +1,6 @@
|
|
1
1
|
- unless @payments.empty?
|
2
2
|
.table
|
3
|
-
%table.
|
3
|
+
%table.table.table-hover
|
4
4
|
%thead
|
5
5
|
%tr
|
6
6
|
%th= t('tienda.orders.id')
|
@@ -27,11 +27,12 @@
|
|
27
27
|
#{t('tienda.orders.from_payment')} ##{payment.parent_payment_id}
|
28
28
|
- else
|
29
29
|
%td= number_to_currency payment.amount
|
30
|
-
%td= boolean_tag payment.refunded?, nil, :
|
30
|
+
%td= boolean_tag payment.refunded?, nil, true_text: number_to_currency(payment.amount_refunded)
|
31
31
|
%td.refund
|
32
32
|
- if payment.refundable?
|
33
|
-
= link_to t('tienda.orders.refund'), [:refund, @order, payment], :
|
33
|
+
= link_to t('tienda.orders.refund'), [:refund, @order, payment], class: 'btn btn-danger btn-sm', rel: 'dialog'
|
34
34
|
- else
|
35
|
-
= link_to t('tienda.delete'), [@order, payment], :
|
35
|
+
= link_to t('tienda.delete'), [@order, payment], class: 'btn btn-danger btn-sm', data: {confirm: t('tienda.orders.payment_remove_confirmation') }, method: :delete
|
36
36
|
- else
|
37
|
-
|
37
|
+
.alert.alert-warning
|
38
|
+
= t('tienda.orders.no_payments')
|
@@ -1,24 +1,40 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
1
|
+
.panel.panel-default.search-orders.hide{style: action_name == 'search' ? 'display:block' : ''}
|
2
|
+
.panel-heading
|
3
|
+
Search orders
|
4
|
+
.panel-body
|
5
|
+
= search_form_for @query, url: search_orders_path, html: { method: :post } do |f|
|
6
|
+
.row
|
7
|
+
.col-md-6
|
8
|
+
.form-group
|
9
|
+
= f.label :id_eq, t('tienda.orders.order_number')
|
10
|
+
= f.text_field :id_eq, class: 'form-control'
|
11
|
+
.form-group
|
12
|
+
= f.label :first_name_or_last_name_or_company_cont, t('tienda.orders.customer')
|
13
|
+
= f.text_field :first_name_or_last_name_or_company_cont, class: 'form-control'
|
14
|
+
.form-group
|
15
|
+
= f.label :address1_or_address2_or_address3_or_address4_or_postcode_cont, t('tienda.orders.billing_address')
|
16
|
+
= f.text_field :billing_address1_or_billing_address2_or_billing_address3_or_billing_address4_or_billing_postcode_cont, class: 'form-control'
|
17
|
+
.form-group
|
18
|
+
= f.label :consignment_number_cont, t('tienda.orders.consignment_number')
|
19
|
+
= f.text_field :consignment_number_cont, class: 'form-control'
|
20
|
+
.row
|
21
|
+
.col-md-12
|
22
|
+
= f.label :received_at_eq, t('tienda.orders.received_between')
|
23
|
+
.col-md-5
|
24
|
+
= f.text_field :received_at_gteq, class: 'form-control col-md-5'
|
25
|
+
.col-md-1
|
26
|
+
%p.form-control-static
|
27
|
+
→
|
28
|
+
.col-md-6
|
29
|
+
= f.text_field :received_at_lteq, class: 'form-control col-md-5'
|
30
|
+
.col-md-6
|
31
|
+
.form-group
|
32
|
+
= f.label :email_address_cont, t('tienda.orders.email_address')
|
33
|
+
= f.text_field :email_address_cont, class: 'form-control'
|
34
|
+
.form-group
|
35
|
+
= f.label :phone_number_cont, t('tienda.orders.phone_number')
|
36
|
+
= f.text_field :phone_number_cont, class: 'form-control'
|
37
|
+
.form-group
|
38
|
+
= f.label :status_eq, t('tienda.orders.status')
|
39
|
+
= f.select :status_eq, [nil] + Tienda::Order::STATUSES.map { |s| [t("tienda.orders.statuses.#{s}"), s]}, {}, class: 'form-control'
|
40
|
+
= f.submit t('tienda.orders.search'), class: 'btn btn-primary'
|
@@ -1,35 +1,39 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
.panel.panel-default
|
2
|
+
.panel-heading
|
3
|
+
Order Status
|
4
|
+
.panel-body
|
5
|
+
.status-bar
|
6
|
+
%ul
|
7
|
+
- if @order.received?
|
8
|
+
%li.received
|
9
|
+
%h4= t('tienda.orders.order_received')
|
10
|
+
%p
|
11
|
+
= t('tienda.orders.status_bar.on_date', on: @order.received_at.to_s(:short))
|
12
|
+
= t('tienda.orders.status_bar.from_ip', ip: @order.ip_address)
|
9
13
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
- if @order.accepted?
|
15
|
+
%li.accepted
|
16
|
+
%h4= t('tienda.orders.order_accepted')
|
17
|
+
%p
|
18
|
+
= t('tienda.orders.status_bar.on_date', on: @order.accepted_at.to_s(:short))
|
19
|
+
- if @order.accepter
|
20
|
+
= t('tienda.orders.status_bar.by_user', user: @order.accepter.short_name)
|
17
21
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
- elsif @order.rejected?
|
23
|
+
%li.rejected
|
24
|
+
%h4= t('tienda.orders.order_rejected')
|
25
|
+
%p
|
26
|
+
= t('tienda.orders.status_bar.on_date', on: @order.rejected_at.to_s(:short))
|
27
|
+
- if @order.rejecter
|
28
|
+
= t('tienda.orders.status_bar.by_user', user: @order.rejecter.short_name)
|
25
29
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
30
|
+
- if @order.shipped?
|
31
|
+
%li.shipped
|
32
|
+
%h4= t('tienda.orders.order_shipped')
|
33
|
+
%p
|
34
|
+
= t('tienda.orders.status_bar.on_date', on: @order.shipped_at.to_s(:short))
|
35
|
+
= t('tienda.orders.status_bar.by_user', user: @order.shipper.try(:short_name) || 'Unknown')
|
36
|
+
- if @order.delivery_service && @order.courier_tracking_url
|
37
|
+
%p= link_to t('tienda.orders.status_bar.tracking_url'), @order.courier_tracking_url
|
38
|
+
- else
|
39
|
+
%p= t('tienda.orders.status_bar.consignment_no_html', consignment_number: @order.consignment_number)
|
@@ -1,39 +1,46 @@
|
|
1
1
|
- @page_title = t('tienda.orders.orders')
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
.row
|
4
|
+
.col-md-12
|
5
|
+
%h1.page-header
|
6
|
+
= t('tienda.orders.orders')
|
7
|
+
%small= page_entries_info @orders
|
8
|
+
/ /. ROW
|
9
|
+
.row
|
10
|
+
.col-md-12
|
11
|
+
%p.pull-right
|
12
|
+
= link_to t('tienda.orders.new_order'), :new_order, class: 'btn btn-primary'
|
13
|
+
= link_to t('tienda.orders.search_orders'), '#', class: 'btn btn-default', rel: 'searchOrders'
|
10
14
|
|
11
15
|
= render 'search_form'
|
12
16
|
|
13
|
-
.
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
%
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
%
|
33
|
-
|
34
|
-
%
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
17
|
+
.panel.panel-default
|
18
|
+
.panel-heading
|
19
|
+
Listing orders
|
20
|
+
.panel-body
|
21
|
+
%table.table.table-hover
|
22
|
+
%thead
|
23
|
+
%tr
|
24
|
+
%th= t('tienda.orders.number')
|
25
|
+
%th= t('tienda.orders.customer')
|
26
|
+
%th= t('tienda.orders.status')
|
27
|
+
%th= t('tienda.orders.products')
|
28
|
+
%th= t('tienda.orders.total')
|
29
|
+
%th= t('tienda.orders.payment')
|
30
|
+
%tbody
|
31
|
+
- if @orders.empty?
|
32
|
+
%tr.empty
|
33
|
+
%td{colspan: 6}= t('tienda.orders.no_orders')
|
34
|
+
- else
|
35
|
+
- for order in @orders
|
36
|
+
%tr
|
37
|
+
%td= link_to order.number, order
|
38
|
+
%td= order.customer_name
|
39
|
+
%td= status_tag order.status
|
40
|
+
%td
|
41
|
+
%ul
|
42
|
+
- for item in order.order_items
|
43
|
+
%li #{item.quantity} x #{item.ordered_item.full_name}
|
44
|
+
%td= number_to_currency order.total
|
45
|
+
%td= boolean_tag order.paid_in_full?, nil, true_text: number_to_currency(order.amount_paid), false_text: number_to_currency(order.amount_paid)
|
46
|
+
= paginate @orders
|