workarea-image_decoration 1.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +21 -0
  3. data/Gemfile +17 -0
  4. data/LICENSE +52 -0
  5. data/README.md +42 -0
  6. data/Rakefile +56 -0
  7. data/app/assets/javascripts/workarea/admin/image_decoration/.keep +0 -0
  8. data/app/assets/javascripts/workarea/storefront/image_decoration/.keep +0 -0
  9. data/app/assets/javascripts/workarea/storefront/image_decoration/modules/custom_sizing.js +37 -0
  10. data/app/assets/javascripts/workarea/storefront/image_decoration/modules/optional_feature.js +33 -0
  11. data/app/assets/javascripts/workarea/storefront/image_decoration/modules/pattern_repeat.js +45 -0
  12. data/app/assets/javascripts/workarea/storefront/products/modules/create_your_own.js +25 -0
  13. data/app/assets/stylesheets/workarea/admin/image_decoration/.keep +0 -0
  14. data/app/assets/stylesheets/workarea/storefront/image_decoration/.keep +0 -0
  15. data/app/assets/stylesheets/workarea/storefront/image_decoration/components/custom_sizing.scss +62 -0
  16. data/app/assets/stylesheets/workarea/storefront/image_decoration/components/optional_feature.scss +15 -0
  17. data/app/assets/stylesheets/workarea/storefront/image_decoration/components/pattern_repeat.scss +273 -0
  18. data/app/assets/stylesheets/workarea/storefront/products/components/create_your_own.scss +38 -0
  19. data/app/controllers/.keep +0 -0
  20. data/app/controllers/workarea/storefront/products_controller.decorator +33 -0
  21. data/app/helpers/.keep +0 -0
  22. data/app/mailers/.keep +0 -0
  23. data/app/models/.keep +0 -0
  24. data/app/models/workarea/catalog/product_image.decorator +15 -0
  25. data/app/view_models/workarea/storefront/product_templates/image_decoration_view_model.rb +16 -0
  26. data/app/views/.keep +0 -0
  27. data/app/views/workarea/storefront/products/create_your_own.html.haml +97 -0
  28. data/app/views/workarea/storefront/products/shared/_custom_sizing.html.haml +56 -0
  29. data/app/views/workarea/storefront/products/shared/_material.html.haml +37 -0
  30. data/app/views/workarea/storefront/products/shared/_optional_feature.html.haml +37 -0
  31. data/app/views/workarea/storefront/products/shared/_pattern_repeat.html.haml +44 -0
  32. data/app/views/workarea/storefront/products/templates/_image_decoration.html.haml +112 -0
  33. data/bin/rails +25 -0
  34. data/config/initializers/append_points.rb +64 -0
  35. data/config/initializers/dragonfly.rb +31 -0
  36. data/config/initializers/workarea.rb +4 -0
  37. data/config/routes.rb +6 -0
  38. data/lib/workarea/image_decoration.rb +8 -0
  39. data/lib/workarea/image_decoration/engine.rb +10 -0
  40. data/lib/workarea/image_decoration/version.rb +5 -0
  41. data/test/dummy/.ruby-version +1 -0
  42. data/test/dummy/Rakefile +6 -0
  43. data/test/dummy/app/assets/config/manifest.js +3 -0
  44. data/test/dummy/app/assets/images/.keep +0 -0
  45. data/test/dummy/app/assets/javascripts/application.js +14 -0
  46. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  47. data/test/dummy/app/controllers/application_controller.rb +2 -0
  48. data/test/dummy/app/controllers/concerns/.keep +0 -0
  49. data/test/dummy/app/helpers/application_helper.rb +2 -0
  50. data/test/dummy/app/jobs/application_job.rb +2 -0
  51. data/test/dummy/app/mailers/application_mailer.rb +4 -0
  52. data/test/dummy/app/models/concerns/.keep +0 -0
  53. data/test/dummy/app/views/layouts/application.html.erb +15 -0
  54. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  55. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  56. data/test/dummy/bin/bundle +3 -0
  57. data/test/dummy/bin/rails +4 -0
  58. data/test/dummy/bin/rake +4 -0
  59. data/test/dummy/bin/setup +25 -0
  60. data/test/dummy/bin/update +25 -0
  61. data/test/dummy/config.ru +5 -0
  62. data/test/dummy/config/application.rb +33 -0
  63. data/test/dummy/config/boot.rb +5 -0
  64. data/test/dummy/config/environment.rb +5 -0
  65. data/test/dummy/config/environments/development.rb +52 -0
  66. data/test/dummy/config/environments/production.rb +83 -0
  67. data/test/dummy/config/environments/test.rb +45 -0
  68. data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
  69. data/test/dummy/config/initializers/assets.rb +12 -0
  70. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  71. data/test/dummy/config/initializers/content_security_policy.rb +25 -0
  72. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  73. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  74. data/test/dummy/config/initializers/inflections.rb +16 -0
  75. data/test/dummy/config/initializers/mime_types.rb +4 -0
  76. data/test/dummy/config/initializers/workarea.rb +5 -0
  77. data/test/dummy/config/initializers/wrap_parameters.rb +9 -0
  78. data/test/dummy/config/locales/en.yml +33 -0
  79. data/test/dummy/config/puma.rb +37 -0
  80. data/test/dummy/config/routes.rb +5 -0
  81. data/test/dummy/config/spring.rb +6 -0
  82. data/test/dummy/db/seeds.rb +2 -0
  83. data/test/dummy/lib/assets/.keep +0 -0
  84. data/test/dummy/log/.keep +0 -0
  85. data/test/integration/workarea/storefront/products_integration_test.rb +19 -0
  86. data/test/models/workarea/catalog/product_image_test.rb +46 -0
  87. data/test/system/workarea/storefront/create_your_own_system_test.rb +18 -0
  88. data/test/system/workarea/storefront/optional_feature_system_test.rb +43 -0
  89. data/test/teaspoon_env.rb +6 -0
  90. data/test/test_helper.rb +10 -0
  91. data/workarea-image_decoration.gemspec +20 -0
  92. metadata +149 -0
@@ -0,0 +1,38 @@
1
+ .grid__cell.grid__cell--60-at-medium{
2
+ font-size: 5rem;
3
+ }
4
+
5
+ .img-responsive{
6
+ width: 11em !important;
7
+ height: 8em !important;
8
+ }
9
+
10
+ .description{
11
+ display: none;
12
+ border: 3px solid #dddddd;
13
+ padding: 1rem;
14
+ }
15
+ .shipping{
16
+ display: none;
17
+ border: 3px solid #dddddd;
18
+ padding: 1rem;
19
+ }
20
+
21
+ .img{
22
+ width: 4em !important;
23
+ position: absolute;
24
+ right: 600px;
25
+ top: 75%;
26
+ }
27
+ .button-submit{
28
+ background: #132de8bd;
29
+ }
30
+
31
+ .button-panel{
32
+ width: 36em;
33
+ text-align: left;
34
+ border: 0;
35
+ padding: 10px 16px;
36
+ background: #302f336b;
37
+ font-size: 1.5rem;
38
+ }
File without changes
@@ -0,0 +1,33 @@
1
+ module Workarea
2
+ decorate Storefront::ProductsController, with: :murals_your_way do
3
+
4
+ def create_your_own
5
+ model = Catalog::Product.find_by(slug: params[:product_id])
6
+ raise InvalidDisplay unless model.active? || current_user.try(:admin?)
7
+
8
+ @product = Storefront::ProductViewModel.wrap(
9
+ model,
10
+ view_model_options
11
+ )
12
+ end
13
+
14
+ def update_image
15
+ model = Catalog::Product.find_by(slug: params[:product_id])
16
+ @product = Storefront::ProductViewModel.wrap(model, view_model_options)
17
+ @image = model.images.build(update_params)
18
+
19
+ if @image.save
20
+ redirect_to product_create_your_own_path(@product)
21
+ else
22
+ render :index, status: :unprocessable_entity
23
+ end
24
+ end
25
+
26
+ private
27
+
28
+ def update_params
29
+ params.require(:catalog_product).permit(:image)
30
+ end
31
+
32
+ end
33
+ end
File without changes
File without changes
File without changes
@@ -0,0 +1,15 @@
1
+ module Workarea
2
+ decorate Catalog::ProductImage, with: :murals_your_way do
3
+
4
+ decorated do
5
+ extend Dragonfly::Model
6
+
7
+ field :image_uid, type: String
8
+
9
+ dragonfly_accessor :image, app: :workarea
10
+
11
+ validates_size_of :image, maximum: 500.megabytes
12
+ end
13
+
14
+ end
15
+ end
@@ -0,0 +1,16 @@
1
+ module Workarea
2
+ module Storefront
3
+ module ProductTemplates
4
+ class ImageDecorationViewModel < ProductViewModel
5
+
6
+ # Override method from model in order to
7
+ # prepend the template type to the name of
8
+ # the product.
9
+ #
10
+ def name
11
+ [template, model.name].join(' ')
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
File without changes
@@ -0,0 +1,97 @@
1
+ - content_for :breadcrumbs do
2
+
3
+ %p.breadcrumbs__node-group
4
+ %span.breadcrumbs__node
5
+ = link_to t('workarea.storefront.layouts.home'), root_path, rel: 'home', class: 'breadcrumbs__link'
6
+ %span.breadcrumbs__node
7
+ %span.breadcrumbs__text= 'create your own murals'
8
+
9
+ .grid.grid--rev
10
+ .grid__cell.grid__cell--40-at-medium
11
+ %p
12
+ %h3 Create Your Own Wall Mural
13
+ %p
14
+ %h3 $120.00
15
+ %hr
16
+ %br
17
+ %label
18
+ %h5 1. Upload File *
19
+ %p.description-container
20
+ We accept all .png, .jpg, .jpeg, .tif, .svg types of files. For different file types (.ai, .eps, .psd, .tiff, .pdf, or .psb files), please use our
21
+ CYO File Upload Form
22
+
23
+ = form_for(@product.model, url: product_update_image_path(@product), method: :post) do |form|
24
+ .property
25
+ = form.label :image, 'Image'
26
+ .value= form.file_field :image
27
+ = form.submit 'submit', value: 'Submit', class: 'button-submit'
28
+
29
+ %br
30
+ = append_partials('storefront.create_your_own', product: @product)
31
+
32
+
33
+ .grid__cell.grid__cell--60-at-medium
34
+ .product-img-box
35
+ .product-images
36
+ %div
37
+ %img.img-responsive{:alt => "Create Your Own Wall Mural", :src => "#{product_image_url(@product.images.last, :zoom)}", data: {'grayscale-target': '', 'flipimage-target': ''}}/
38
+
39
+ .panel
40
+ %div
41
+ = button_tag 'Description', value: 'description', class: 'button-panel', id: "create"
42
+ .description{:id => "own-create"}
43
+ %label
44
+ %h5 Upload
45
+ %p.description-container
46
+ 1. Upload a photo or design you have created. For information on size, resolution, and how to get the best results, see our
47
+ = succeed "." do
48
+ %a{:href => "https://www.muralsyourway.com/mural-image-quality/"} Image Guidelines
49
+ %h5 Customize
50
+ %p.description-container
51
+ 2. Select your size, material and basic customization options. If you would like assistance with something more involved,
52
+ = succeed "." do
53
+ %a{:href => "/contacts"} Contact Us
54
+ %h5 Order
55
+ %p.description-container
56
+ 3. That's it! Once your order is placed, we will fulfill it within 5-7 days, and shipping within the Contiguous USA is free. Expedited and International shipping options are available.
57
+
58
+ %div
59
+ = button_tag 'Shipping', value: 'shipping', class: 'button-panel', id: "ship"
60
+ .shipping{:id => "own-ship"}
61
+ %label
62
+ %h5 Printed and Shipped With Care
63
+ %p
64
+ Every mural purchased is one-of-a-kind and is printed on demand. We treat every order as a custom order to ensure that image quality, width to height ratio, and material quality exactly fit your needs. Orders are usually shipped within 4-7 business days. For an extra fee you can choose our special rush order option to get your mural shipped within 3 business days.
65
+ %h5 Free UPS Ground Shipping (in the contiguous 48 U.S. states)
66
+ %p
67
+ Murals Your Way offers Free UPS Ground Shipping for all mural orders shipping to the contiguous 48 U.S. states. For those really urgent timelines, we offer 2nd day air and overnight options for an extra charge. We also ship UPS Expedited to Alaska, Hawaii, and other U.S. properties, but there will be shipping charges to those destinations.
68
+ %h5 International Orders
69
+ %p
70
+ We welcome all mural customers from around the world, and offer UPS Worldwide Shipping options. Call us for rates on international delivery or submit your shipping address within our checkout process. All murals shipped internationally may incur charges such as customs duties and import tax. All additional fees, duties and taxes will be paid directly by the customer. Most murals are shipped within 4-7 business days from the time of your order.
71
+ %h5 Rush Orders / Quicker Delivery
72
+ %p
73
+ We also offer a special rush order production service for an additional charge. This moves your mural order to the front of the line so that we can ship it out more quickly. Please contact us for pricing or submit your information within our shopping cart.
74
+ %h5 Packaging
75
+ %p
76
+ We take proper care to ensure that your mural is protected during shipping. Each mural comes rolled around a tube and then wrapped in a protective paper. The mural is then placed in a cardboard box along with protective plastic end caps and foam inserts. This packaging exceeds UPS and FedEx required standards. Our high-quality commercial grade murals will never arrive wrinkled.
77
+ .box
78
+ %label
79
+ %h5 Choose your size, select your material, and even customize the look of your wall mural!
80
+ %p
81
+ 1.Custom Printing Murals for 40+ Years
82
+ %br
83
+ 2.High Quality, Commercial Grade Materials
84
+ %br
85
+ 3.Exceptional Customer Service
86
+ %br
87
+ 4.Safe, Secure Shopping
88
+ %br
89
+ 5.Free Ground Shipping in Contiguous US
90
+ %br
91
+ 6.Fast Turnaround, Expedited Shipping &amp; Rush Service Available
92
+ %p.help-text
93
+ Have questions? Give us a call or
94
+ = succeed "," do
95
+ %a{:href => "/contacts"}
96
+ %strong contact us
97
+ %img.img{:alt => "", :src => "https://www.muralsyourway.com/media/wysiwyg/love-it-guarantee-product-page.png"}/
@@ -0,0 +1,56 @@
1
+ %link{href: "https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.6/cropper.min.css", rel: "stylesheet"}
2
+ %script{ src: "https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.5.6/cropper.min.js"}
3
+
4
+ %dl{class: "configurable-attr-renders form-pretty"}
5
+ %dt
6
+ %label
7
+ %h5 2. Choose Your Size
8
+ %dd
9
+ .form-list
10
+ .radio
11
+ %label
12
+ %input{type: "radio", name: "size", value: "small", checked: "checked", class: "js-size-option-small" , data: {width: "59", height: "59"} }
13
+ %span
14
+ %strong Small:
15
+ %span{class: "size size-small"} 4'-11"W x 4'-11"H
16
+ .form-list
17
+ .radio
18
+ %label
19
+ %input{type: "radio", name: "size", value: "medium", class: "js-size-option-medium" , data: {width: "72", height: "72"} }
20
+ %span
21
+ %strong Medium:
22
+ %span{class: "size size-medium"} 6'W x 6'H
23
+ .form-list
24
+ .radio
25
+ %label
26
+ %input{type: "radio", name: "size", value: "large", class: "js-size-option-large" , data: {width: "96", height: "96"} }
27
+ %span
28
+ %strong Large:
29
+ %span{class: "size size-large"} 8'W x 8'H
30
+ .js-size-custom
31
+ .form-list
32
+ .radio
33
+ %label
34
+ %input{type: "radio", name: "size", value: "custom", class: "js-size-option-custom" , data: {width: "-1", height: "-1", target: ".scalable_main_image"} }
35
+ %span
36
+ %strong Enter Your Dimensions:
37
+ %span{class: "size size-custom"}
38
+ .form-list.custom-size-options
39
+ %ul
40
+ %li{class: "js-inputs-container js-inputs-container-width"}
41
+ %strong Width:
42
+ %div
43
+ %input{type: "tel", min: "0", name: "size_custom_width_feet", id: "width_feet", class: "form-control size-input"}
44
+ %label{for: "width_feet", class: "control-label"} Feet
45
+ %div
46
+ %input{type: "tel", min: "0", name: "size_custom_width_inches", id: "width_inches", class: "form-control size-input"}
47
+ %label{for: "width_inches", class: "control-label"} Inches
48
+ %br
49
+ %li{class: "js-inputs-container js-inputs-container-height"}
50
+ %strong Height:
51
+ %div
52
+ %input{type: "tel", min: "0", name: "size_custom_height_feet", id: "height_feet", class: "form-control size-input"}
53
+ %label{for: "height_feet", class: "control-label"} Feet
54
+ %div
55
+ %input{type: "tel", min: "0", name: "size_custom_height_inches", id: "height_inches", class: "form-control size-input"}
56
+ %label{for: "height_inches", class: "control-label"} Inches
@@ -0,0 +1,37 @@
1
+ %h4 3. Choose Your Material *
2
+
3
+ .radio
4
+ %label
5
+ %input{type: "radio", name: "material", value: "a", checked: "checked"}/
6
+ %span
7
+ %strong Prepasted Wallpaper
8
+ %i.icon-prepasted-wallpaper
9
+ %p.material-desc Water activated adhesive backing. Applies quickly and removes clean. Smooth texture with a matte finish. (PVC Free - Class A Fire Rating)
10
+ .radio
11
+ %label
12
+ %input{type: "radio", name: "material", value: "b", checked: "checked"}/
13
+ %span
14
+ %strong Eco Bella - Texture
15
+ %i.icon-prepasted-wallpaper
16
+ %p.material-desc Commercial grade wallcovering that is as durable as it is beautiful! Light texture with a matte finish. (PVC Free-Type II-Class A Fire Rating)
17
+ .radio
18
+ %label
19
+ %input{type: "radio", name: "material", value: "c", checked: "checked"}/
20
+ %span
21
+ %strong SmartStick®
22
+ %i.icon-prepasted-wallpaper
23
+ %p.material-desc Removable, damage free wallcovering goes up fast and easy. No paste required. Smooth texture with a matte finish. (PVC Free - Class A Fire Rating)
24
+ .radio
25
+ %label
26
+ %input{type: "radio", name: "material", value: "d", checked: "checked"}/
27
+ %span
28
+ %strong Vinyl HD - Texture
29
+ %i.icon-prepasted-wallpaper
30
+ %p.material-desc Commercial grade vinyl wallcovering great for high traffic areas. Textured surface with a matte finish. Top coat recommended. (Type II- Class A Fire Rating)
31
+ .radio
32
+ %label
33
+ %input{type: "radio", name: "material", value: "e", checked: "checked"}/
34
+ %span
35
+ %strong VersaGrip (TM)
36
+ %i.icon-prepasted-wallpaper
37
+ %p.material-desc For indoor & outdoor walls & floors but NOT for drywall. Extremely durable peel & stick. Scratch resistant. Anti slip texture. Adheres to rough surfaces like concrete and brick. Not for drywall. (Class B Fire Rating)
@@ -0,0 +1,37 @@
1
+ %h4 OPTIONAL FEATURES
2
+
3
+ %p
4
+ %input{type: "checkbox", name: "black and white", value: "1", id: "blackid", data: {target: ".scalable_main_image", grayscale: ''}}/
5
+ 1. Black and White
6
+ %p
7
+ %input{type: "checkbox", name: "flip image", value: "2", id: "flipid", data: {target: ".scalable_main_image", flipimage: ''}}/
8
+ 2. Flip Image
9
+ %p
10
+ %input{type: "checkbox", name: "personalize", value: "3", id: "text"}/
11
+ 3. Personalize
12
+ .personalize{:id => "add-text"}
13
+ %div
14
+ %strong Personalization
15
+ Add text: $25
16
+ .radio
17
+ %label
18
+ %input{:checked => "checked", :name => "personalization_type", :type => "radio", :value => "text"}/
19
+ %span Text
20
+ #personalization-text-option
21
+ %input{:name => "personalization_text"}/
22
+ %p
23
+ %label
24
+ Select Font
25
+ %br
26
+ %select{:name => "personalization_font"}
27
+ %option{:value => "Frutiger"} Frutiger
28
+ %option{:value => "Garamond"} Garamond
29
+ %option{:value => "Hobgoblin"} Hobgoblin
30
+ %option{:value => "Veneer"} Veneer
31
+ %option{:value => "Sugar Plums"} Sugar Plums
32
+ %option{:value => "Other"} Other
33
+ %p
34
+ %label Special Instructions
35
+ %br
36
+ %textarea{:cols => "30", :name => "personalization_instructions", :placeholder => "i.e. font color, font size, location of text", :rows => "3"}
37
+ %div After you place your order, Murals Your Way will send you a proof for your personalization.
@@ -0,0 +1,44 @@
1
+ %dl{class: "configurable-attr-renders form-pretty"}
2
+ %dt
3
+ %label
4
+ %h5 1. Choose Your Pattern Repeat
5
+ %table
6
+ %tr{class: "scalable-patterns radio"}
7
+
8
+ %td
9
+ %label{class: "relative"}
10
+ .scalable-img.hundred{style: "background-image: url('#{product_image_url(product.primary_image, :option_a)}')", data: {'grayscale-target': '', 'flipimage-target': ''}}
11
+ %input{type: "radio", name: "pattern_repeat", value: "hundred", id:"scalable-patterns-A", checked: "checked"}
12
+ %span
13
+ %label{name: "pattern_repeat", for: "scalable-patterns-A", class:"pattern-name"} A
14
+
15
+ %td
16
+ %label{class: "relative"}
17
+ .scalable-img.seventyfive{style: "background-image: url('#{product_image_url(product.primary_image, :option_a)}')", data: {'grayscale-target': '', 'flipimage-target': ''}}
18
+ %input{type: "radio", name: "pattern_repeat", value: "seventyfive", id:"scalable-patterns-B"}
19
+ %span
20
+ %label{name: "pattern_repeat", for: "scalable-patterns-B", class:"pattern-name"} B
21
+
22
+ %td
23
+ %label{class: "relative"}
24
+ .scalable-img.fifty{style: "background-image: url('#{product_image_url(product.primary_image, :option_a)}')", data: {'grayscale-target': '', 'flipimage-target': ''}}
25
+ %input{type: "radio", name: "pattern_repeat", value: "fifty", id:"scalable-patterns-C"}
26
+ %span
27
+ %label{name: "pattern_repeat", for: "scalable-patterns-C", class:"pattern-name"} C
28
+
29
+ %td
30
+ %label{class: "relative"}
31
+ .scalable-img.twentyfive{style: "background-image: url('#{product_image_url(product.primary_image, :option_a)}')", data: {'grayscale-target': '', 'flipimage-target': ''}}
32
+ %input{type: "radio", name: "pattern_repeat", value: "twentyfive", id:"scalable-patterns-D"}
33
+ %span
34
+ %label{name: "pattern_repeat", for: "scalable-patterns-D", class:"pattern-name"} D
35
+ %td
36
+ %label{class: "relative"}
37
+ .scalable-img.no-repeat{style: "background-image: url('#{product_image_url(product.primary_image, :option_a)}')", data: {'grayscale-target': '', 'flipimage-target': ''}}
38
+ %input{type: "radio", name: "pattern_repeat", value: "no-repeat", id:"scalable-patterns-E"}
39
+ %div{ class: "no-repeat-pattern absolute", value: "full"}
40
+ %span{ class: "relative z-index-1"}
41
+ NO
42
+ %br REPEAT
43
+ %span
44
+ %label{name: "pattern_repeat", for: "scalable-patterns-E", class:"pattern-name"} E
@@ -0,0 +1,112 @@
1
+ .grid.grid--rev
2
+ .grid__cell.grid__cell--60-at-medium
3
+
4
+ .product-details__name
5
+ %h1.product-details__heading= product.name
6
+ %h4= product.template
7
+ %p.product-details__id
8
+ %span= product.id
9
+
10
+ .product-prices.product-prices--details
11
+ = render 'workarea/storefront/products/pricing', product: product
12
+
13
+ = append_partials('storefront.product_pricing_details', product: product)
14
+
15
+ = append_partials('storefront.image_decoration', product: product)
16
+
17
+ - if product.description.present?
18
+ .product-details__description
19
+ %p= truncated_product_description(product, t('workarea.storefront.products.read_more'))
20
+
21
+ = form_tag cart_items_path, method: 'post', class: 'product-details__add-to-cart-form', data: { dialog_form: { dialogOptions: { closeAll: true, initModules: true } }, analytics: add_to_cart_analytics_data(product).to_json } do
22
+ = hidden_field_tag :product_id, product.id, id: dom_id(product, 'product_id')
23
+ = hidden_field_tag :via, params[:via], id: dom_id(product, 'via')
24
+
25
+ - if product.sku_options.one?
26
+ = hidden_field_tag :sku, product.sku_options.first.second
27
+
28
+ - else
29
+ .property
30
+ = label_tag :sku, nil, class: 'property__name', for: "sku_#{dom_id(product)}" do
31
+ %span.property__text= t('workarea.storefront.products.select_options')
32
+ .value
33
+ = select_tag :sku, options_for_select(product.sku_options, params[:sku]), required: true, id: "sku_#{dom_id(product)}", data: { product_details_sku_select: product.slug }
34
+ - if params[:sku].present?
35
+ %p.product-details__inventory-status= product.inventory_status
36
+
37
+ = append_partials('storefront.add_to_cart_form', product: product)
38
+
39
+ - if product.purchasable?
40
+ .product-details__quantity
41
+ .property
42
+ = label_tag :quantity, nil, class: 'property__name', for: "quantity#{dom_id(product)}" do
43
+ %span.property__text= t('workarea.storefront.products.quantity')
44
+ .value= number_field_tag :quantity, params[:quantity] || 1, class: 'text-box text-box--x-small', required: true, min: 1, id: "quantity#{dom_id(product)}"
45
+
46
+ %p.product-details__add-to-cart-action= button_tag t('workarea.storefront.products.add_to_cart'), value: 'add_to_cart', class: 'button button--large'
47
+
48
+ - else
49
+ = hidden_field_tag :quantity, params[:quantity] || 1, id: "quantity#{dom_id(product)}"
50
+ %p.product-details__unavailable= t('workarea.storefront.products.unavailable')
51
+
52
+ = append_partials('storefront.product_details', product: product)
53
+
54
+ %p.product-details__full-details=link_to t('workarea.storefront.products.view_full_details'), product_path(product, color: params[:color]), class: 'text-button'
55
+
56
+ .grid__cell.grid__cell--40-at-medium
57
+
58
+ .product-details__primary-image.has-overlayed-item
59
+ .scalable-img.scalable_main_image{style: "background-image: url('#{product_image_url(product.primary_image, :detail_a)}')", class: 'product-details__primary-image-link', data: {'grayscale-target': '', 'flipimage-target': ''}}
60
+ .overlayed-item{id: "overlayed-item"}
61
+
62
+ .product-details__alt-images
63
+ .grid.grid--auto
64
+ .grid__cell
65
+ .product-details__alt-image
66
+ %table
67
+ %tr
68
+
69
+ %td{class: "js-slider-item ben item thumbnail"}
70
+ %div
71
+ .item.first-preview{data:{ target: "#overlayed-item"}}
72
+ .img-responsive{style: "background-image: url('#{product_image_url(product.primary_image, :option_a)}')", data: {'grayscale-target': '', 'flipimage-target': ''}}
73
+
74
+ %td{class: "js-slider-item"}
75
+ .item.thumbnail
76
+ .has-overlayed-item.overlay-item-ruler
77
+ .relative
78
+ .thumb-set-bg{style: "background-image: url('#{product_image_url(product.primary_image, :option_a)}')", data: {'grayscale-target': '', 'flipimage-target': ''}}
79
+
80
+ .img-responsive{src: "#{product_image_url(product.primary_image, :option_a)}"}
81
+ .ruler-overlay
82
+
83
+ %td
84
+ .item.thumbnail
85
+ .has-overlayed-item.detail-thumb{data:{ target: "#overlayed-item"}}
86
+ .relative
87
+ .thumb-zoom.thumb-set-bg{style: "background-image: url('#{product_image_url(product.primary_image, :option_a)}')", data: {'grayscale-target': '', 'flipimage-target': ''}}
88
+
89
+ .img-responsive{src: "#{product_image_url(product.primary_image, :option_a)}"}
90
+ .ruler-overlay
91
+ .detailed-view.absolute
92
+ %span{ class: "relative z-index-1"}
93
+ DETAILED
94
+ %br VIEW
95
+ %td
96
+ .item.living-overlay
97
+ .has-overlayed-item.overlayed-item-3{data:{ target: "#overlayed-item"}}
98
+ .relative
99
+ .thumb-set-bg{style: "background-image: url('#{product_image_url(product.primary_image, :option_a)}')", data: {'grayscale-target': '', 'flipimage-target': ''}}
100
+
101
+ .img-responsive{src: "#{product_image_url(product.primary_image, :option_a)}"}
102
+ .overlayed-item.overlayed-image-3
103
+ %td
104
+ .item.office_land-overlay
105
+ .has-overlayed-item.overlayed-item-4{data:{ target: "#overlayed-item"}}
106
+ .relative
107
+ .thumb-set-bg{style: "background-image: url('#{product_image_url(product.primary_image, :option_a)}')", data: {'grayscale-target': '', 'flipimage-target': ''}}
108
+
109
+ .img-responsive{src: "#{product_image_url(product.primary_image, :option_a)}"}
110
+ .overlayed-item.overlayed-image-4
111
+
112
+ = append_partials('storefront.product_details_alt_images', product: product)