office_clerk 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +73 -0
- data/.rubocop.yml +6 -0
- data/.travis.yml +9 -0
- data/Gemfile +63 -0
- data/Gemfile.lock +367 -0
- data/Guardfile +28 -0
- data/README.md +44 -0
- data/Rakefile +6 -0
- data/app/assets/images/admin/baskets-2.jpg +0 -0
- data/app/assets/images/admin/baskets.jpg +0 -0
- data/app/assets/images/admin/categories-2.jpg +0 -0
- data/app/assets/images/admin/categories.jpg +0 -0
- data/app/assets/images/admin/clerks-2.jpg +0 -0
- data/app/assets/images/admin/clerks.jpg +0 -0
- data/app/assets/images/admin/orders-2.jpg +0 -0
- data/app/assets/images/admin/orders.jpg +0 -0
- data/app/assets/images/admin/products-2.jpg +0 -0
- data/app/assets/images/admin/products.jpg +0 -0
- data/app/assets/images/admin/purchases-2.jpg +0 -0
- data/app/assets/images/admin/purchases.jpg +0 -0
- data/app/assets/images/admin/suppliers-2.jpg +0 -0
- data/app/assets/images/admin/suppliers.jpg +0 -0
- data/app/assets/images/alpha.png +0 -0
- data/app/assets/images/down-icon.png +0 -0
- data/app/assets/images/header.gif +0 -0
- data/app/assets/images/hihih.jpg +0 -0
- data/app/assets/images/hue.png +0 -0
- data/app/assets/images/koe.jpg +0 -0
- data/app/assets/images/missing.png +0 -0
- data/app/assets/images/saturation.png +0 -0
- data/app/assets/images/shop/basket.jpg +0 -0
- data/app/assets/images/shop/farfalla-logo.jpg +0 -0
- data/app/assets/images/shop/header.gif +0 -0
- data/app/assets/images/shop/header.jpg +0 -0
- data/app/assets/images/shop/header.png +0 -0
- data/app/assets/images/shop/kansi.jpg +0 -0
- data/app/assets/images/shop/kansi.png +0 -0
- data/app/assets/images/shop/logo.png +0 -0
- data/app/assets/images/shop/menu-gourmet.jpg +0 -0
- data/app/assets/images/shop/menu-hius.jpg +0 -0
- data/app/assets/images/shop/menu-huonetuoksu.jpg +0 -0
- data/app/assets/images/shop/menu-info.jpg +0 -0
- data/app/assets/images/shop/menu-kasvo.jpg +0 -0
- data/app/assets/images/shop/menu-laukut.jpg +0 -0
- data/app/assets/images/shop/menu-luomu.jpg +0 -0
- data/app/assets/images/shop/menu-men.jpg +0 -0
- data/app/assets/images/shop/menu-oljy.jpg +0 -0
- data/app/assets/images/shop/menu-tuoksu1.jpg +0 -0
- data/app/assets/images/shop/menu-vaatteet.jpg +0 -0
- data/app/assets/images/shop/menu-valaisin.jpg +0 -0
- data/app/assets/images/shop/menu-vartalo.jpg +0 -0
- data/app/assets/images/shop/spacer.gif +0 -0
- data/app/assets/images/shop/tausta.jpg +0 -0
- data/app/assets/images/shop/tervetuloa.gif +0 -0
- data/app/assets/images/shop/valk.png +0 -0
- data/app/assets/images/shop/valk3.png +0 -0
- data/app/assets/images/shop/violetti-lev.jpg +0 -0
- data/app/assets/images/shop/violetti.jpg +0 -0
- data/app/assets/images/ui-anim_basic_16x16.gif +0 -0
- data/app/assets/images/up-icon.png +0 -0
- data/app/assets/javascripts/admin.js +29 -0
- data/app/assets/javascripts/shop.js +30 -0
- data/app/assets/stylesheets/admin.css.scss +129 -0
- data/app/assets/stylesheets/shop-receipt.css.scss +80 -0
- data/app/assets/stylesheets/shop.css.scss +403 -0
- data/app/controllers/admin_controller.rb +23 -0
- data/app/controllers/application_controller.rb +41 -0
- data/app/controllers/baskets_controller.rb +176 -0
- data/app/controllers/categories_controller.rb +69 -0
- data/app/controllers/clerks_controller.rb +64 -0
- data/app/controllers/orders_controller.rb +57 -0
- data/app/controllers/products_controller.rb +126 -0
- data/app/controllers/purchases_controller.rb +72 -0
- data/app/controllers/sessions_controller.rb +46 -0
- data/app/controllers/shop_controller.rb +90 -0
- data/app/controllers/suppliers_controller.rb +63 -0
- data/app/helpers/admin_helper.rb +28 -0
- data/app/helpers/application_helper.rb +25 -0
- data/app/helpers/baskets_helper.rb +4 -0
- data/app/helpers/categories_helper.rb +4 -0
- data/app/helpers/orders_helper.rb +4 -0
- data/app/helpers/products_helper.rb +4 -0
- data/app/helpers/purchases_helper.rb +4 -0
- data/app/helpers/shop_helper.rb +17 -0
- data/app/helpers/suppliers_helper.rb +4 -0
- data/app/mailers/.keep +0 -0
- data/app/models/basket.rb +114 -0
- data/app/models/category.rb +27 -0
- data/app/models/clerk.rb +46 -0
- data/app/models/item.rb +26 -0
- data/app/models/order.rb +72 -0
- data/app/models/product.rb +100 -0
- data/app/models/purchase.rb +26 -0
- data/app/models/supplier.rb +15 -0
- data/app/views/addresses/_form_fields.html.haml +4 -0
- data/app/views/addresses/show.html.haml +23 -0
- data/app/views/baskets/_small.html.haml +25 -0
- data/app/views/baskets/edit.html.haml +74 -0
- data/app/views/baskets/index.html.haml +55 -0
- data/app/views/baskets/show.html.haml +18 -0
- data/app/views/categories/_treeview.html.haml +8 -0
- data/app/views/categories/_triple.html.haml +12 -0
- data/app/views/categories/edit.html.haml +36 -0
- data/app/views/categories/index.html.haml +49 -0
- data/app/views/categories/show.html.haml +30 -0
- data/app/views/clerks/edit.html.haml +20 -0
- data/app/views/clerks/index.html.haml +37 -0
- data/app/views/clerks/show.html.haml +19 -0
- data/app/views/layouts/_admin_menu.html.haml +14 -0
- data/app/views/layouts/_google.haml +8 -0
- data/app/views/layouts/_messages.html.haml +5 -0
- data/app/views/layouts/admin.html.haml +42 -0
- data/app/views/layouts/shop.html.haml +96 -0
- data/app/views/orders/edit.html.haml +25 -0
- data/app/views/orders/index.html.haml +93 -0
- data/app/views/orders/show.html.haml +37 -0
- data/app/views/products/_line.html.haml +25 -0
- data/app/views/products/_name.html.haml +4 -0
- data/app/views/products/_online.html.haml +2 -0
- data/app/views/products/_triple.html.haml +12 -0
- data/app/views/products/edit.html.haml +42 -0
- data/app/views/products/index.html.haml +86 -0
- data/app/views/products/show.html.haml +94 -0
- data/app/views/purchases/edit.html.haml +9 -0
- data/app/views/purchases/index.html.haml +52 -0
- data/app/views/purchases/show.html.haml +32 -0
- data/app/views/sessions/new.html.haml +10 -0
- data/app/views/sessions/new_clerk.html.haml +22 -0
- data/app/views/shop/_groups.html.haml +8 -0
- data/app/views/shop/_menu.html.haml +5 -0
- data/app/views/shop/_sub.html.haml +0 -0
- data/app/views/shop/checkout.haml +142 -0
- data/app/views/shop/group.html.haml +9 -0
- data/app/views/shop/main_group.html.haml +9 -0
- data/app/views/shop/order.haml +104 -0
- data/app/views/shop/product.html.haml +67 -0
- data/app/views/shop/product_list.html.haml +50 -0
- data/app/views/shop/saved_search.html +6 -0
- data/app/views/shop/sub_group.html.haml +19 -0
- data/app/views/shop/tuotteista.html.haml +40 -0
- data/app/views/shop/welcome.html.haml +103 -0
- data/app/views/suppliers/edit.html.haml +10 -0
- data/app/views/suppliers/index.html.haml +40 -0
- data/app/views/suppliers/show.html.haml +27 -0
- data/bin/bundle +3 -0
- data/bin/rails +8 -0
- data/bin/rake +8 -0
- data/bin/rspec +7 -0
- data/bin/spring +18 -0
- data/config.ru +7 -0
- data/config/application.example.yml +13 -0
- data/config/application.rb +59 -0
- data/config/application.yml +13 -0
- data/config/boot.rb +7 -0
- data/config/database.yml +25 -0
- data/config/environment.rb +6 -0
- data/config/environments/development.rb +31 -0
- data/config/environments/production.rb +80 -0
- data/config/environments/test.rb +36 -0
- data/config/i18n-tasks.yml +11 -0
- data/config/initializers/attack.rb +32 -0
- data/config/initializers/backtrace_silencers.rb +7 -0
- data/config/initializers/filter_parameter_logging.rb +4 -0
- data/config/initializers/inflections.rb +16 -0
- data/config/initializers/migrate.rb +6 -0
- data/config/initializers/mime_types.rb +6 -0
- data/config/initializers/secret_token.rb +12 -0
- data/config/initializers/session_store.rb +3 -0
- data/config/initializers/simple_form.rb +149 -0
- data/config/initializers/simple_form_bootstrap.rb +48 -0
- data/config/initializers/wrap_parameters.rb +14 -0
- data/config/locales/config.yml +23 -0
- data/config/locales/en.yml +183 -0
- data/config/locales/fi.yml +211 -0
- data/config/routes.rb +108 -0
- data/db/migrate/20131224171442_clerks.rb +15 -0
- data/db/migrate/20131226110406_suppliers.rb +9 -0
- data/db/migrate/20131226143612_categories.rb +18 -0
- data/db/migrate/20131226143747_items.rb +14 -0
- data/db/migrate/20131226144134_orders.rb +21 -0
- data/db/migrate/20131226144316_baskets.rb +12 -0
- data/db/migrate/20131226151151_purchases.rb +11 -0
- data/db/migrate/20131226151332_products.rb +27 -0
- data/db/schema.rb +138 -0
- data/db/seeds.rb +4 -0
- data/lib/assets/.keep +0 -0
- data/lib/office_clerk.rb +20 -0
- data/lib/office_clerk/shipping_method.rb +35 -0
- data/lib/tasks/.keep +0 -0
- data/lib/tasks/import.rake +33 -0
- data/lib/templates/haml/scaffold/_form.html.haml +8 -0
- data/office_clerk.gemspec +46 -0
- data/public/404.html +58 -0
- data/public/422.html +58 -0
- data/public/500.html +57 -0
- data/public/favicon.ico +0 -0
- data/public/humans.txt +20 -0
- data/public/robots.txt +5 -0
- data/spec/controllers/baskets_controller_spec.rb +112 -0
- data/spec/controllers/categories_controller_spec.rb +133 -0
- data/spec/controllers/clerks_controller_spec.rb +70 -0
- data/spec/controllers/orders_controller_spec.rb +105 -0
- data/spec/controllers/products_controller_spec.rb +138 -0
- data/spec/controllers/purchases_controller_spec.rb +123 -0
- data/spec/controllers/sessions_controller_spec.rb +18 -0
- data/spec/controllers/suppliers_controller_spec.rb +137 -0
- data/spec/factories/addresses.rb +11 -0
- data/spec/factories/baskets.rb +15 -0
- data/spec/factories/categories.rb +8 -0
- data/spec/factories/clerks.rb +15 -0
- data/spec/factories/items.rb +19 -0
- data/spec/factories/orders.rb +9 -0
- data/spec/factories/products.rb +10 -0
- data/spec/factories/purchases.rb +10 -0
- data/spec/factories/suppliers.rb +7 -0
- data/spec/features/baskets/buttons_spec.rb +35 -0
- data/spec/features/baskets/edit_spec.rb +50 -0
- data/spec/features/baskets/index_spec.rb +12 -0
- data/spec/features/baskets/search_spec.rb +33 -0
- data/spec/features/baskets/show_spec.rb +21 -0
- data/spec/features/categories_spec.rb +21 -0
- data/spec/features/clerks_spec.rb +21 -0
- data/spec/features/orders_spec.rb +14 -0
- data/spec/features/products/index_spec.rb +30 -0
- data/spec/features/products/new_spec.rb +20 -0
- data/spec/features/purchases_spec.rb +14 -0
- data/spec/features/shops_spec.rb +18 -0
- data/spec/features/suppliers_spec.rb +18 -0
- data/spec/models/baskets/inventory_spec.rb +34 -0
- data/spec/models/baskets/items_spec.rb +37 -0
- data/spec/models/baskets/products_spec.rb +31 -0
- data/spec/models/category_spec.rb +18 -0
- data/spec/models/clerk/email_spec.rb +69 -0
- data/spec/models/clerk/password_spec.rb +83 -0
- data/spec/models/item_spec.rb +33 -0
- data/spec/models/locale_spec.rb +17 -0
- data/spec/models/order_spec.rb +19 -0
- data/spec/models/product_spec.rb +29 -0
- data/spec/models/purchase_spec.rb +8 -0
- data/spec/models/supplier_spec.rb +8 -0
- data/spec/routing/baskets_routing_spec.rb +35 -0
- data/spec/routing/categories_routing_spec.rb +35 -0
- data/spec/routing/orders_routing_spec.rb +35 -0
- data/spec/routing/products_routing_spec.rb +35 -0
- data/spec/routing/purchases_routing_spec.rb +35 -0
- data/spec/routing/suppliers_routing_spec.rb +35 -0
- data/spec/spec_helper.rb +74 -0
- data/spec/support/request_helper.rb +31 -0
- data/test/fixtures/baskets.yml +41993 -0
- data/test/fixtures/categories.yml +638 -0
- data/test/fixtures/clerks.yml +694 -0
- data/test/fixtures/items.yml +83651 -0
- data/test/fixtures/orders.yml +58918 -0
- data/test/fixtures/products.yml +110904 -0
- data/test/fixtures/purchases.yml +1755 -0
- data/test/fixtures/suppliers.yml +341 -0
- data/todo +8 -0
- metadata +607 -0
@@ -0,0 +1,52 @@
|
|
1
|
+
.row
|
2
|
+
.col-md-9.purchases
|
3
|
+
.row
|
4
|
+
.col-md-10
|
5
|
+
%h2= t(:purchases)
|
6
|
+
= paginate @purchases
|
7
|
+
.col-md-3
|
8
|
+
= image_tag "admin/purchases.jpg" , :class => "img-responsive"
|
9
|
+
.row
|
10
|
+
.col-md-9
|
11
|
+
%div
|
12
|
+
%table.table.table-striped.table-bordered.table-condensed
|
13
|
+
%thead
|
14
|
+
%tr
|
15
|
+
%th= sort_link @q, :ordered_on
|
16
|
+
%th= sort_link @q, :received_on
|
17
|
+
%th= t(:items)
|
18
|
+
%th= sort_link @q, :basket_total_price
|
19
|
+
%th= @purchase_scope.length.to_s + " " + t(:purchases)
|
20
|
+
%tbody
|
21
|
+
- @purchases.each do |purchase|
|
22
|
+
%tr{:class => "line-#{cycle("1","2")}"}
|
23
|
+
%td= date(purchase.ordered_on)
|
24
|
+
%td= date(purchase.received_on)
|
25
|
+
%td= purchase.basket.items.length
|
26
|
+
%td= link_to euros(purchase.basket.total_price) , basket_path(purchase.basket)
|
27
|
+
%td= link_to t(:show) , purchase_path(purchase), :title => t(:show)
|
28
|
+
.btn-toolbar
|
29
|
+
.btn-group
|
30
|
+
= paginate @purchases
|
31
|
+
.col-md-3
|
32
|
+
= search_form_for @q, :url => search_purchases_path, :html => { :class => "well well-small" }, :method => :post do |f|
|
33
|
+
.form-group
|
34
|
+
= f.text_field :name_cont , :placeholder => t(:name)
|
35
|
+
.row
|
36
|
+
.col-md-10
|
37
|
+
= f.label(:ordered_on)
|
38
|
+
.row
|
39
|
+
.col-md-5
|
40
|
+
= f.text_field :ordered_on_gteq , :class => "form-control datepicker"
|
41
|
+
.col-md-5
|
42
|
+
= f.text_field :ordered_on_lteq , :class => "form-control datepicker"
|
43
|
+
.row
|
44
|
+
.col-md-10
|
45
|
+
= f.label(:received_on)
|
46
|
+
.row
|
47
|
+
.col-md-5
|
48
|
+
= f.text_field :received_on_gt , :class => "form-control datepicker"
|
49
|
+
.col-md-5
|
50
|
+
= f.text_field :received_on_lt , :class => "form-control datepicker"
|
51
|
+
= f.submit t(:filter), :class => "btn btn-success"
|
52
|
+
= link_to t(:cancel), purchases_path, :class => "btn btn-warning"
|
@@ -0,0 +1,32 @@
|
|
1
|
+
%h2
|
2
|
+
= t(:show)
|
3
|
+
= t(:purchase)
|
4
|
+
%p
|
5
|
+
%b
|
6
|
+
= t(:name) + " : " + @purchase.name.to_s
|
7
|
+
%p
|
8
|
+
%b
|
9
|
+
-if @purchase.ordered_on
|
10
|
+
= t(:ordered_on) + " : " + date(@purchase.ordered_on)
|
11
|
+
-else
|
12
|
+
= link_to t(:order) , order_purchase_path(@purchase) , :class => "btn btn-primary"
|
13
|
+
%p
|
14
|
+
%b
|
15
|
+
-if @purchase.received_on
|
16
|
+
= t(:received) + " : " + date(@purchase.received_on)
|
17
|
+
-else
|
18
|
+
= link_to t(:receive) , receive_purchase_path(@purchase) , :class => "btn btn-primary"
|
19
|
+
|
20
|
+
= render "baskets/small" , :basket => @purchase.basket
|
21
|
+
|
22
|
+
%p
|
23
|
+
%b
|
24
|
+
= t(:suppliers) + " : "
|
25
|
+
= @purchase.basket.suppliers.collect {|s| s.name }.join
|
26
|
+
= link_to t(:back), purchases_path, :class => "btn btn-warning"
|
27
|
+
|
28
|
+
-unless @purchase.received_on
|
29
|
+
%h3{"style" => "color:red"}
|
30
|
+
= t(:inventory)
|
31
|
+
= link_to t(:inventory) , inventory_purchase_path(@purchase) , :class => "btn btn-primary"
|
32
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
%h1 Sign Up
|
2
|
+
= form_for @clerk do |f|
|
3
|
+
- if @clerk.errors.any?
|
4
|
+
.error_messages
|
5
|
+
%h2 Form is invalid
|
6
|
+
%ul
|
7
|
+
- for message in @clerk.errors.full_messages
|
8
|
+
%li= message
|
9
|
+
%p
|
10
|
+
= f.label :email
|
11
|
+
%br/
|
12
|
+
= f.text_field :email
|
13
|
+
%p
|
14
|
+
= f.label :password
|
15
|
+
%br/
|
16
|
+
= f.password_field :password
|
17
|
+
%p
|
18
|
+
= f.label :password_confirmation
|
19
|
+
%br/
|
20
|
+
= f.password_field :password_confirmation
|
21
|
+
%p.button= f.submit
|
22
|
+
|
File without changes
|
@@ -0,0 +1,142 @@
|
|
1
|
+
.row
|
2
|
+
%ol.breadcrumb
|
3
|
+
%li
|
4
|
+
%a{ :href => "/"}= t(:home)
|
5
|
+
%li
|
6
|
+
= t(:basket)
|
7
|
+
|
8
|
+
|
9
|
+
= bootstrap_form_for @order, :url => shop_checkout_path do |f|
|
10
|
+
.row
|
11
|
+
= f.alert_message t(:fix_errors) , error_summary: false
|
12
|
+
|
13
|
+
.col-md-3
|
14
|
+
.group-wrapper.side.checkout
|
15
|
+
%img{:src => "/assets/shop/basket.jpg"}/
|
16
|
+
%h5 Ostoskori
|
17
|
+
|
18
|
+
.col-md-9
|
19
|
+
.row
|
20
|
+
%br
|
21
|
+
%h4 Ostoskorisi sisältö
|
22
|
+
%div
|
23
|
+
%table.table.table-hover.table-condensed
|
24
|
+
%thead
|
25
|
+
%tr
|
26
|
+
%th tuote
|
27
|
+
%th
|
28
|
+
%th hinta a
|
29
|
+
%th määrä
|
30
|
+
%th yhteishinta
|
31
|
+
%tbody
|
32
|
+
-current_basket.items.each do |item|
|
33
|
+
%tr
|
34
|
+
%td.picture.text-center= image_tag item.product.main_picture.url(:thumb) if item.product
|
35
|
+
%td.name
|
36
|
+
= link_to shop_product_path(:link => item.product.link ) do
|
37
|
+
= item.name
|
38
|
+
%td= number_to_currency item.product.price
|
39
|
+
%td
|
40
|
+
= link_to cart_remove_path( :id => item.product.id ) do
|
41
|
+
= image_tag "down-icon.png" , :width => 16 , :height => 16
|
42
|
+
= item.quantity
|
43
|
+
= link_to cart_add_path( :id => item.product.id ) do
|
44
|
+
= image_tag "up-icon.png" , :width => 16 , :height => 16
|
45
|
+
%td= number_to_currency item.total
|
46
|
+
|
47
|
+
%tr
|
48
|
+
%th
|
49
|
+
%th tuotteet yhteensä
|
50
|
+
%th
|
51
|
+
%th
|
52
|
+
%th= number_to_currency current_basket.total_price
|
53
|
+
|
54
|
+
.row
|
55
|
+
%hr
|
56
|
+
|
57
|
+
.col-md-3
|
58
|
+
%h4.highlight
|
59
|
+
Valitse toimitustapa
|
60
|
+
.row
|
61
|
+
.col-md-9
|
62
|
+
%br
|
63
|
+
- extra = OfficeClerk.config("defaults.free_shipping") - current_basket.total_price
|
64
|
+
- if extra > 0
|
65
|
+
.frame.bg-high8
|
66
|
+
%b= t(:notice) + "!"
|
67
|
+
= t(:order_more_for_free_shipping , :more => extra.round(2))
|
68
|
+
|
69
|
+
.col-md-9
|
70
|
+
.row
|
71
|
+
.col-md-7
|
72
|
+
%h4
|
73
|
+
Valitse toimitustapa
|
74
|
+
= @order.shipment_type
|
75
|
+
- OfficeClerk::ShippingMethod.all.each_value do |s|
|
76
|
+
.radio
|
77
|
+
= radio_button_tag "order[shipment_type]" , s.type , s.type.to_s == @order.shipment_type , "data-price" => s.price_for(current_basket).round(2)
|
78
|
+
= s.name
|
79
|
+
= s.price_for(current_basket).round(2)
|
80
|
+
€
|
81
|
+
|
82
|
+
.col-md-4
|
83
|
+
%h4
|
84
|
+
= t(:order)
|
85
|
+
= @order.number
|
86
|
+
|
87
|
+
%table.table.table-condensed.basket-total
|
88
|
+
%thead
|
89
|
+
%tr
|
90
|
+
%th Tuotteet yhteensä
|
91
|
+
%td.text-right
|
92
|
+
%span#basket_total= current_basket.total_price.round(2)
|
93
|
+
€
|
94
|
+
%tbody
|
95
|
+
%tr
|
96
|
+
%th Toimituskulut
|
97
|
+
%td.text-right
|
98
|
+
%span#shipping_cost= @order.shipment_price
|
99
|
+
€
|
100
|
+
%tr
|
101
|
+
%th Tilaus yhteensä
|
102
|
+
%th.text-right
|
103
|
+
%span#order_total= @order.total_price.round(2)
|
104
|
+
€
|
105
|
+
.col-md-1
|
106
|
+
|
107
|
+
|
108
|
+
.row
|
109
|
+
%hr
|
110
|
+
.col-md-3
|
111
|
+
.row
|
112
|
+
.col-md-9
|
113
|
+
%h4.highlight Anna yhteystiedot
|
114
|
+
%br/
|
115
|
+
|
116
|
+
%b Tallennetut osoitteet
|
117
|
+
|
118
|
+
.frame#previous_address
|
119
|
+
%span.name Anna Asiakas
|
120
|
+
%br/
|
121
|
+
%span.street Mallikatu 3
|
122
|
+
%br/
|
123
|
+
%span.city 10300 Karjaa
|
124
|
+
%br/
|
125
|
+
%span.phone 040 333 4455
|
126
|
+
%br/
|
127
|
+
%br/
|
128
|
+
%button.btn.btn-primary.btn-xs#fill_address{:type => "button"} Käytä tätä osoitetta
|
129
|
+
|
130
|
+
.col-md-9
|
131
|
+
.row
|
132
|
+
.col-md-9#address_form
|
133
|
+
%h4 Yhteystiedot
|
134
|
+
= f.text_field :name , :placeholder => t(:name)
|
135
|
+
= f.text_field :street , :placeholder => t(:street)
|
136
|
+
= f.text_field :city , :placeholder => t(:city)
|
137
|
+
= f.text_field :phone , :placeholder => t(:phone)
|
138
|
+
= f.email_field :email, :placeholder => t(:email)
|
139
|
+
%hr
|
140
|
+
%button.btn.btn-primary.btn-lg{:type => "submit"} Tee tilaus
|
141
|
+
|
142
|
+
.col-md-3
|
@@ -0,0 +1,104 @@
|
|
1
|
+
!!!
|
2
|
+
%html
|
3
|
+
%head
|
4
|
+
%meta{:charset => "utf-8"}
|
5
|
+
%title= t(:receipt)
|
6
|
+
= stylesheet_link_tag "shop" , :media => "all"
|
7
|
+
%body
|
8
|
+
.row
|
9
|
+
%img{:src => "/assets/shop/spacer.gif"}/
|
10
|
+
|
11
|
+
.receipt.no-screen
|
12
|
+
#header
|
13
|
+
= image_tag "receipt-logo.gif"
|
14
|
+
%br/
|
15
|
+
%br/
|
16
|
+
.shop
|
17
|
+
Auringosta Itään, Kuusta Länteen
|
18
|
+
.info
|
19
|
+
Fredrikinkatu 19 (Viiskulma)
|
20
|
+
%br/
|
21
|
+
00120 Helsinki
|
22
|
+
|
23
|
+
%hr
|
24
|
+
%b.highlight Kiitos tilauksestasi!
|
25
|
+
.row
|
26
|
+
.col-md-3.no-print
|
27
|
+
.group-wrapper
|
28
|
+
%img{:src => "/assets/shop/basket.jpg"}/
|
29
|
+
%h5 Tilausvahvistus
|
30
|
+
|
31
|
+
.col-md-9
|
32
|
+
.row
|
33
|
+
%br
|
34
|
+
%h4.highlight Tilausvahvistus
|
35
|
+
%b Tilaus
|
36
|
+
=@order.number
|
37
|
+
vastaanotettu
|
38
|
+
=date(@order.ordered_on || Date.today)
|
39
|
+
%hr
|
40
|
+
%div
|
41
|
+
%table.table.table-condensed
|
42
|
+
%thead
|
43
|
+
%tr
|
44
|
+
%th
|
45
|
+
%th Tuote
|
46
|
+
%th hinta
|
47
|
+
%th määrä
|
48
|
+
%th yhteishinta
|
49
|
+
%tbody
|
50
|
+
-@order.basket.items.each do |item|
|
51
|
+
%tr
|
52
|
+
%td.picture= image_tag item.product.main_picture.url(:thumb) if item.product
|
53
|
+
%td.name
|
54
|
+
= link_to shop_product_path(:link => item.product.link ) do
|
55
|
+
= item.name
|
56
|
+
%td= number_to_currency item.product.price
|
57
|
+
%td= item.quantity
|
58
|
+
%td= number_to_currency item.total
|
59
|
+
%tr
|
60
|
+
%th Tuotteet yhteensä
|
61
|
+
%th
|
62
|
+
%th
|
63
|
+
%th
|
64
|
+
%th= number_to_currency @order.basket.total_price
|
65
|
+
%tr
|
66
|
+
%td Toimituskulut
|
67
|
+
%td
|
68
|
+
%td
|
69
|
+
%td
|
70
|
+
%td= number_to_currency @order.shipment_price
|
71
|
+
%tr
|
72
|
+
%th Tilaus yhteensä
|
73
|
+
%th
|
74
|
+
%th
|
75
|
+
%th
|
76
|
+
%th= number_to_currency @order.total_price
|
77
|
+
|
78
|
+
%b
|
79
|
+
Valittu toimitustapa:
|
80
|
+
= t(@order.shipment_type)
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
.row
|
85
|
+
%hr
|
86
|
+
.col-md-6
|
87
|
+
%h4.highlight Yhteystiedot
|
88
|
+
= @order.name
|
89
|
+
%br
|
90
|
+
= @order.street
|
91
|
+
%br
|
92
|
+
= @order.city
|
93
|
+
%br
|
94
|
+
puh
|
95
|
+
=@order.phone
|
96
|
+
%br
|
97
|
+
= @order.email
|
98
|
+
|
99
|
+
.col-md-6
|
100
|
+
%h4.highlight Tilaushistoria
|
101
|
+
Aikaisemmat tilauksesi löydät täältä
|
102
|
+
%a{:href => "/linkki_jonnekin"} clerk.auringostaitaan.fi/tilaushistoria
|
103
|
+
|
104
|
+
|
@@ -0,0 +1,67 @@
|
|
1
|
+
.row
|
2
|
+
%ol.breadcrumb
|
3
|
+
%li
|
4
|
+
%a{ :href => "/"}= t(:home)
|
5
|
+
- parents(@group).each do | group|
|
6
|
+
%li
|
7
|
+
= link_to group.name , shop_group_path(group.link)
|
8
|
+
%li.current
|
9
|
+
%a{href: "#"}= @product.name
|
10
|
+
|
11
|
+
.row
|
12
|
+
.col-md-3.tex
|
13
|
+
- parents(@group).each do | group|
|
14
|
+
.group-wrapper.side
|
15
|
+
= link_to shop_group_path(group.link) do
|
16
|
+
= image_tag group.main_picture.url(:list)
|
17
|
+
%h5= group.name
|
18
|
+
|
19
|
+
.intro2
|
20
|
+
%p.description= markdown( @group.description) rescue ""
|
21
|
+
|
22
|
+
.col-md-8
|
23
|
+
.row.product-info
|
24
|
+
.col-md-12.product-title-h1
|
25
|
+
%h1.product-title= @product.name
|
26
|
+
%br/
|
27
|
+
|
28
|
+
.row
|
29
|
+
.col-md-3.picture
|
30
|
+
=image_tag @product.main_picture.url(:product) , :class => "img-responsive-prod"
|
31
|
+
#product-description.col-md-9
|
32
|
+
.row
|
33
|
+
.col-md-12
|
34
|
+
= markdown @product.description rescue ""
|
35
|
+
.row
|
36
|
+
.col-md-4.product-price
|
37
|
+
%h4
|
38
|
+
=t(:price)
|
39
|
+
%span.price.selling= euros @product.price
|
40
|
+
.col-md-8
|
41
|
+
= form_tag(cart_add_url(:id => @product.id)) do
|
42
|
+
#inside-product-cart-form
|
43
|
+
.add-to-cart
|
44
|
+
.row
|
45
|
+
.col-md-10
|
46
|
+
%button#add-to-cart-button.btn.btn-primary{:type => :submit}
|
47
|
+
= t(:add_to_basket)
|
48
|
+
|
49
|
+
.row
|
50
|
+
.col-md-12
|
51
|
+
%br/
|
52
|
+
%table.table-striped.table-condensed
|
53
|
+
%thead.highlight
|
54
|
+
%tr
|
55
|
+
%th Muita tuotteita samassa tuoteryhmässä
|
56
|
+
%tbody
|
57
|
+
- in_group(@product).each do |p|
|
58
|
+
%tr
|
59
|
+
%td
|
60
|
+
=link_to shop_product_path(:link => p.link ) do
|
61
|
+
= p.name
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
.col-md-1
|
66
|
+
|
67
|
+
|