tienda 1.1.2 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/tienda/application.coffee +114 -84
  3. data/app/assets/javascripts/tienda/custom-scripts.js +182 -0
  4. data/app/assets/javascripts/tienda/custom.js +200 -0
  5. data/app/assets/javascripts/tienda/jquery.metisMenu.js +45 -0
  6. data/app/assets/javascripts/tienda/morris.js +1913 -0
  7. data/app/assets/javascripts/tienda/raphael-2.1.0.min.js +10 -0
  8. data/app/assets/stylesheets/tienda/application.scss +2 -577
  9. data/app/assets/stylesheets/tienda/custom-styles.scss +518 -0
  10. data/app/assets/stylesheets/tienda/morris-0.4.3.min.css +2 -0
  11. data/app/controllers/tienda/dashboard_controller.rb +11 -1
  12. data/app/controllers/tienda/products_controller.rb +7 -3
  13. data/app/controllers/tienda/sessions_controller.rb +1 -1
  14. data/app/controllers/tienda/stock_level_adjustments_controller.rb +1 -5
  15. data/app/helpers/tienda/application_helper.rb +10 -4
  16. data/app/models/tienda/country.rb +3 -5
  17. data/app/models/tienda/delivery_service.rb +5 -7
  18. data/app/models/tienda/order/actions.rb +3 -3
  19. data/app/models/tienda/order/delivery.rb +1 -1
  20. data/app/models/tienda/order.rb +8 -8
  21. data/app/models/tienda/order_item.rb +11 -11
  22. data/app/models/tienda/product.rb +38 -54
  23. data/app/models/tienda/stock_level_adjustment.rb +9 -7
  24. data/app/models/tienda/tax_rate.rb +5 -7
  25. data/app/models/tienda/user.rb +4 -4
  26. data/app/validators/permalink_validator.rb +1 -1
  27. data/app/views/layouts/tienda/application.html.haml +29 -22
  28. data/app/views/layouts/tienda/sub.html.haml +44 -6
  29. data/app/views/tienda/application/_navbar.html.haml +164 -0
  30. data/app/views/tienda/application/_sidebar.html.haml +6 -0
  31. data/app/views/tienda/countries/_form.html.haml +40 -34
  32. data/app/views/tienda/countries/edit.html.haml +12 -3
  33. data/app/views/tienda/countries/index.html.haml +31 -21
  34. data/app/views/tienda/countries/new.html.haml +11 -3
  35. data/app/views/tienda/dashboard/home.html.haml +156 -0
  36. data/app/views/tienda/delivery_service_prices/_form.html.haml +53 -39
  37. data/app/views/tienda/delivery_service_prices/edit.html.haml +12 -3
  38. data/app/views/tienda/delivery_service_prices/index.html.haml +28 -19
  39. data/app/views/tienda/delivery_service_prices/new.html.haml +12 -3
  40. data/app/views/tienda/delivery_services/_form.html.haml +48 -35
  41. data/app/views/tienda/delivery_services/edit.html.haml +11 -5
  42. data/app/views/tienda/delivery_services/index.html.haml +34 -24
  43. data/app/views/tienda/delivery_services/new.html.haml +12 -3
  44. data/app/views/tienda/orders/_form.html.haml +78 -53
  45. data/app/views/tienda/orders/_order_details.html.haml +57 -54
  46. data/app/views/tienda/orders/_order_items.html.haml +5 -3
  47. data/app/views/tienda/orders/_payments_form.html.haml +18 -14
  48. data/app/views/tienda/orders/_payments_table.html.haml +6 -5
  49. data/app/views/tienda/orders/_search_form.html.haml +40 -24
  50. data/app/views/tienda/orders/_status_bar.html.haml +36 -32
  51. data/app/views/tienda/orders/index.html.haml +41 -34
  52. data/app/views/tienda/orders/new.html.haml +22 -11
  53. data/app/views/tienda/orders/show.html.haml +24 -18
  54. data/app/views/tienda/product_categories/_form.html.haml +34 -22
  55. data/app/views/tienda/product_categories/edit.html.haml +12 -4
  56. data/app/views/tienda/product_categories/index.html.haml +26 -16
  57. data/app/views/tienda/product_categories/new.html.haml +11 -3
  58. data/app/views/tienda/products/_form.html.haml +163 -126
  59. data/app/views/tienda/products/_table.html.haml +49 -40
  60. data/app/views/tienda/products/edit.html.haml +14 -6
  61. data/app/views/tienda/products/index.html.haml +35 -7
  62. data/app/views/tienda/sessions/new.html.haml +8 -6
  63. data/app/views/tienda/sessions/reset.html.haml +5 -5
  64. data/app/views/tienda/settings/edit.html.haml +20 -14
  65. data/app/views/tienda/stock_level_adjustments/_table.html.haml +33 -0
  66. data/app/views/tienda/stock_level_adjustments/index.html.haml +20 -39
  67. data/app/views/tienda/tax_rates/form.html.haml +41 -25
  68. data/app/views/tienda/tax_rates/index.html.haml +23 -13
  69. data/app/views/tienda/users/_form.html.haml +36 -24
  70. data/app/views/tienda/users/edit.html.haml +12 -3
  71. data/app/views/tienda/users/index.html.haml +23 -13
  72. data/app/views/tienda/users/new.html.haml +10 -3
  73. data/app/views/tienda/variants/form.html.haml +98 -57
  74. data/app/views/tienda/variants/index.html.haml +47 -29
  75. data/config/initializers/assets.rb +9 -0
  76. data/config/locales/en.yml +3 -2
  77. data/config/routes.rb +1 -1
  78. data/db/migrate/20150517191600_add_stock_counter_cache.rb +5 -0
  79. data/db/migrate/20150517195800_remove_stock_level_item_polymorphism.rb +6 -0
  80. data/db/migrate/20150517212100_update_stock_counter_cache.rb +5 -0
  81. data/db/migrate/20150603235417_add_document_to_orders.rb +5 -0
  82. data/lib/tienda/default_navigation.rb +9 -8
  83. data/lib/tienda/navigation_manager.rb +2 -5
  84. data/lib/tienda/version.rb +1 -1
  85. data/lib/tienda.rb +2 -6
  86. metadata +54 -65
@@ -1,35 +1,41 @@
1
- = form_for @country do |f|
1
+ = form_for @country, html: {class: 'form-horizontal'} do |f|
2
2
  = f.error_messages
3
- = field_set_tag t('tienda.countries.country_details') do
4
-
5
- .splitContainer
6
- %dl.third
7
- %dt= f.label :name, t('tienda.countries.name')
8
- %dd= f.text_field :name, :class => 'focus text'
9
- %dl.third
10
- %dt= f.label :code2, t('tienda.countries.iso_alpha_2')
11
- %dd= f.text_field :code2, :class => 'text'
12
- %dl.third
13
- %dt= f.label :code3, t('tienda.countries.iso_alpha_3')
14
- %dd= f.text_field :code3, :class => 'text'
15
-
16
- .splitContainer
17
- %dl.third
18
- %dt= f.label :continent, t('tienda.countries.continent')
19
- %dd= f.text_field :continent, :class => 'text'
20
- %dl.third
21
- %dt= f.label :tld, t('tienda.countries.tld')
22
- %dd= f.text_field :tld, :class => 'text'
23
- %dl.third
24
- %dt= f.label :eu_member, t('tienda.countries.eu_member')
25
- %dd.checkbox
26
- = f.check_box :eu_member
27
- = f.label :eu_member, t('tienda.countries.is_eu_member')
28
-
29
- %p.submit
30
- - unless @country.new_record?
31
- %span.right
32
- = link_to t('tienda.delete'), @country, :class => 'button purple',
33
- :method => :delete, :data => {:confirm => t('tienda.countries.delete_confirmation')}
34
- = f.submit t('tienda.submit'), :class => 'button green'
35
- = link_to t('tienda.cancel'), :countries, :class => 'button'
3
+ .panel.panel-default
4
+ .panel-heading
5
+ = t('tienda.countries.country_details')
6
+ .panel-body
7
+ .form-group
8
+ = f.label :name, t('tienda.countries.name'), class: 'control-label col-md-3'
9
+ .col-md-9
10
+ = f.text_field :name, class: 'focus form-control'
11
+ .form-group
12
+ = f.label :continent, t('tienda.countries.continent'), class: 'control-label col-md-3'
13
+ .col-md-9
14
+ = f.text_field :continent, class: 'form-control'
15
+ .form-group
16
+ = f.label :code2, t('tienda.countries.iso_alpha_2'), class: 'control-label col-md-3'
17
+ .col-md-9
18
+ = f.text_field :code2, class: 'form-control'
19
+ .form-group
20
+ = f.label :tld, t('tienda.countries.tld'), class: 'control-label col-md-3'
21
+ .col-md-9
22
+ = f.text_field :tld, class: 'form-control'
23
+ .form-group
24
+ = f.label :code3, t('tienda.countries.iso_alpha_3'), class: 'control-label col-md-3'
25
+ .col-md-9
26
+ = f.text_field :code3, class: 'form-control'
27
+ .form-group
28
+ = f.label :eu_member, t('tienda.countries.eu_member'), class: 'control-label col-md-3'
29
+ .col-md-9
30
+ .checkbox
31
+ %label
32
+ = f.check_box :eu_member
33
+ = t('tienda.countries.is_eu_member')
34
+ .form-group
35
+ .col-md-9.col-md-offset-3
36
+ - unless @country.new_record?
37
+ .pull-right
38
+ = link_to t('tienda.delete'), @country, class: 'btn btn-danger',
39
+ method: :delete, data: {confirm: t('tienda.countries.delete_confirmation')}
40
+ = f.submit t('tienda.submit'), class: 'btn btn-primary'
41
+ = link_to t('tienda.cancel'), :countries, class: 'btn btn-default'
@@ -1,6 +1,15 @@
1
1
  - @page_title = t('tienda.countries.countries')
2
2
 
3
- = content_for :header do
4
- %p.buttons= link_to t('tienda.countries.back'), :countries, :class => 'button'
5
- %h2.countries= t('tienda.countries.countries')
3
+ .row
4
+ .col-md-12
5
+ %h1.page-header
6
+ = t('tienda.countries.countries')
7
+ -# %small Lorem ipsum dolor
8
+ / /. ROW
9
+
10
+ .row
11
+ .col-md-12
12
+ %p.pull-right
13
+ = link_to t('tienda.countries.back'), :countries, class: 'btn btn-default'
14
+
6
15
  = render 'form'
@@ -1,25 +1,35 @@
1
1
  - @page_title = t('tienda.countries.countries')
2
2
 
3
- = content_for :header do
4
- %p.buttons=link_to t('tienda.countries.new_country') , :new_country, :class => 'button green'
5
- %h2.countries= t('tienda.countries.countries')
3
+ .row
4
+ .col-md-12
5
+ %h1.page-header
6
+ = t('tienda.countries.countries')
7
+ -# %small Lorem ipsum dolor
8
+ / /. ROW
9
+ .row
10
+ .col-md-12
11
+ %p.pull-right
12
+ = link_to t('tienda.countries.new_country') , :new_country, class: 'btn btn-primary'
6
13
 
7
- .table
8
- %table.data
9
- %thead
10
- %tr
11
- %th= t('tienda.countries.name')
12
- %th= t('tienda.countries.iso_alpha_2')
13
- %th= t('tienda.countries.iso_alpha_3')
14
- %th= t('tienda.countries.continent')
15
- %th= t('tienda.countries.tld')
16
- %th= t('tienda.countries.eu?')
17
- %tbody
18
- - for country in @countries
14
+ .panel.panel-default
15
+ .panel-heading
16
+ Listing countries
17
+ .panel-body
18
+ %table.table.table-hover
19
+ %thead
19
20
  %tr
20
- %td= link_to country.name, [:edit, country]
21
- %td= country.code2
22
- %td= country.code3
23
- %td= country.continent
24
- %td= country.tld
25
- %td= boolean_tag country.eu_member?
21
+ %th= t('tienda.countries.name')
22
+ %th= t('tienda.countries.iso_alpha_2')
23
+ %th= t('tienda.countries.iso_alpha_3')
24
+ %th= t('tienda.countries.continent')
25
+ %th= t('tienda.countries.tld')
26
+ %th= t('tienda.countries.eu?')
27
+ %tbody
28
+ - for country in @countries
29
+ %tr
30
+ %td= link_to country.name, [:edit, country]
31
+ %td= country.code2
32
+ %td= country.code3
33
+ %td= country.continent
34
+ %td= country.tld
35
+ %td= boolean_tag country.eu_member?
@@ -1,7 +1,15 @@
1
1
  - @page_title = t('tienda.countries.countries')
2
2
 
3
- = content_for :header do
4
- %p.buttons= link_to t('tienda.countries.back') , :countries, :class => 'button'
5
- %h2.countries= t('tienda.countries.countries')
3
+ .row
4
+ .col-md-12
5
+ %h1.page-header
6
+ = t('tienda.countries.countries')
7
+ -# %small Lorem ipsum dolor
8
+ / /. ROW
9
+
10
+ .row
11
+ .col-md-12
12
+ %p.pull-right
13
+ = link_to t('tienda.countries.back'), :countries, class: 'btn btn-default'
6
14
 
7
15
  = render 'form'
@@ -0,0 +1,156 @@
1
+ - @page_title = 'Dashboard'
2
+
3
+ .row
4
+ .col-md-12
5
+ %h1.page-header
6
+ Dashboard
7
+ %small Summary of your App
8
+ / /. ROW
9
+ .row
10
+ -# .col-md-3.col-sm-12.col-xs-12
11
+ -# .panel.panel-primary.text-center.no-boder.bg-color-green
12
+ -# .panel-body
13
+ -# %i.fa.fa-bar-chart-o.fa-5x
14
+ -# %h3 8,457
15
+ -# .panel-footer.back-footer-green
16
+ -# Daily Visits
17
+ .col-md-6.col-sm-12.col-xs-12
18
+ .panel.panel-primary.text-center.no-boder.bg-color-blue
19
+ .panel-body
20
+ %i.fa.fa-shopping-cart.fa-5x
21
+ %h3= @last_30_days_orders.values.sum
22
+ .panel-footer.back-footer-blue
23
+ Sales
24
+ -# .col-md-3.col-sm-12.col-xs-12
25
+ -# .panel.panel-primary.text-center.no-boder.bg-color-red
26
+ -# .panel-body
27
+ -# %i.fa.fa.fa-comments.fa-5x
28
+ -# %h3 15,823
29
+ -# .panel-footer.back-footer-red
30
+ -# Comments
31
+ .col-md-6.col-sm-12.col-xs-12
32
+ .panel.panel-primary.text-center.no-boder.bg-color-brown
33
+ .panel-body
34
+ %i.fa.fa-users.fa-5x
35
+ %h3= @users_count
36
+ .panel-footer.back-footer-brown
37
+ Users
38
+ .row
39
+ .col-md-9.col-sm-12.col-xs-12
40
+ .panel.panel-default
41
+ .panel-heading
42
+ Orders last 30 days
43
+ .panel-body
44
+ #morris-bar-chart
45
+ .col-md-3.col-sm-12.col-xs-12
46
+ .panel.panel-default
47
+ .panel-heading
48
+ Sales by Product Category
49
+ .panel-body
50
+ #morris-donut-chart
51
+ / /. ROW
52
+ -# .row
53
+ -# .col-md-4.col-sm-12.col-xs-12
54
+ -# .panel.panel-default
55
+ -# .panel-heading
56
+ -# Tasks Panel
57
+ -# .panel-body
58
+ -# .list-group
59
+ -# %a.list-group-item{:href => "#"}
60
+ -# %span.badge 7 minutes ago
61
+ -# %i.fa.fa-fw.fa-comment
62
+ -# Commented on a post
63
+ -# %a.list-group-item{:href => "#"}
64
+ -# %span.badge 16 minutes ago
65
+ -# %i.fa.fa-fw.fa-truck
66
+ -# Order 392 shipped
67
+ -# %a.list-group-item{:href => "#"}
68
+ -# %span.badge 36 minutes ago
69
+ -# %i.fa.fa-fw.fa-globe
70
+ -# Invoice 653 has paid
71
+ -# %a.list-group-item{:href => "#"}
72
+ -# %span.badge 1 hour ago
73
+ -# %i.fa.fa-fw.fa-user
74
+ -# A new user has been added
75
+ -# %a.list-group-item{:href => "#"}
76
+ -# %span.badge 1.23 hour ago
77
+ -# %i.fa.fa-fw.fa-user
78
+ -# A new user has added
79
+ -# %a.list-group-item{:href => "#"}
80
+ -# %span.badge yesterday
81
+ -# %i.fa.fa-fw.fa-globe
82
+ -# Saved the world
83
+ -# .text-right
84
+ -# %a{:href => "#"}
85
+ -# More Tasks
86
+ -# %i.fa.fa-arrow-circle-right
87
+ -# .col-md-8.col-sm-12.col-xs-12
88
+ -# .panel.panel-default
89
+ -# .panel-heading
90
+ -# Responsive Table Example
91
+ -# .panel-body
92
+ -# .table-responsive
93
+ -# %table.table.table-striped.table-bordered.table-hover
94
+ -# %thead
95
+ -# %tr
96
+ -# %th S No.
97
+ -# %th First Name
98
+ -# %th Last Name
99
+ -# %th User Name
100
+ -# %th Email ID.
101
+ -# %tbody
102
+ -# %tr
103
+ -# %td 1
104
+ -# %td John
105
+ -# %td Doe
106
+ -# %td John15482
107
+ -# %td name@site.com
108
+ -# %tr
109
+ -# %td 2
110
+ -# %td Kimsila
111
+ -# %td Marriye
112
+ -# %td Kim1425
113
+ -# %td name@site.com
114
+ -# %tr
115
+ -# %td 3
116
+ -# %td Rossye
117
+ -# %td Nermal
118
+ -# %td Rossy1245
119
+ -# %td name@site.com
120
+ -# %tr
121
+ -# %td 4
122
+ -# %td Richard
123
+ -# %td Orieal
124
+ -# %td Rich5685
125
+ -# %td name@site.com
126
+ -# %tr
127
+ -# %td 5
128
+ -# %td Jacob
129
+ -# %td Hielsar
130
+ -# %td Jac4587
131
+ -# %td name@site.com
132
+ -# %tr
133
+ -# %td 6
134
+ -# %td Wrapel
135
+ -# %td Dere
136
+ -# %td Wrap4585
137
+ -# %td name@site.com
138
+ / /. ROW
139
+
140
+ :javascript
141
+ $(function () {
142
+ Morris.Bar({
143
+ element: 'morris-bar-chart',
144
+ data: [ #{@last_30_days_orders.map{ |k, v| "{ y: '#{k}', a: #{v} }" }.join ', '} ],
145
+ xkey: 'y',
146
+ ykeys: ['a'],
147
+ labels: ['Orders'],
148
+ hideHover: 'auto',
149
+ resize: true
150
+ });
151
+ Morris.Donut({
152
+ element: 'morris-donut-chart',
153
+ data: [ #{@sales_by_category.map{ |k, v| "{ label: '#{k}', value: #{v} }" }.join ', '} ],
154
+ resize: true
155
+ });
156
+ });
@@ -1,44 +1,58 @@
1
1
  = form_for [@delivery_service, @delivery_service_price] do |f|
2
2
  = f.error_messages
3
- = field_set_tag t('tienda.delivery_service_prices.identification_weight') do
4
- .splitContainer
5
- %dl.third
6
- %dt= f.label :code, t('tienda.delivery_service_prices.code')
7
- %dd= f.text_field :code, :class => 'focus text'
3
+ .panel.panel-default
4
+ .panel-heading
5
+ = t('tienda.delivery_service_prices.identification_weight')
6
+ .panel-body
7
+ .row
8
+ .col-md-4
9
+ .form-group
10
+ = f.label :code, t('tienda.delivery_service_prices.code')
11
+ = f.text_field :code, class: 'focus form-control'
12
+ .col-md-4
13
+ .form-group
14
+ = f.label :min_weight, t('tienda.delivery_service_prices.min_weight')
15
+ = f.text_field :min_weight, class: 'form-control'
16
+ .col-md-4
17
+ .form-group
18
+ = f.label :max_weight, t('tienda.delivery_service_prices.max_weight')
19
+ = f.text_field :max_weight, class: 'form-control'
8
20
 
9
- %dl.third
10
- %dt= f.label :min_weight, t('tienda.delivery_service_prices.min_weight')
11
- %dd= f.text_field :min_weight, :class => 'text'
12
- %dl.third
13
- %dt= f.label :max_weight, t('tienda.delivery_service_prices.max_weight')
14
- %dd= f.text_field :max_weight, :class => 'text'
21
+ .panel.panel-default
22
+ .panel-heading
23
+ = t('tienda.delivery_service_prices.pricing')
24
+ .panel-body
25
+ .row
26
+ .col-md-4
27
+ .form-group
28
+ = f.label :price, t('tienda.delivery_service_prices.price')
29
+ .form-group.input-group
30
+ %span.input-group-addon= Tienda.settings.currency_unit.html_safe
31
+ = f.text_field :price, class: 'form-control'
32
+ .col-md-4
33
+ .form-group
34
+ = f.label :cost_price, t('tienda.delivery_service_prices.cost_price')
35
+ .form-group.input-group
36
+ %span.input-group-addon= Tienda.settings.currency_unit.html_safe
37
+ = f.text_field :cost_price, class: 'form-control'
38
+ .col-md-4
39
+ .form-group
40
+ = f.label :tax_rate_id, t('tienda.delivery_service_prices.tax_rate')
41
+ = f.collection_select :tax_rate_id, Tienda::TaxRate.ordered, :id, :description, {include_blank: true}, {class: 'form-control', data: {placeholder: t('tienda.delivery_service_prices.no_tax')}}
15
42
 
16
- = field_set_tag t('tienda.delivery_service_prices.pricing') do
17
- .splitContainer
18
- %dl.third
19
- %dt= f.label :price, t('tienda.delivery_service_prices.price')
20
- %dd
21
- .moneyInput
22
- .currency= Tienda.settings.currency_unit.html_safe
23
- = f.text_field :price, :class => 'text'
24
- %dl.third
25
- %dt= f.label :cost_price, t('tienda.delivery_service_prices.cost_price')
26
- %dd
27
- .moneyInput
28
- .currency= Tienda.settings.currency_unit.html_safe
29
- = f.text_field :cost_price, :class => 'text'
30
- %dl.third
31
- %dt= f.label :tax_rate_id, t('tienda.delivery_service_prices.tax_rate')
32
- %dd= f.collection_select :tax_rate_id, Tienda::TaxRate.ordered, :id, :description, {:include_blank => true}, {:class => 'chosen-with-deselect', :data => {:placeholder => t('tienda.delivery_service_prices.no_tax')}}
43
+ .panel.panel-default
44
+ .panel-heading
45
+ = t('tienda.delivery_service_prices.countries')
46
+ .panel-body
47
+ .row
48
+ .col-md-12
49
+ .form-group
50
+ = f.collection_select :country_ids, Tienda::Country.ordered, :id, :name, {}, {class: 'form-control', multiple: true, data: {placeholder: t('tienda.delivery_service_prices.all_countries')}}
51
+ %p.help-block= t('tienda.delivery_service_prices.help.countries')
33
52
 
34
- = field_set_tag t('tienda.delivery_service_prices.countries') do
35
- %dl
36
- %dd
37
- = f.collection_select :country_ids, Tienda::Country.ordered, :id, :name, {}, {:class => 'chosen', :multiple => true, :data => {:placeholder => t('tienda.delivery_service_prices.all_countries')}}
38
- %p.help= t('tienda.delivery_service_prices.help.countries')
39
-
40
- %p.submit
41
- - unless @delivery_service_price.new_record?
42
- %span.right= link_to t('tienda.delete'), [@delivery_service, @delivery_service_price], :class => 'button purple', :method => :delete, :data => {:confirm => "Are you sure you wish to remove this price?"}
43
- = f.submit t('tienda.submit'), :class => 'button green'
44
- = link_to t('tienda.cancel'), [@delivery_service, :delivery_service_prices], :class => 'button'
53
+ .panel.panel-default
54
+ .panel-body
55
+ - unless @delivery_service_price.new_record?
56
+ %span.pull-right= link_to t('tienda.delete'), [@delivery_service, @delivery_service_price], class: 'btn btn-danger', method: :delete, data: {confirm: "Are you sure you wish to remove this price?"}
57
+ = f.submit t('tienda.submit'), class: 'btn btn-primary'
58
+ = link_to t('tienda.cancel'), [@delivery_service, :delivery_service_prices], class: 'btn btn-default'
@@ -1,6 +1,15 @@
1
1
  - @page_title = t('tienda.delivery_service_prices.delivery_services')
2
2
 
3
- = content_for :header do
4
- %p.buttons= link_to t('tienda.delivery_service_prices.back'), [@delivery_service, :delivery_service_prices], :class => 'button'
5
- %h2.delivery_services= t('tienda.delivery_service_prices.delivery_services')
3
+ .row
4
+ .col-md-12
5
+ %h1.page-header
6
+ = t('tienda.delivery_service_prices.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_service_prices.back') , [@delivery_service, :delivery_service_prices], class: 'btn btn-default'
14
+
6
15
  = render 'form'
@@ -1,23 +1,32 @@
1
1
  - @page_title = t('tienda.delivery_service_prices.delivery_services')
2
2
 
3
- = content_for :header do
4
- %p.buttons
5
- = link_to t('tienda.delivery_service_prices.new_price'), [:new, @delivery_service, :delivery_service_price], :class => 'button green'
6
- = link_to t('tienda.delivery_service_prices.back_to_delivery_services'), :delivery_services, :class => 'button'
7
- %h2.delivery_services= t('tienda.delivery_service_prices.pricing_for', delivery_name: @delivery_service.name)
3
+ .row
4
+ .col-md-12
5
+ %h1.page-header
6
+ = t('tienda.delivery_service_prices.pricing_for', delivery_name: @delivery_service.name)
7
+ -# %small Lorem ipsum dolor
8
+ / /. ROW
9
+ .row
10
+ .col-md-12
11
+ %p.pull-right
12
+ = link_to t('tienda.delivery_service_prices.new_price'), [:new, @delivery_service, :delivery_service_price], class: 'btn btn-primary'
13
+ = link_to t('tienda.delivery_service_prices.back_to_delivery_services'), :delivery_services, class: 'btn btn-default'
8
14
 
9
- .table
10
- %table.data
11
- %thead
12
- %tr
13
- %th= t('tienda.delivery_service_prices.code')
14
- %th= t('tienda.delivery_service_prices.weight_allowance')
15
- %th= t('tienda.delivery_service_prices.price')
16
- %th= t('tienda.delivery_service_prices.cost')
17
- %tbody
18
- - for price in @delivery_service_prices
15
+ .panel.panel-default
16
+ .panel-heading
17
+ Listing delivery services
18
+ .panel-body
19
+ %table.table.table-hover
20
+ %thead
19
21
  %tr
20
- %td= link_to price.code, [:edit, @delivery_service, price]
21
- %td #{number_to_weight price.min_weight} → #{number_to_weight price.max_weight}
22
- %td= number_to_currency(price.price)
23
- %td= number_to_currency price.cost_price
22
+ %th= t('tienda.delivery_service_prices.code')
23
+ %th= t('tienda.delivery_service_prices.weight_allowance')
24
+ %th= t('tienda.delivery_service_prices.price')
25
+ %th= t('tienda.delivery_service_prices.cost')
26
+ %tbody
27
+ - for price in @delivery_service_prices
28
+ %tr
29
+ %td= link_to price.code, [:edit, @delivery_service, price]
30
+ %td #{number_to_weight price.min_weight} → #{number_to_weight price.max_weight}
31
+ %td= number_to_currency(price.price)
32
+ %td= number_to_currency price.cost_price
@@ -1,6 +1,15 @@
1
1
  - @page_title = t('tienda.delivery_service_prices.delivery_services')
2
2
 
3
- = content_for :header do
4
- %p.buttons= link_to t('tienda.delivery_service_prices.back') , [@delivery_service, :delivery_service_prices], :class => 'button'
5
- %h2.delivery_services= t('tienda.delivery_service_prices.delivery_services')
3
+ .row
4
+ .col-md-12
5
+ %h1.page-header
6
+ = t('tienda.delivery_service_prices.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_service_prices.back') , [@delivery_service, :delivery_service_prices], class: 'btn btn-default'
14
+
6
15
  = render 'form'
@@ -1,38 +1,51 @@
1
1
  = form_for @delivery_service do |f|
2
2
  = f.error_messages
3
- = field_set_tag t('tienda.delivery_services.details') do
4
- .splitContainer
5
- %dl.half
6
- %dt= f.label :name, t('tienda.delivery_services.name')
7
- %dd= f.text_field :name, :class => 'focus text'
8
- %dl.half
9
- %dt= f.label :code, t('tienda.delivery_services.code')
10
- %dd= f.text_field :code, :class => 'text'
11
- .splitContainer
12
- %dl.half
13
- %dt= f.label :active, t('tienda.delivery_services.active')
14
- %dd.checkbox
15
- = f.check_box :active
16
- = f.label :active, t('tienda.delivery_services.active_info')
17
- %dl.half
18
- %dt= f.label :default, t('tienda.delivery_services.default')
19
- %dd.checkbox
20
- = f.check_box :default
21
- = f.label :default, t('tienda.delivery_services.default_info')
3
+ .panel.panel-default
4
+ .panel-heading
5
+ = t('tienda.delivery_services.details')
6
+ .panel-body
7
+ .row
8
+ .col-md-6
9
+ .form-group
10
+ = f.label :name, t('tienda.delivery_services.name')
11
+ = f.text_field :name, class: 'focus form-control'
12
+ .col-md-6
13
+ .form-group
14
+ = f.label :code, t('tienda.delivery_services.code')
15
+ = f.text_field :code, class: 'form-control'
16
+ .row
17
+ .col-md-6
18
+ .form-group
19
+ = f.label :active, t('tienda.delivery_services.active')
20
+ .checkbox
21
+ %label
22
+ = f.check_box :active
23
+ = t('tienda.delivery_services.active_info')
24
+ .col-md-6
25
+ .form-group
26
+ = f.label :default, t('tienda.delivery_services.default')
27
+ .checkbox
28
+ %label
29
+ = f.check_box :default
30
+ = t('tienda.delivery_services.default_info')
31
+ .panel.panel-default
32
+ .panel-heading
33
+ = t('tienda.delivery_services.courier')
34
+ .panel-body
35
+ .row
36
+ .col-md-6
37
+ .form-group
38
+ = f.label :courier, t('tienda.delivery_services.courier_name')
39
+ = f.text_field :courier, class: 'form-control'
40
+ .col-md-6
41
+ .form-group
42
+ = f.label :tracking_url, t('tienda.delivery_services.tracking_url')
43
+ = f.text_field :tracking_url, class: 'form-control'
44
+ %p.help-block= t('tienda.delivery_services.tracking_url_help_html')
22
45
 
23
- = field_set_tag t('tienda.delivery_services.courier') do
24
- .splitContainer
25
- %dl.half
26
- %dt= f.label :courier, t('tienda.delivery_services.courier_name')
27
- %dd= f.text_field :courier, :class => 'text'
28
- %dl.half
29
- %dt= f.label :tracking_url, t('tienda.delivery_services.tracking_url')
30
- %dd
31
- = f.text_field :tracking_url, :class => 'text'
32
- %p.help= t('tienda.delivery_services.tracking_url_help_html')
33
-
34
- %p.submit
35
- - unless @delivery_service.new_record?
36
- %span.right= link_to t('tienda.delete'), [@delivery_service], :class => 'button purple', :method => :delete, :data => {:confirm => t('tienda.delivery_services.delete_confirmation')}
37
- = f.submit t('tienda.submit'), :class => 'button green'
38
- = link_to t('tienda.cancel'), :delivery_services, :class => 'button'
46
+ .panel.panel-default
47
+ .panel-body
48
+ - unless @delivery_service.new_record?
49
+ %span.pull-right= link_to t('tienda.delete'), [@delivery_service], class: 'btn btn-danger', method: :delete, data: {confirm: t('tienda.delivery_services.delete_confirmation')}
50
+ = f.submit t('tienda.submit'), class: 'btn btn-primary'
51
+ = link_to t('tienda.cancel'), :delivery_services, class: 'btn btn-default'
@@ -1,9 +1,15 @@
1
1
  - @page_title = t('tienda.delivery_services.delivery_services')
2
2
 
3
- = content_for :header do
4
- %p.buttons
5
- = link_to t('tienda.delivery_services.prices'), [@delivery_service, :delivery_service_prices], :class => 'button'
6
- = link_to t('tienda.delivery_services.back'), :delivery_services, :class => 'button'
7
- %h2.delivery_services= t('tienda.delivery_services.delivery_services')
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'
8
14
 
9
15
  = render 'form'