office_clerk 0.5 → 0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog.md +15 -0
  3. data/Gemfile +0 -13
  4. data/Gemfile.lock +50 -83
  5. data/Guardfile +28 -0
  6. data/app/controllers/admin_controller.rb +6 -2
  7. data/app/controllers/baskets_controller.rb +2 -1
  8. data/app/controllers/categories_controller.rb +2 -1
  9. data/app/controllers/office_controller.rb +5 -0
  10. data/app/controllers/products_controller.rb +1 -1
  11. data/app/controllers/sessions_controller.rb +5 -0
  12. data/app/helpers/shop_helper.rb +0 -11
  13. data/app/models/basket.rb +2 -2
  14. data/app/models/clerk.rb +1 -3
  15. data/app/models/order.rb +3 -3
  16. data/app/views/baskets/_small.html.haml +1 -0
  17. data/app/views/baskets/index.html.haml +3 -3
  18. data/app/views/baskets/show.html.haml +1 -2
  19. data/app/views/categories/edit.html.haml +2 -1
  20. data/app/views/categories/index.html.haml +19 -8
  21. data/app/views/categories/show.html.haml +31 -26
  22. data/app/views/clerks/index.html.haml +4 -4
  23. data/app/views/layouts/_header_extra.haml +1 -2
  24. data/app/views/layouts/office_clerk.csv.erb +1 -0
  25. data/app/views/order_mailer/cancel.text.erb +24 -0
  26. data/app/views/order_mailer/confirm.text.erb +36 -0
  27. data/app/views/order_mailer/paid.text.erb +28 -0
  28. data/app/views/order_mailer/shipped.text.erb +24 -0
  29. data/app/views/orders/index.csv.erb +5 -0
  30. data/app/views/orders/index.html.haml +39 -45
  31. data/app/views/orders/show.html.haml +23 -11
  32. data/app/views/products/_triple.html.haml +2 -2
  33. data/app/views/products/index.html.haml +37 -19
  34. data/app/views/purchases/index.html.haml +4 -3
  35. data/app/views/shop/_product_box.haml +12 -12
  36. data/app/views/suppliers/index.html.haml +5 -5
  37. data/bin/rake +0 -4
  38. data/bin/rspec +0 -4
  39. data/config/locales/en.yml +5 -0
  40. data/config/locales/fi.yml +5 -0
  41. data/config/spring.rb +1 -0
  42. data/lib/office_clerk.rb +3 -1
  43. data/lib/office_clerk/engine.rb +5 -1
  44. data/lib/office_clerk/shipping_method.rb +1 -1
  45. data/lib/office_clerk/version.rb +1 -1
  46. data/office_clerk.gemspec +3 -1
  47. data/spec/features/categories_search_spec.rb +47 -0
  48. data/spec/features/products/index_spec.rb +58 -9
  49. data/spec/models/clerk/email_spec.rb +4 -4
  50. data/spec/spec_helper.rb +6 -47
  51. data/spec/support/basket_helper.rb +9 -0
  52. data/spec/support/product_helper.rb +25 -0
  53. data/spec/support/request_helper.rb +4 -4
  54. data/spec/support/setup/admin.rb +4 -0
  55. data/spec/support/setup/capybara.rb +14 -0
  56. data/spec/support/setup/cleaner.rb +22 -0
  57. data/spec/support/setup/email.rb +6 -0
  58. data/spec/support/setup/factory_girl.rb +3 -0
  59. metadata +95 -51
  60. data/app/views/order_mailer/cancel.html.haml +0 -6
  61. data/app/views/order_mailer/confirm.html.haml +0 -7
  62. data/app/views/order_mailer/paid.html.haml +0 -6
  63. data/app/views/order_mailer/shipped.html.haml +0 -6
  64. data/config/i18n-tasks.yml +0 -11
  65. data/spec/support/factory_girl.rb +0 -6
  66. data/test_app/spec/rails_helper.rb +0 -50
  67. data/test_app/spec/spec_helper.rb +0 -85
data/app/models/basket.rb CHANGED
@@ -18,8 +18,8 @@ class Basket < ActiveRecord::Base
18
18
  end
19
19
 
20
20
  def cache_total
21
- self.total_price = items.to_a.sum{ |i| i.total }
22
- self.total_tax = items.to_a.sum{ |i| i.tax_amount}
21
+ self.total_price = (items.to_a.sum{ |i| i.total }).round(2)
22
+ self.total_tax = (items.to_a.sum{ |i| i.tax_amount}).round(2)
23
23
  end
24
24
 
25
25
  def touch
data/app/models/clerk.rb CHANGED
@@ -1,5 +1,3 @@
1
- require 'bcrypt'
2
-
3
1
  class Clerk < ActiveRecord::Base
4
2
  PEPPER = "0bfa9e2cb4a5efd0d976518a3d82e345060547913d2fd1dd2f32b0c8dbbbb5d3dc20b86d0fed31aca9513bccdf51643700ea277d9c64d9ce8ef886bf39293453"
5
3
  has_many :basket
@@ -12,7 +10,7 @@ class Clerk < ActiveRecord::Base
12
10
  validates_presence_of :encrypted_password
13
11
 
14
12
  validates_uniqueness_of :email
15
- validates :email, :presence => true, :email => true # extra gem to check email validity
13
+ validates :email, :presence => true, :email => {:ban_disposable_email => true, :mx_with_fallback => true }
16
14
 
17
15
  store :address, accessors: [ :name , :street , :city , :phone ] #, coder: JSON
18
16
 
data/app/models/order.rb CHANGED
@@ -9,7 +9,7 @@ class Order < ActiveRecord::Base
9
9
  validates :street,:presence => true , :if => :needs_address?
10
10
  validates :city, :presence => true , :if => :needs_address?
11
11
  validates :phone, :presence => true , :if => :needs_address?
12
- validates :email, :presence => true , :email => true # extra gem to check email validity
12
+ validates :email, :presence => true , :email => {:ban_disposable_email => true, :mx_with_fallback => true }
13
13
 
14
14
  default_scope { order('created_at DESC')}
15
15
 
@@ -26,13 +26,13 @@ class Order < ActiveRecord::Base
26
26
  end
27
27
 
28
28
  def total_price
29
- basket.total_price + shipment_price
29
+ basket.total_price + shipment_price.round(2)
30
30
  end
31
31
 
32
32
  # total tax is for when the rates don't matter, usually to cutomers.
33
33
  # only on bills or invoices do we need the detailed list you get from the taxes function
34
34
  def total_tax
35
- basket.total_tax + shipment_tax*shipment_price
35
+ basket.total_tax + (shipment_tax*shipment_price / 100.0).round(2)
36
36
  end
37
37
 
38
38
  # return a hash of rate => amount , because products may have different taxes,
@@ -23,3 +23,4 @@
23
23
  %td
24
24
  = t(:total)
25
25
  = euros basket.total_price
26
+ = yield :basket
@@ -36,16 +36,16 @@
36
36
  %td= basket_edit_link(basket)
37
37
  = paginate @baskets
38
38
  .col-md-3
39
- = search_form_for @q, :url => search_baskets_path, :html => { :class => "well well-large" }, :method => :post do |f|
39
+ = search_form_for @q, :url => search_baskets_path, :html => { :class => "form-horizontal" }, :method => :post do |f|
40
40
  .form-group.row
41
41
  .col-md-3
42
- = t(:type)
42
+ = f.label(:type)
43
43
  .col-md-9
44
44
  = f.select :kori_type_eq, [["",""] , [t(:order) , "Order"] , [t(:purchase),"Purchase"]] , {}, :class => "form-control"
45
45
  .form-group
46
46
  = f.text_field :items_product_name_cont , :class => "form-control" , :placeholder => t(:name_contains)
47
47
  .form-group.row
48
- .col-md-3
48
+ .col-md-4
49
49
  = f.label(:total_price)
50
50
  .col-md-4
51
51
  = f.text_field :total_price_gt , :class => "form-control"
@@ -12,7 +12,6 @@
12
12
 
13
13
  = render "small" , :basket => @basket
14
14
 
15
- .col-md-12
15
+ .col-md-12.basket_show_end
16
16
  = link_to t(:back), orders_path, :class => "btn btn-warning"
17
17
  = link_to t(:destroy) , basket_path(@basket), :data => { :confirm => t(:are_you_sure) }, :method => :delete, :title => t(:destroy) , :class => "btn btn-danger" unless @basket.kori_type
18
- = link_to t(:print_order), receipt_order_path(@basket.kori) , :target => "_blank" , :class => "btn btn-primary print_order" if @basket.isa(:order)
@@ -21,7 +21,8 @@
21
21
  = f.select :category_id , Category.all.order(:name).map { |c| [c.name, c.id ] }, :prompt => t(:select) , :include_blank => true
22
22
  = f.text_field :position
23
23
  .col-md-7
24
- = f.text_area :description , :rows => 12
24
+ = f.text_area :summary , :rows => 2
25
+ = f.text_area :description , :rows => 10
25
26
  .row
26
27
  .col-md-4
27
28
  = image_tag @category.main_picture.url
@@ -25,7 +25,7 @@
25
25
  %tbody
26
26
  - @categories.each do |category|
27
27
  %tr{:class => "line-#{cycle("1","2")}"}
28
- %td= image_tag category.main_picture.url(:thumb)
28
+ %td.image= image_tag category.main_picture.url(:thumb)
29
29
  %td=link_to category.name, category_path(category), :title => t(:show) , :class => category.online && "online"
30
30
  %td=category.products.length.to_s
31
31
  %td=category.online ? t(:online) : t(:not_online)
@@ -33,15 +33,26 @@
33
33
  %td= link_to t(:edit), edit_category_path(category), :title => t(:edit)
34
34
  = paginate @categories
35
35
  .col-md-3
36
- = search_form_for @q, :url => search_categories_path, :html => { :class => "well well-small" }, :method => :post do |f|
36
+ = search_form_for @q, :url => search_categories_path, :html => { :class => "form-horizontal" }, :method => :post do |f|
37
37
  .form-group
38
- = f.text_field :name_cont , :placeholder => t(:name)
38
+ .input-group
39
+ = f.text_field :name_cont , :class => "form-control" , :placeholder => t(:name)
40
+ %span.input-group-addon
41
+ =t(:online)
42
+ = f.radio_button :online_eq , true
39
43
  .form-group
40
- = f.text_field :description_cont , :placeholder => t(:description)
41
- .search_heading
42
- = t(:online)
43
- = f.check_box :online_eq
44
- = f.submit t(:filter), :class => "btn btn-success"
44
+ .input-group
45
+ = f.text_field :summary_cont , :class => "form-control" , :placeholder => t(:summary)
46
+ %span.input-group-addon
47
+ =t(:blanks)
48
+ = f.radio_button :summary_blank , true
49
+ .form-group
50
+ .input-group
51
+ = f.text_field :description_cont , :class => "form-control" , :placeholder => t(:description)
52
+ %span.input-group-addon
53
+ =t(:blanks)
54
+ = f.radio_button :description_blank , true
55
+ = f.submit t(:filter), :id => :filter , :class => "btn btn-success"
45
56
  = link_to t(:cancel), categories_path, :class => "btn btn-warning"
46
57
  %hr
47
58
  - @roots.each do |group|
@@ -1,30 +1,35 @@
1
- .col-md-6
2
- %h2
3
- = t(:category)
4
- = @category.name
5
- = render "products/online" , :object => @category
1
+ .row
2
+ .col-md-6
3
+ %h2
4
+ = t(:category)
5
+ = @category.name
6
+ = render "products/online" , :object => @category
7
+ %p
8
+ %b
9
+ = t(:summary) + " : "
10
+ = markdown @category.summary
11
+ %br
12
+ %b
13
+ = t(:description) + " : "
14
+ = markdown @category.description
15
+ .col-md-6
16
+ %ol.breadcrumb
17
+ - parents(@category).each do | group|
18
+ %li
19
+ = link_to group.name , category_path(group)
20
+ .row
21
+ .col-md-6
22
+ %p
23
+ = image_tag @category.main_picture.url
24
+ .col-md-6
25
+ %p
26
+ = image_tag @category.extra_picture.url
6
27
 
7
- %ol.breadcrumb
8
- - parents(@category).each do | group|
9
- %li
10
- = link_to group.name , category_path(group)
11
- %p
12
- %b
13
- = t(:description) + " : "
14
- = markdown @category.description
15
- .col-md-6
16
- %p
17
- %b
18
- = t(:link) + " : "
19
- = @category.link
20
- %p
21
- %b
22
- = t(:picture) + " : "
23
- = image_tag @category.main_picture.url
28
+ = link_to t(:edit), edit_category_path(@category), :class => "btn btn-primary"
29
+ = link_to t(:back), categories_path, :class => "btn btn-primary"
30
+ %b= t(:shop_link) + " : "
31
+ = link_to @category.link , shop_group_path(@category.link)
24
32
 
25
- = link_to t(:edit), edit_category_path(@category), :class => "btn btn-primary"
26
- = link_to t(:back), categories_path, :class => "btn btn-primary"
27
-
28
- =render "products/triple" , :products => @category.products.no_items
29
33
  =render "triple" , :groups => @category.categories
34
+ =render "products/triple" , :products => @category.products.no_items
30
35
 
@@ -28,10 +28,10 @@
28
28
  %td= link_to t(:edit), edit_clerk_path(clerk), :title => t(:edit)
29
29
  = paginate @clerks
30
30
  .col-md-3
31
- = search_form_for @q, :url => search_clerks_path, :html => { :class => "well well-small" }, :method => :post do |f|
31
+ = search_form_for @q, :url => search_clerks_path, :html => { :class => "form-horizontal" }, :method => :post do |f|
32
32
  .form-group
33
- = f.text_field :email_cont , :placeholder => t(:email)
33
+ = f.text_field :email_cont , :class => "form-control" , :placeholder => t(:email)
34
34
  .form-group
35
- = f.text_field :address_cont , :placeholder => t(:address)
36
- = f.submit t(:filter), :class => "btn btn-success"
35
+ = f.text_field :address_cont ,:class => "form-control" , :placeholder => t(:address)
36
+ = f.submit t(:filter), :id => :filter , :class => "btn btn-success"
37
37
  = link_to t(:cancel), clerks_path, :class => "btn btn-warning"
@@ -1,5 +1,4 @@
1
- -# ::Rails::Engine.subclasses.map(&:instance) in 4.1
2
- -Rails::Application::Railties.engines.each do |e|
1
+ -Rails::Engine.subclasses.map(&:instance).each do |e|
3
2
  - name = e.engine_name.sub("clerk" , "office")
4
3
  - next if name == e.engine_name
5
4
  = stylesheet_link_tag name
@@ -0,0 +1 @@
1
+ <%= yield %>
@@ -0,0 +1,24 @@
1
+ Hei,
2
+
3
+ Tilauksesi R11111111 on peruttu NN.NN.2014.
4
+
5
+ ....................................................................
6
+ Tilauksen tiedot
7
+ ....................................................................
8
+ Tasapainottava – Neem-Rhassoul shampoo 1 kpl á 13,20 € = 13,20 €
9
+ Villiruusu Hiustenhoitoaine 1 kpl á 18,20 € = 18,20 €
10
+ Päivittäin – Granaattiomenashampoo 2 kpl á 13,20 € = 26,40 €
11
+ Intense Frangipani Deo Roll-on 1 kpl á 14,30 € = 14,30 €
12
+ ....................................................................
13
+ Välisumma: 72,10 €
14
+ Toimituskulut: 7,30 €
15
+ Tilauksen loppusumma: 79,40 €
16
+ Alv 24% NN,NN €
17
+ ....................................................................
18
+ Toimitusosoite: Tiina Tilaaja, Kotikatu 3, 10470 Fiskars
19
+ ....................................................................
20
+
21
+
22
+ Kiitos tilauksestasi!
23
+ Ystävällisin terveisin Auringosta Itään, Kuusta länteen
24
+
@@ -0,0 +1,36 @@
1
+ Hei,
2
+
3
+ Tilauksesi R11111111 on vastaanotettu NN.NN.2014.
4
+ Tarkistathan että tiedot ovat oikein.
5
+
6
+ ....................................................................
7
+ Tilauksen tiedot
8
+ ....................................................................
9
+ <% @order.basket.items.each do |item|%>
10
+ <%= item.product.full_name%>
11
+ <%end%>
12
+ Tasapainottava – Neem-Rhassoul shampoo 1 kpl á 13,20 € = 13,20 €
13
+ Villiruusu Hiustenhoitoaine 1 kpl á 18,20 € = 18,20 €
14
+ Päivittäin – Granaattiomenashampoo 2 kpl á 13,20 € = 26,40 €
15
+ Intense Frangipani Deo Roll-on 1 kpl á 14,30 € = 14,30 €
16
+ ....................................................................
17
+ Välisumma: 72,10 €
18
+ Toimituskulut: 7,30 €
19
+ Tilauksen loppusumma: <%= @order.total_price%> €
20
+ Alv 24% NN,NN €
21
+ ....................................................................
22
+ Toimitusosoite: Tiina Tilaaja, Kotikatu 3, 10470 Fiskars
23
+ ....................................................................
24
+ Maksutapa: Ennakkomaksu
25
+ Tilauksesi lähetetään, kun olet maksanut sen ja maksusi on kirjautunut tilillemme.
26
+ Tilinumero FI1017 4530 0013 2474, mainitse viestikentässä tilausnumerosi R111222333.
27
+ Kun maksusi on kirjautunut tilille, lähetämme tilaamasi tuotteet 1-3 arkipäivän kuluessa.
28
+
29
+ Kiitos tilauksestasi!
30
+
31
+ Ystävällisin terveisin
32
+
33
+ Auringosta Itään, Kuusta länteen
34
+ info@auringostaitaan.fi
35
+ Fredrikinkatu 19 (Viiskulma), 00120 Helsinki
36
+
@@ -0,0 +1,28 @@
1
+ Hei,
2
+
3
+ Tilauksesi R11111111 on kirjattu maksetuksi NN.NN.2014.
4
+ Tilaus postitetaan 1-3 arkipäivän kuluessa.
5
+
6
+ ....................................................................
7
+ Tilauksen tiedot
8
+ ....................................................................
9
+ Tasapainottava – Neem-Rhassoul shampoo 1 kpl
10
+ Villiruusu Hiustenhoitoaine 1 kpl
11
+ Päivittäin – Granaattiomenashampoo 2
12
+ Intense Frangipani Deo Roll-on 1 kpl
13
+ ....................................................................
14
+ Välisumma: 72,10 €
15
+ Toimituskulut: 7,30 €
16
+ Tilauksen loppusumma: 79,40 €
17
+ Alv 24% NN,NN €
18
+ ....................................................................
19
+ Toimitusosoite: Tiina Tilaaja, Kotikatu 3, 10470 Fiskars
20
+ ....................................................................
21
+
22
+ Kiitos tilauksestasi!
23
+
24
+ Ystävällisin terveisin
25
+
26
+ Auringosta Itään, Kuusta länteen
27
+ info@auringostaitaan.fi
28
+ Fredrikinkatu 19 (Viiskulma), 00120 Helsinki
@@ -0,0 +1,24 @@
1
+ Hyvä asiakkaamme,
2
+
3
+ Tilauksesi R11111111 on postitettu NN.NN.2014.
4
+ Postin seurantatunnus on JJFI000111222333444
5
+
6
+ ....................................................................
7
+ Tilauksen tiedot
8
+ ....................................................................
9
+ Tasapainottava – Neem-Rhassoul shampoo 1 kpl
10
+ Villiruusu Hiustenhoitoaine 1 kpl
11
+ Päivittäin – Granaattiomenashampoo 2
12
+ Intense Frangipani Deo Roll-on 1 kpl
13
+ ....................................................................
14
+ Toimitusosoite: Tiina Tilaaja, Kotikatu 3, 10470 Fiskars
15
+ ....................................................................
16
+
17
+
18
+ Kiitos tilauksestasi!
19
+ Ystävällisin terveisin Auringosta Itään, Kuusta länteen
20
+
21
+
22
+
23
+
24
+
@@ -0,0 +1,5 @@
1
+ <% [:number , :ordered_on ,:total_price , :tax , :paid_on ].collect{|i| I18n.t(i)}.join("") %>
2
+ <% @orders.each do |order| %>
3
+ <%=[ order.number.to_s , date(order.ordered_on) , order.total_price.round(2),
4
+ order.total_tax.round(2) , date(order.paid_on) ].join(",") %>
5
+ <%end%>
@@ -13,7 +13,7 @@
13
13
  %th= sort_link @q, :number
14
14
  %th= sort_link @q, :ordered_on
15
15
  %th= t(:items)
16
- %th= sort_link @q, :basket_total_price
16
+ %th= sort_link @q, :total_price
17
17
  %th= sort_link @q, :email
18
18
  %th= t(:paid_on)
19
19
  %th= t(:shipped_on)
@@ -24,7 +24,7 @@
24
24
  = link_to order.number.to_s , order_path(order), :title => t(:show)
25
25
  %td= date(order.ordered_on)
26
26
  %td= order.basket.items.length
27
- %td= link_to euros(order.basket.total_price), basket_path(order.basket)
27
+ %td= link_to euros(order.total_price), basket_path(order.basket)
28
28
  %td= order.email
29
29
  %td= date(order.paid_on)
30
30
  %td= date(order.shipped_on)
@@ -34,60 +34,54 @@
34
34
  .btn-group.pull-right
35
35
  = link_to orders_path(:format => :csv), :class => "btn btn-primary" do
36
36
  %i.icon-download CSV
37
- = link_to orders_path(:format => :json), :class => "btn btn-primary" do
38
- %i.icon-download JSON
39
37
  .col-md-3
40
- = search_form_for @q, :url => search_orders_path, :html => { :class => "well well-small" }, :method => :post do |f|
38
+ = search_form_for @q, :url => search_orders_path, :html => { :class => "form-horizontal" , :role => "form"}, :method => :get do |f|
41
39
  .form-group
42
- = f.text_field :number_cont , :placeholder => t(:order_number)
40
+ = f.text_field :number_cont ,:class => "form-control" , :placeholder => t(:order_number)
43
41
  .form-group
44
- = f.text_field(:email , :placeholder => t(:email))
45
- .form-group.row
46
- .col-md-3
42
+ = f.text_field(:email , :class => "form-control" , :placeholder => t(:email))
43
+ .form-group
44
+ .col-md-4
47
45
  = f.label(:total)
48
46
  .col-md-4
49
47
  = f.text_field :basket_total_price_gteq , :class => "form-control"
50
48
  .col-md-4
51
49
  = f.text_field :basket_total_price_lteq , :class => "form-control"
52
- .row
53
- .col-md-10
50
+ .form-group
51
+ .col-md-3
54
52
  = f.label(:ordered_on)
55
- .row
56
- .col-md-5
53
+ .col-sm-1.radio
54
+ = f.radio_button :ordered_on_blank , true
55
+ .form-group.col-md-6
57
56
  = f.search_field :ordered_on_gteq , :class => "form-control datepicker" , :value => sort_date(:ordered_on_gteq)
58
- .col-md-5
59
- = f.search_field :ordered_on_lteq , :class => "form-control datepicker"
60
- .row
61
- .col-md-10
57
+ .form-group.col-md-4
58
+ = f.search_field :ordered_on_lteq , :class => "form-control datepicker" , :value => sort_date(:ordered_on_lteq)
59
+ .form-group
60
+ .col-md-3
62
61
  = f.label(:paid_on)
63
- .row
64
- .col-md-5
65
- = f.text_field :paid_on_gteq , :class => "form-control datepicker"
66
- .col-md-5
67
- = f.text_field :paid_on_lteq , :class => "form-control datepicker"
68
- .row
69
- .col-md-10
70
- = f.label(:shipped_on)
71
- .row
72
- .col-md-5
73
- = f.text_field :shipped_on_gteq , :class => "form-control datepicker"
74
- .col-md-5
75
- = f.text_field :shipped_on_lteq , :class => "form-control datepicker"
76
- .row
77
- .col-md-10
62
+ .col-sm-1.radio
63
+ = f.radio_button :paid_on_blank , true
64
+ .form-group.col-md-6
65
+ = f.text_field :paid_on_gteq , :class => "form-control datepicker" , :value => sort_date(:paid_on_gteq)
66
+ .form-group.col-md-4
67
+ = f.text_field :paid_on_lteq , :class => "form-control datepicker", :value => sort_date(:paid_on_lteq)
68
+ .form-group
69
+ .col-md-3
78
70
  = f.label(:shipped_on)
79
- .row
80
- .col-md-5
81
- = f.text_field :shipped_on_gteq , :class => "form-control datepicker"
82
- .col-md-5
83
- = f.text_field :shipped_on_lteq , :class => "form-control datepicker"
84
- .row
85
- .col-md-10
71
+ .col-sm-1.radio
72
+ = f.radio_button :shipped_on_blank , true
73
+ .form-group.col-md-6
74
+ = f.text_field :shipped_on_gteq , :class => "form-control datepicker" , :value => sort_date(:shipped_on_gteq)
75
+ .form-group.col-md-4
76
+ = f.text_field :shipped_on_lteq , :class => "form-control datepicker" , :value => sort_date(:shipped_on_lteq)
77
+ .form-group
78
+ .col-md-3
86
79
  = f.label(:canceled_on)
87
- .row
88
- .col-md-5
89
- = f.text_field :canceled_on_gteq , :class => "form-control datepicker"
90
- .col-md-5
91
- = f.text_field :canceled_on_lteq , :class => "form-control datepicker"
92
- = f.submit t(:filter), :class => "btn btn-success"
80
+ .col-sm-1.radio
81
+ = f.radio_button :canceled_on_blank , true
82
+ .form-group.col-md-6
83
+ = f.text_field :canceled_on_gteq , :class => "form-control datepicker",:value => sort_date(:canceled_on_gteq)
84
+ .form-group.col-md-4
85
+ = f.text_field :canceled_on_lteq , :class => "form-control datepicker",:value => sort_date(:canceled_on_lteq)
86
+ = f.submit t(:filter), :id => :filter , :class => "btn btn-success"
93
87
  = link_to t(:cancel), orders_path, :class => "btn btn-warning"