spree_frontend 2.4.10 → 3.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (378) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1 -0
  3. data/Gemfile +6 -0
  4. data/LICENSE +1 -1
  5. data/README.md +39 -10
  6. data/Rakefile +29 -0
  7. data/{vendor → app}/assets/images/flags/ad.png +0 -0
  8. data/{vendor → app}/assets/images/flags/ae.png +0 -0
  9. data/{vendor → app}/assets/images/flags/af.png +0 -0
  10. data/{vendor → app}/assets/images/flags/ag.png +0 -0
  11. data/{vendor → app}/assets/images/flags/ai.png +0 -0
  12. data/{vendor → app}/assets/images/flags/al.png +0 -0
  13. data/{vendor → app}/assets/images/flags/am.png +0 -0
  14. data/{vendor → app}/assets/images/flags/an.png +0 -0
  15. data/{vendor → app}/assets/images/flags/ao.png +0 -0
  16. data/{vendor → app}/assets/images/flags/ar.png +0 -0
  17. data/{vendor → app}/assets/images/flags/as.png +0 -0
  18. data/{vendor → app}/assets/images/flags/at.png +0 -0
  19. data/{vendor → app}/assets/images/flags/au.png +0 -0
  20. data/{vendor → app}/assets/images/flags/aw.png +0 -0
  21. data/{vendor → app}/assets/images/flags/ax.png +0 -0
  22. data/{vendor → app}/assets/images/flags/az.png +0 -0
  23. data/{vendor → app}/assets/images/flags/ba.png +0 -0
  24. data/{vendor → app}/assets/images/flags/bb.png +0 -0
  25. data/{vendor → app}/assets/images/flags/bd.png +0 -0
  26. data/{vendor → app}/assets/images/flags/be.png +0 -0
  27. data/{vendor → app}/assets/images/flags/bf.png +0 -0
  28. data/{vendor → app}/assets/images/flags/bg.png +0 -0
  29. data/{vendor → app}/assets/images/flags/bh.png +0 -0
  30. data/{vendor → app}/assets/images/flags/bi.png +0 -0
  31. data/{vendor → app}/assets/images/flags/bj.png +0 -0
  32. data/{vendor → app}/assets/images/flags/bm.png +0 -0
  33. data/{vendor → app}/assets/images/flags/bn.png +0 -0
  34. data/{vendor → app}/assets/images/flags/bo.png +0 -0
  35. data/{vendor → app}/assets/images/flags/br.png +0 -0
  36. data/{vendor → app}/assets/images/flags/bs.png +0 -0
  37. data/{vendor → app}/assets/images/flags/bt.png +0 -0
  38. data/{vendor → app}/assets/images/flags/bv.png +0 -0
  39. data/{vendor → app}/assets/images/flags/bw.png +0 -0
  40. data/{vendor → app}/assets/images/flags/by.png +0 -0
  41. data/{vendor → app}/assets/images/flags/bz.png +0 -0
  42. data/{vendor → app}/assets/images/flags/ca.png +0 -0
  43. data/{vendor → app}/assets/images/flags/catalonia.png +0 -0
  44. data/{vendor → app}/assets/images/flags/cc.png +0 -0
  45. data/{vendor → app}/assets/images/flags/cd.png +0 -0
  46. data/{vendor → app}/assets/images/flags/cf.png +0 -0
  47. data/{vendor → app}/assets/images/flags/cg.png +0 -0
  48. data/{vendor → app}/assets/images/flags/ch.png +0 -0
  49. data/{vendor → app}/assets/images/flags/ci.png +0 -0
  50. data/{vendor → app}/assets/images/flags/ck.png +0 -0
  51. data/{vendor → app}/assets/images/flags/cl.png +0 -0
  52. data/{vendor → app}/assets/images/flags/cm.png +0 -0
  53. data/{vendor → app}/assets/images/flags/cn.png +0 -0
  54. data/{vendor → app}/assets/images/flags/co.png +0 -0
  55. data/{vendor → app}/assets/images/flags/cr.png +0 -0
  56. data/{vendor → app}/assets/images/flags/cs.png +0 -0
  57. data/{vendor → app}/assets/images/flags/cu.png +0 -0
  58. data/{vendor → app}/assets/images/flags/cv.png +0 -0
  59. data/{vendor → app}/assets/images/flags/cx.png +0 -0
  60. data/{vendor → app}/assets/images/flags/cy.png +0 -0
  61. data/{vendor → app}/assets/images/flags/cz.png +0 -0
  62. data/{vendor → app}/assets/images/flags/de.png +0 -0
  63. data/{vendor → app}/assets/images/flags/dj.png +0 -0
  64. data/{vendor → app}/assets/images/flags/dk.png +0 -0
  65. data/{vendor → app}/assets/images/flags/dm.png +0 -0
  66. data/{vendor → app}/assets/images/flags/do.png +0 -0
  67. data/{vendor → app}/assets/images/flags/dz.png +0 -0
  68. data/{vendor → app}/assets/images/flags/ec.png +0 -0
  69. data/{vendor → app}/assets/images/flags/ee.png +0 -0
  70. data/{vendor → app}/assets/images/flags/eg.png +0 -0
  71. data/{vendor → app}/assets/images/flags/eh.png +0 -0
  72. data/{vendor → app}/assets/images/flags/england.png +0 -0
  73. data/{vendor → app}/assets/images/flags/er.png +0 -0
  74. data/{vendor → app}/assets/images/flags/es.png +0 -0
  75. data/{vendor → app}/assets/images/flags/et.png +0 -0
  76. data/{vendor → app}/assets/images/flags/europeanunion.png +0 -0
  77. data/{vendor → app}/assets/images/flags/fam.png +0 -0
  78. data/{vendor → app}/assets/images/flags/fi.png +0 -0
  79. data/{vendor → app}/assets/images/flags/fj.png +0 -0
  80. data/{vendor → app}/assets/images/flags/fk.png +0 -0
  81. data/{vendor → app}/assets/images/flags/fm.png +0 -0
  82. data/{vendor → app}/assets/images/flags/fo.png +0 -0
  83. data/{vendor → app}/assets/images/flags/fr.png +0 -0
  84. data/{vendor → app}/assets/images/flags/ga.png +0 -0
  85. data/{vendor → app}/assets/images/flags/gb.png +0 -0
  86. data/{vendor → app}/assets/images/flags/gd.png +0 -0
  87. data/{vendor → app}/assets/images/flags/ge.png +0 -0
  88. data/{vendor → app}/assets/images/flags/gf.png +0 -0
  89. data/{vendor → app}/assets/images/flags/gh.png +0 -0
  90. data/{vendor → app}/assets/images/flags/gi.png +0 -0
  91. data/{vendor → app}/assets/images/flags/gl.png +0 -0
  92. data/{vendor → app}/assets/images/flags/gm.png +0 -0
  93. data/{vendor → app}/assets/images/flags/gn.png +0 -0
  94. data/{vendor → app}/assets/images/flags/gp.png +0 -0
  95. data/{vendor → app}/assets/images/flags/gq.png +0 -0
  96. data/{vendor → app}/assets/images/flags/gr.png +0 -0
  97. data/{vendor → app}/assets/images/flags/gs.png +0 -0
  98. data/{vendor → app}/assets/images/flags/gt.png +0 -0
  99. data/{vendor → app}/assets/images/flags/gu.png +0 -0
  100. data/{vendor → app}/assets/images/flags/gw.png +0 -0
  101. data/{vendor → app}/assets/images/flags/gy.png +0 -0
  102. data/{vendor → app}/assets/images/flags/hk.png +0 -0
  103. data/{vendor → app}/assets/images/flags/hm.png +0 -0
  104. data/{vendor → app}/assets/images/flags/hn.png +0 -0
  105. data/{vendor → app}/assets/images/flags/hr.png +0 -0
  106. data/{vendor → app}/assets/images/flags/ht.png +0 -0
  107. data/{vendor → app}/assets/images/flags/hu.png +0 -0
  108. data/{vendor → app}/assets/images/flags/id.png +0 -0
  109. data/{vendor → app}/assets/images/flags/ie.png +0 -0
  110. data/{vendor → app}/assets/images/flags/il.png +0 -0
  111. data/{vendor → app}/assets/images/flags/in.png +0 -0
  112. data/{vendor → app}/assets/images/flags/io.png +0 -0
  113. data/{vendor → app}/assets/images/flags/iq.png +0 -0
  114. data/{vendor → app}/assets/images/flags/ir.png +0 -0
  115. data/{vendor → app}/assets/images/flags/is.png +0 -0
  116. data/{vendor → app}/assets/images/flags/it.png +0 -0
  117. data/{vendor → app}/assets/images/flags/ja.png +0 -0
  118. data/{vendor → app}/assets/images/flags/jm.png +0 -0
  119. data/{vendor → app}/assets/images/flags/jo.png +0 -0
  120. data/{vendor → app}/assets/images/flags/ke.png +0 -0
  121. data/{vendor → app}/assets/images/flags/kg.png +0 -0
  122. data/{vendor → app}/assets/images/flags/kh.png +0 -0
  123. data/{vendor → app}/assets/images/flags/ki.png +0 -0
  124. data/{vendor → app}/assets/images/flags/km.png +0 -0
  125. data/{vendor → app}/assets/images/flags/kn.png +0 -0
  126. data/{vendor → app}/assets/images/flags/kp.png +0 -0
  127. data/{vendor → app}/assets/images/flags/kr.png +0 -0
  128. data/{vendor → app}/assets/images/flags/kw.png +0 -0
  129. data/{vendor → app}/assets/images/flags/ky.png +0 -0
  130. data/{vendor → app}/assets/images/flags/kz.png +0 -0
  131. data/{vendor → app}/assets/images/flags/la.png +0 -0
  132. data/{vendor → app}/assets/images/flags/lb.png +0 -0
  133. data/{vendor → app}/assets/images/flags/lc.png +0 -0
  134. data/{vendor → app}/assets/images/flags/li.png +0 -0
  135. data/{vendor → app}/assets/images/flags/lk.png +0 -0
  136. data/{vendor → app}/assets/images/flags/lr.png +0 -0
  137. data/{vendor → app}/assets/images/flags/ls.png +0 -0
  138. data/{vendor → app}/assets/images/flags/lt.png +0 -0
  139. data/{vendor → app}/assets/images/flags/lu.png +0 -0
  140. data/{vendor → app}/assets/images/flags/lv.png +0 -0
  141. data/{vendor → app}/assets/images/flags/ly.png +0 -0
  142. data/{vendor → app}/assets/images/flags/ma.png +0 -0
  143. data/{vendor → app}/assets/images/flags/mc.png +0 -0
  144. data/{vendor → app}/assets/images/flags/md.png +0 -0
  145. data/{vendor → app}/assets/images/flags/me.png +0 -0
  146. data/{vendor → app}/assets/images/flags/mg.png +0 -0
  147. data/{vendor → app}/assets/images/flags/mh.png +0 -0
  148. data/{vendor → app}/assets/images/flags/mk.png +0 -0
  149. data/{vendor → app}/assets/images/flags/ml.png +0 -0
  150. data/{vendor → app}/assets/images/flags/mm.png +0 -0
  151. data/{vendor → app}/assets/images/flags/mn.png +0 -0
  152. data/{vendor → app}/assets/images/flags/mo.png +0 -0
  153. data/{vendor → app}/assets/images/flags/mp.png +0 -0
  154. data/{vendor → app}/assets/images/flags/mq.png +0 -0
  155. data/{vendor → app}/assets/images/flags/mr.png +0 -0
  156. data/{vendor → app}/assets/images/flags/ms.png +0 -0
  157. data/{vendor → app}/assets/images/flags/mt.png +0 -0
  158. data/{vendor → app}/assets/images/flags/mu.png +0 -0
  159. data/{vendor → app}/assets/images/flags/mv.png +0 -0
  160. data/{vendor → app}/assets/images/flags/mw.png +0 -0
  161. data/{vendor → app}/assets/images/flags/mx.png +0 -0
  162. data/{vendor → app}/assets/images/flags/my.png +0 -0
  163. data/{vendor → app}/assets/images/flags/mz.png +0 -0
  164. data/{vendor → app}/assets/images/flags/na.png +0 -0
  165. data/{vendor → app}/assets/images/flags/nc.png +0 -0
  166. data/{vendor → app}/assets/images/flags/ne.png +0 -0
  167. data/{vendor → app}/assets/images/flags/nf.png +0 -0
  168. data/{vendor → app}/assets/images/flags/ng.png +0 -0
  169. data/{vendor → app}/assets/images/flags/ni.png +0 -0
  170. data/{vendor → app}/assets/images/flags/nl.png +0 -0
  171. data/{vendor → app}/assets/images/flags/no.png +0 -0
  172. data/{vendor → app}/assets/images/flags/np.png +0 -0
  173. data/{vendor → app}/assets/images/flags/nr.png +0 -0
  174. data/{vendor → app}/assets/images/flags/nu.png +0 -0
  175. data/{vendor → app}/assets/images/flags/nz.png +0 -0
  176. data/{vendor → app}/assets/images/flags/om.png +0 -0
  177. data/{vendor → app}/assets/images/flags/pa.png +0 -0
  178. data/{vendor → app}/assets/images/flags/pe.png +0 -0
  179. data/{vendor → app}/assets/images/flags/pf.png +0 -0
  180. data/{vendor → app}/assets/images/flags/pg.png +0 -0
  181. data/{vendor → app}/assets/images/flags/ph.png +0 -0
  182. data/{vendor → app}/assets/images/flags/pk.png +0 -0
  183. data/{vendor → app}/assets/images/flags/pl.png +0 -0
  184. data/{vendor → app}/assets/images/flags/pm.png +0 -0
  185. data/{vendor → app}/assets/images/flags/pn.png +0 -0
  186. data/{vendor → app}/assets/images/flags/pr.png +0 -0
  187. data/{vendor → app}/assets/images/flags/ps.png +0 -0
  188. data/{vendor → app}/assets/images/flags/pt.png +0 -0
  189. data/{vendor → app}/assets/images/flags/pw.png +0 -0
  190. data/{vendor → app}/assets/images/flags/py.png +0 -0
  191. data/{vendor → app}/assets/images/flags/qa.png +0 -0
  192. data/{vendor → app}/assets/images/flags/re.png +0 -0
  193. data/{vendor → app}/assets/images/flags/ro.png +0 -0
  194. data/{vendor → app}/assets/images/flags/rs.png +0 -0
  195. data/{vendor → app}/assets/images/flags/ru.png +0 -0
  196. data/{vendor → app}/assets/images/flags/rw.png +0 -0
  197. data/{vendor → app}/assets/images/flags/sa.png +0 -0
  198. data/{vendor → app}/assets/images/flags/sb.png +0 -0
  199. data/{vendor → app}/assets/images/flags/sc.png +0 -0
  200. data/{vendor → app}/assets/images/flags/scotland.png +0 -0
  201. data/{vendor → app}/assets/images/flags/sd.png +0 -0
  202. data/{vendor → app}/assets/images/flags/se.png +0 -0
  203. data/{vendor → app}/assets/images/flags/sg.png +0 -0
  204. data/{vendor → app}/assets/images/flags/sh.png +0 -0
  205. data/{vendor → app}/assets/images/flags/si.png +0 -0
  206. data/{vendor → app}/assets/images/flags/sj.png +0 -0
  207. data/{vendor → app}/assets/images/flags/sk.png +0 -0
  208. data/{vendor → app}/assets/images/flags/sl.png +0 -0
  209. data/{vendor → app}/assets/images/flags/sm.png +0 -0
  210. data/{vendor → app}/assets/images/flags/sn.png +0 -0
  211. data/{vendor → app}/assets/images/flags/so.png +0 -0
  212. data/{vendor → app}/assets/images/flags/sr.png +0 -0
  213. data/{vendor → app}/assets/images/flags/st.png +0 -0
  214. data/{vendor → app}/assets/images/flags/sv.png +0 -0
  215. data/{vendor → app}/assets/images/flags/sy.png +0 -0
  216. data/{vendor → app}/assets/images/flags/sz.png +0 -0
  217. data/{vendor → app}/assets/images/flags/tc.png +0 -0
  218. data/{vendor → app}/assets/images/flags/td.png +0 -0
  219. data/{vendor → app}/assets/images/flags/tf.png +0 -0
  220. data/{vendor → app}/assets/images/flags/tg.png +0 -0
  221. data/{vendor → app}/assets/images/flags/th.png +0 -0
  222. data/{vendor → app}/assets/images/flags/tj.png +0 -0
  223. data/{vendor → app}/assets/images/flags/tk.png +0 -0
  224. data/{vendor → app}/assets/images/flags/tl.png +0 -0
  225. data/{vendor → app}/assets/images/flags/tm.png +0 -0
  226. data/{vendor → app}/assets/images/flags/tn.png +0 -0
  227. data/{vendor → app}/assets/images/flags/to.png +0 -0
  228. data/{vendor → app}/assets/images/flags/tr.png +0 -0
  229. data/{vendor → app}/assets/images/flags/tt.png +0 -0
  230. data/{vendor → app}/assets/images/flags/tv.png +0 -0
  231. data/{vendor → app}/assets/images/flags/tw.png +0 -0
  232. data/{vendor → app}/assets/images/flags/tz.png +0 -0
  233. data/{vendor → app}/assets/images/flags/ua.png +0 -0
  234. data/{vendor → app}/assets/images/flags/ug.png +0 -0
  235. data/{vendor → app}/assets/images/flags/um.png +0 -0
  236. data/{vendor → app}/assets/images/flags/us.png +0 -0
  237. data/{vendor → app}/assets/images/flags/uy.png +0 -0
  238. data/{vendor → app}/assets/images/flags/uz.png +0 -0
  239. data/{vendor → app}/assets/images/flags/va.png +0 -0
  240. data/{vendor → app}/assets/images/flags/vc.png +0 -0
  241. data/{vendor → app}/assets/images/flags/ve.png +0 -0
  242. data/{vendor → app}/assets/images/flags/vg.png +0 -0
  243. data/{vendor → app}/assets/images/flags/vi.png +0 -0
  244. data/{vendor → app}/assets/images/flags/vn.png +0 -0
  245. data/{vendor → app}/assets/images/flags/vu.png +0 -0
  246. data/{vendor → app}/assets/images/flags/wales.png +0 -0
  247. data/{vendor → app}/assets/images/flags/wf.png +0 -0
  248. data/{vendor → app}/assets/images/flags/ws.png +0 -0
  249. data/{vendor → app}/assets/images/flags/ye.png +0 -0
  250. data/{vendor → app}/assets/images/flags/yt.png +0 -0
  251. data/{vendor → app}/assets/images/flags/za.png +0 -0
  252. data/{vendor → app}/assets/images/flags/zm.png +0 -0
  253. data/{vendor → app}/assets/images/flags/zw.png +0 -0
  254. data/app/assets/images/logo/spree_50.png +0 -0
  255. data/app/assets/images/spree_header.jpg +0 -0
  256. data/app/assets/javascripts/spree/frontend.js +1 -1
  257. data/app/assets/javascripts/spree/frontend/checkout/payment.js.coffee +2 -2
  258. data/app/assets/stylesheets/spree/frontend.css +4 -4
  259. data/app/assets/stylesheets/spree/frontend/_variables.scss +4 -61
  260. data/app/assets/stylesheets/spree/frontend/frontend_bootstrap.css.scss +102 -0
  261. data/app/controllers/spree/checkout_controller.rb +31 -27
  262. data/app/controllers/spree/orders_controller.rb +20 -8
  263. data/app/controllers/spree/store_controller.rb +2 -3
  264. data/app/controllers/spree/taxons_controller.rb +2 -2
  265. data/app/helpers/spree/frontend_helper.rb +93 -0
  266. data/app/helpers/spree/orders_helper.rb +16 -0
  267. data/app/helpers/spree/store_helper.rb +10 -0
  268. data/app/helpers/spree/taxons_helper.rb +19 -0
  269. data/app/models/spree/frontend_configuration.rb +1 -1
  270. data/app/views/kaminari/twitter-bootstrap-3/_first_page.html.erb +13 -0
  271. data/app/views/kaminari/twitter-bootstrap-3/_gap.html.erb +8 -0
  272. data/app/views/kaminari/twitter-bootstrap-3/_last_page.html.erb +13 -0
  273. data/app/views/kaminari/twitter-bootstrap-3/_next_page.html.erb +13 -0
  274. data/app/views/kaminari/twitter-bootstrap-3/_page.html.erb +12 -0
  275. data/app/views/kaminari/twitter-bootstrap-3/_paginator.html.erb +24 -0
  276. data/app/views/kaminari/twitter-bootstrap-3/_prev_page.html.erb +13 -0
  277. data/app/views/spree/address/_form.html.erb +24 -24
  278. data/app/views/spree/checkout/_address.html.erb +33 -22
  279. data/app/views/spree/checkout/_confirm.html.erb +10 -9
  280. data/app/views/spree/checkout/_delivery.html.erb +24 -20
  281. data/app/views/spree/checkout/_payment.html.erb +17 -18
  282. data/app/views/spree/checkout/_summary.html.erb +2 -2
  283. data/app/views/spree/checkout/edit.html.erb +23 -14
  284. data/app/views/spree/checkout/payment/_gateway.html.erb +31 -28
  285. data/app/views/spree/layouts/spree_application.html.erb +6 -12
  286. data/app/views/spree/orders/_adjustments.html.erb +5 -0
  287. data/app/views/spree/orders/_form.html.erb +8 -8
  288. data/app/views/spree/orders/_line_item.html.erb +6 -6
  289. data/app/views/spree/orders/edit.html.erb +14 -16
  290. data/app/views/spree/orders/show.html.erb +9 -4
  291. data/app/views/spree/products/_cart_form.html.erb +15 -11
  292. data/app/views/spree/products/_promotions.html.erb +1 -1
  293. data/app/views/spree/products/_properties.html.erb +2 -2
  294. data/app/views/spree/products/_taxons.html.erb +4 -4
  295. data/app/views/spree/products/_thumbnails.html.erb +3 -3
  296. data/app/views/spree/products/index.html.erb +13 -9
  297. data/app/views/spree/products/show.html.erb +11 -9
  298. data/app/views/spree/shared/_error_messages.html.erb +12 -0
  299. data/app/views/spree/shared/_filters.html.erb +4 -4
  300. data/app/views/spree/shared/_footer.html.erb +10 -6
  301. data/app/views/spree/shared/_google_add_items.js.erb +11 -0
  302. data/app/views/spree/shared/_google_analytics.js.erb +13 -0
  303. data/app/views/spree/shared/_google_checkout.js.erb +10 -0
  304. data/app/views/spree/shared/_google_purchase.js.erb +13 -0
  305. data/app/views/spree/shared/_head.html.erb +1 -1
  306. data/app/views/spree/shared/_header.html.erb +17 -5
  307. data/app/views/spree/shared/_login.html.erb +19 -0
  308. data/app/views/spree/shared/_login_bar.html.erb +6 -0
  309. data/app/views/spree/shared/_main_nav_bar.html.erb +15 -11
  310. data/app/views/spree/shared/_nav_bar.html.erb +3 -2
  311. data/app/views/spree/shared/_order_details.html.erb +30 -31
  312. data/app/views/spree/shared/_products.html.erb +19 -15
  313. data/app/views/spree/shared/_search.html.erb +8 -4
  314. data/app/views/spree/shared/_sidebar.html.erb +1 -1
  315. data/app/views/spree/shared/_taxonomies.html.erb +1 -1
  316. data/app/views/spree/taxons/show.html.erb +1 -1
  317. data/config/initializers/spree.rb +0 -2
  318. data/lib/spree/frontend.rb +5 -4
  319. data/lib/spree/frontend/engine.rb +2 -2
  320. data/script/rails +9 -0
  321. data/spec/controllers/controller_extension_spec.rb +115 -0
  322. data/spec/controllers/controller_helpers_spec.rb +26 -0
  323. data/spec/controllers/spree/checkout_controller_spec.rb +424 -0
  324. data/spec/controllers/spree/checkout_controller_with_views_spec.rb +36 -0
  325. data/spec/controllers/spree/content_controller_spec.rb +12 -0
  326. data/spec/controllers/spree/current_order_tracking_spec.rb +44 -0
  327. data/spec/controllers/spree/home_controller_spec.rb +27 -0
  328. data/spec/controllers/spree/orders_controller_ability_spec.rb +104 -0
  329. data/spec/controllers/spree/orders_controller_spec.rb +134 -0
  330. data/spec/controllers/spree/orders_controller_transitions_spec.rb +31 -0
  331. data/spec/controllers/spree/products_controller_spec.rb +36 -0
  332. data/spec/controllers/spree/taxons_controller_spec.rb +12 -0
  333. data/spec/features/address_spec.rb +93 -0
  334. data/spec/features/automatic_promotion_adjustments_spec.rb +47 -0
  335. data/spec/features/caching/products_spec.rb +55 -0
  336. data/spec/features/caching/taxons_spec.rb +22 -0
  337. data/spec/features/cart_spec.rb +84 -0
  338. data/spec/features/checkout_spec.rb +515 -0
  339. data/spec/features/checkout_unshippable_spec.rb +34 -0
  340. data/spec/features/coupon_code_spec.rb +87 -0
  341. data/spec/features/currency_spec.rb +18 -0
  342. data/spec/features/free_shipping_promotions_spec.rb +59 -0
  343. data/spec/features/locale_spec.rb +60 -0
  344. data/spec/features/order_spec.rb +74 -0
  345. data/spec/features/page_promotions_spec.rb +36 -0
  346. data/spec/features/products_spec.rb +262 -0
  347. data/spec/features/taxons_spec.rb +147 -0
  348. data/spec/features/template_rendering_spec.rb +19 -0
  349. data/spec/fixtures/thinking-cat.jpg +0 -0
  350. data/spec/helpers/frontend_helper_spec.rb +41 -0
  351. data/spec/helpers/order_helper_spec.rb +12 -0
  352. data/spec/helpers/taxons_helper_spec.rb +17 -0
  353. data/spec/spec_helper.rb +115 -0
  354. data/spec/support/shared_contexts/checkout_setup.rb +9 -0
  355. data/spec/support/shared_contexts/custom_products.rb +25 -0
  356. data/spec/support/shared_contexts/product_prototypes.rb +30 -0
  357. data/spec/views/spree/checkout/_summary_spec.rb +11 -0
  358. data/spree_frontend.gemspec +30 -0
  359. metadata +392 -282
  360. data/app/assets/images/icons/add-to-cart.png +0 -0
  361. data/app/assets/images/icons/checkout.png +0 -0
  362. data/app/assets/images/icons/delete.png +0 -0
  363. data/app/assets/images/icons/update.png +0 -0
  364. data/app/assets/images/spinner.gif +0 -0
  365. data/app/assets/images/spree/frontend/cart.png +0 -0
  366. data/app/assets/images/spree/frontend/select_arrow.gif +0 -0
  367. data/app/assets/stylesheets/spree/frontend/screen.css.scss +0 -1321
  368. data/app/views/spree/shared/_google_analytics.html.erb +0 -40
  369. data/config/initializers/assets.rb +0 -1
  370. data/config/initializers/check_for_orphaned_preferences.rb +0 -9
  371. data/config/initializers/deprecation_checker.rb +0 -7
  372. data/config/initializers/rails_5868.rb +0 -8
  373. data/lib/spree/frontend/preference_rescue.rb +0 -25
  374. data/vendor/assets/images/datepicker/cal.gif +0 -0
  375. data/vendor/assets/images/jquery.formalize/button.png +0 -0
  376. data/vendor/assets/images/jquery.formalize/select_arrow.gif +0 -0
  377. data/vendor/assets/javascripts/jquery.formalize.min.js +0 -1
  378. data/vendor/assets/stylesheets/jquery.formalize.css.erb +0 -363
@@ -1,12 +1,13 @@
1
- <fieldset id="order_details" data-hook>
2
- <div class="clear"></div>
3
- <legend align="center"><%= Spree.t(:confirm) %></legend>
4
- <%= render :partial => 'spree/shared/order_details', :locals => { :order => @order } %>
5
- </fieldset>
6
-
7
- <br />
1
+ <div class="panel panel-default" id="order_details" data-hook>
2
+ <div class="panel-heading">
3
+ <h3 class="panel-title"><%= Spree.t(:confirm) %></h3>
4
+ </div>
5
+ <div class="panel-body">
6
+ <%= render :partial => 'spree/shared/order_details', :locals => { :order => @order } %>
7
+ </div>
8
+ </div>
8
9
 
9
- <div class="form-buttons" data-hook="buttons">
10
- <%= submit_tag Spree.t(:place_order), :class => 'continue button primary' %>
10
+ <div class="well text-right form-buttons" data-hook="buttons">
11
+ <%= submit_tag Spree.t(:place_order), :class => 'btn btn-lg btn-success' %>
11
12
  <script>Spree.disableSaveOnClick();</script>
12
13
  </div>
@@ -1,16 +1,18 @@
1
- <fieldset id='shipping_method' data-hook>
2
- <legend align="center"><%= Spree.t(:delivery) %></legend>
3
- <div class="inner" data-hook="shipping_method_inner">
1
+ <div class="panel panel-default" id='shipping_method' data-hook>
2
+ <div class="panel-heading">
3
+ <h3 class="panel-title"><%= Spree.t(:delivery) %></h3>
4
+ </div>
5
+ <div class="panel-body" data-hook="shipping_method_inner">
4
6
  <div id="methods">
5
7
  <%= form.fields_for :shipments do |ship_form| %>
6
8
 
7
9
  <div class="shipment">
8
- <h3 class="stock-location" data-hook="stock-location">
10
+ <h4 class="stock-location" data-hook="stock-location">
9
11
  <%= Spree.t(:package_from) %>
10
12
  <strong class="stock-location-name" data-hook="stock-location-name"><%= ship_form.object.stock_location.name %></strong>
11
- </h3>
13
+ </h4>
12
14
 
13
- <table class="stock-contents" data-hook="stock-contents">
15
+ <table class="table stock-contents" data-hook="stock-contents">
14
16
  <colgroup>
15
17
  <col style="width: 10%;" />
16
18
  <col style="width: 60%;" />
@@ -18,10 +20,12 @@
18
20
  <col style="width: 20%;" />
19
21
  </colgroup>
20
22
  <thead>
21
- <th></th>
22
- <th align='left'><%= Spree.t(:item) %></th>
23
- <th><%= Spree.t(:qty) %></th>
24
- <th><%= Spree.t(:price) %></th>
23
+ <tr class="active">
24
+ <th></th>
25
+ <th align='left'><%= Spree.t(:item) %></th>
26
+ <th><%= Spree.t(:qty) %></th>
27
+ <th><%= Spree.t(:price) %></th>
28
+ </tr>
25
29
  </thead>
26
30
  <tbody>
27
31
  <% ship_form.object.manifest.each do |item| %>
@@ -35,14 +39,14 @@
35
39
  </tbody>
36
40
  </table>
37
41
 
38
- <h5 class="stock-shipping-method-title"><%= Spree.t(:shipping_method) %></h5>
39
- <ul class="field radios shipping-methods">
42
+ <h4 class="stock-shipping-method-title"><%= Spree.t(:shipping_method) %></h4>
43
+ <ul class="list-group shipping-methods">
40
44
  <% ship_form.object.shipping_rates.each do |rate| %>
41
- <li class="shipping-method">
45
+ <li class="list-group-item shipping-method">
42
46
  <label>
43
47
  <%= ship_form.radio_button :selected_shipping_rate_id, rate.id %>
44
48
  <span class="rate-name"><%= rate.name %></span>
45
- <span class="rate-cost"><%= rate.display_cost %></span>
49
+ <span class="badge rate-cost"><%= rate.display_cost %></span>
46
50
  </label>
47
51
  </li>
48
52
  <% end %>
@@ -56,7 +60,7 @@
56
60
  <h3 class="stock-location" data-hook="stock-location">
57
61
  <%= Spree.t(:unshippable_items) %>
58
62
  </h3>
59
- <table class="stock-contents" data-hook="stock-missing">
63
+ <table class="table stock-contents" data-hook="stock-missing">
60
64
  <colgroup>
61
65
  <col style="width: 10%;" />
62
66
  <col style="width: 60%;" />
@@ -86,15 +90,15 @@
86
90
  </div>
87
91
  <% if Spree::Config[:shipping_instructions] %>
88
92
  <p id="minstrs" data-hook>
89
- <%= form.label :special_instructions, Spree.t(:shipping_instructions) %><br />
90
- <%= form.text_area :special_instructions, :cols => 40, :rows => 7 %>
93
+ <h4><%= Spree.t(:shipping_instructions) %></h4>
94
+ <%= form.text_area :special_instructions, :cols => 40, :rows => 4, :class => "form-control" %>
91
95
  </p>
92
96
  <% end %>
93
97
  </div>
94
- </fieldset>
98
+ </div>
95
99
 
96
100
  <br />
97
101
 
98
- <div class="form-buttons" data-hook="buttons">
99
- <%= submit_tag Spree.t(:save_and_continue), :class => 'continue button primary' %>
102
+ <div class="well text-right form-buttons" data-hook="buttons">
103
+ <%= submit_tag Spree.t(:save_and_continue), :class => 'btn btn-lg btn-success' %>
100
104
  </div>
@@ -1,6 +1,8 @@
1
- <fieldset id="payment" data-hook>
2
- <legend align="center"><%= Spree.t(:payment_information) %></legend>
3
- <div data-hook="checkout_payment_step">
1
+ <div class="panel panel-default" id="payment" data-hook>
2
+ <div class="panel-heading">
3
+ <h3 class="panel-title"><%= Spree.t(:payment_information) %></h3>
4
+ </div>
5
+ <div class="panel-body" data-hook="checkout_payment_step">
4
6
 
5
7
  <% if @payment_sources.present? %>
6
8
  <div class="card_options">
@@ -16,15 +18,14 @@
16
18
  </div>
17
19
 
18
20
  <div id="existing_cards">
19
- <p class="field" data-hook="existing_cards">
21
+ <p class="form-group" data-hook="existing_cards">
20
22
  <table class="existing-credit-card-list">
21
23
  <tbody>
22
24
  <% @payment_sources.each do |card| %>
23
25
  <tr id="<%= dom_id(card,'spree')%>" class="<%= cycle('even', 'odd') %>">
24
26
  <td><%= card.name %></td>
25
27
  <td><%= card.display_number %></td>
26
- <td><%= card.month %></td>
27
- <td><%= card.year %></td>
28
+ <td><%= card.month %> / <%= card.year %></td>
28
29
  <td>
29
30
  <%= radio_button_tag "order[existing_card]", card.id, (card == @payment_sources.first), { class: "existing-cc-radio" } %>
30
31
  </td>
@@ -36,18 +37,18 @@
36
37
  </div>
37
38
  <% end %>
38
39
 
39
- <div id="payment-method-fields" data-hook>
40
+ <ul class="list-group" id="payment-method-fields" data-hook>
40
41
  <% @order.available_payment_methods.each do |method| %>
41
- <p>
42
+ <li class="list-group-item">
42
43
  <label>
43
44
  <%= radio_button_tag "order[payments_attributes][][payment_method_id]", method.id, method == @order.available_payment_methods.first %>
44
45
  <%= Spree.t(method.name, :scope => :payment_methods, :default => method.name) %>
45
46
  </label>
46
- </p>
47
+ </li>
47
48
  <% end %>
48
- </div>
49
+ </ul>
49
50
 
50
- <ul id="payment-methods" data-hook>
51
+ <ul class="nav" id="payment-methods" data-hook>
51
52
  <% @order.available_payment_methods.each do |method| %>
52
53
  <li id="payment_method_<%= method.id %>" class="<%= 'last' if method == @order.available_payment_methods.last %>" data-hook>
53
54
  <fieldset>
@@ -56,17 +57,15 @@
56
57
  </li>
57
58
  <% end %>
58
59
  </ul>
59
- <br style="clear:both;" />
60
+
60
61
  <p class='field' data-hook='coupon_code'>
61
62
  <%= form.label :coupon_code %><br />
62
- <%= form.text_field :coupon_code %>
63
+ <%= form.text_field :coupon_code, :class => 'form-control' %>
63
64
  </p>
64
65
  </div>
65
- </fieldset>
66
-
67
- <br class="space" />
66
+ </div>
68
67
 
69
- <div class="form-buttons" data-hook="buttons">
70
- <%= submit_tag Spree.t(:save_and_continue), :class => 'continue button primary' %>
68
+ <div class="well text-right form-buttons" data-hook="buttons">
69
+ <%= submit_tag Spree.t(:save_and_continue), class: 'btn btn-lg btn-success primary' %>
71
70
  <script>Spree.disableSaveOnClick();</script>
72
71
  </div>
@@ -1,6 +1,6 @@
1
1
  <h3><%= Spree.t(:order_summary) %></h3>
2
2
 
3
- <table data-hook="order_summary">
3
+ <table class="table" data-hook="order_summary">
4
4
  <tbody>
5
5
  <tr data-hook="item_total">
6
6
  <td><strong><%= Spree.t(:item_total) %>:</strong></td>
@@ -59,7 +59,7 @@
59
59
 
60
60
  <tr data-hook="order_total">
61
61
  <td><strong><%= Spree.t(:order_total) %>:</strong></td>
62
- <td><strong><span id='summary-order-total'><%= order.display_total.to_html %></span></strong></td>
62
+ <td><strong><span id='summary-order-total' class="lead text-primary"><%= order.display_total.to_html %></span></strong></td>
63
63
  </tr>
64
64
  </tbody>
65
65
  </table>
@@ -1,35 +1,44 @@
1
+ <% content_for :google_analytics do %>
2
+ <%= render partial: 'spree/shared/google_checkout.js', locals: { order: @order, step_number: (@order.checkout_steps.index(@order.state) + 1) } %>
3
+ <% end %>
1
4
  <div id="checkout" data-hook>
2
- <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @order } %>
5
+ <%= render partial: 'spree/shared/error_messages', locals: { target: @order } %>
3
6
 
4
7
  <div class="row" data-hook="checkout_header">
5
- <h1 class="columns three alpha" data-hook="checkout_title"><%= Spree.t(:checkout) %></h1>
6
- <div class="columns thirteen omega" data-hook="checkout_progress"><%= checkout_progress %></div>
8
+ <div class="col-sm-3">
9
+ <h1 data-hook="checkout_title"><%= Spree.t(:checkout) %></h1>
10
+ </div>
11
+ <div class="col-sm-9" data-hook="checkout_progress"><%= checkout_progress %></div>
7
12
  </div>
8
13
 
9
14
  <div class="row" data-hook="checkout_content">
10
- <div class="columns <%= if @order.state != 'confirm' then 'alpha twelve' else 'alpha omega sixteen' end %>" data-hook="checkout_form_wrapper">
11
- <%= form_for @order, :url => update_checkout_path(@order.state), :html => { :id => "checkout_form_#{@order.state}" } do |form| %>
15
+ <div class="<%= if @order.state != 'confirm' then 'col-md-9' else 'col-md-12' end %>" data-hook="checkout_form_wrapper">
16
+ <%= form_for @order, url: update_checkout_path(@order.state), html: { id: "checkout_form_#{@order.state}" } do |form| %>
12
17
  <% if @order.state == 'address' || !@order.email? %>
13
- <p class="field" style='clear: both'>
14
- <%= form.label :email %><br />
15
- <%= form.text_field :email %>
16
- </p>
18
+ <div class="panel panel-default">
19
+ <div class="panel-body">
20
+ <div class="form-group">
21
+ <%= form.label :email %>
22
+ <%= form.text_field :email, class: 'form-control' %>
23
+ </div>
24
+ </div>
25
+ </div>
17
26
  <% end %>
18
27
  <%= form.hidden_field :state_lock_version %>
19
- <%= render @order.state, :form => form %>
28
+ <%= render @order.state, form: form %>
20
29
  <% end %>
21
30
  </div>
22
31
  <% if @order.state != 'confirm' %>
23
- <div id="checkout-summary" data-hook="checkout_summary_box" class="columns omega four">
24
- <%= render :partial => 'summary', :locals => { :order => @order } %>
32
+ <div id="checkout-summary" data-hook="checkout_summary_box" class="col-md-3">
33
+ <%= render partial: 'summary', locals: { order: @order } %>
25
34
  </div>
26
35
  <% end %>
27
36
  </div>
28
37
  </div>
29
38
 
30
39
  <script>
31
- Spree.current_order_id = "<%= @order.number %>"
32
- Spree.current_order_token = "<%= @order.guest_token %>"
40
+ Spree.current_order_id = "<%= @order.number %>"
41
+ Spree.current_order_token = "<%= @order.guest_token %>"
33
42
  </script>
34
43
 
35
44
  <% if I18n.locale != :en %>
@@ -1,32 +1,35 @@
1
- <%= image_tag 'credit_cards/credit_card.gif', :id => 'credit-card-image' %>
2
- <% param_prefix = "payment_source[#{payment_method.id}]" %>
1
+ <div class="well clearfix">
2
+ <%= image_tag 'credit_cards/credit_card.gif', :id => 'credit-card-image', :class => 'pull-right', :width => '170', :height => '28' %>
3
+ <% param_prefix = "payment_source[#{payment_method.id}]" %>
3
4
 
4
- <p class="field">
5
- <%= label_tag "name_on_card_#{payment_method.id}", Spree.t(:name_on_card) %><span class="required">*</span><br />
6
- <%= text_field_tag "#{param_prefix}[name]", "#{@order.billing_firstname} #{@order.billing_lastname}", { id: "name_on_card_#{payment_method.id}"} %>
7
- </p>
5
+ <p class="field">
6
+ <%= label_tag "name_on_card_#{payment_method.id}", Spree.t(:name_on_card) %><span class="required">*</span><br />
7
+ <%= text_field_tag "#{param_prefix}[name]", "#{@order.billing_firstname} #{@order.billing_lastname}", { id: "name_on_card_#{payment_method.id}", :class => 'form-control required'} %>
8
+ </p>
8
9
 
9
- <p class="field" data-hook="card_number">
10
- <%= label_tag "card_number", Spree.t(:card_number) %><span class="required">*</span><br />
11
- <% options_hash = Rails.env.production? ? {:autocomplete => 'off'} : {} %>
12
- <%= text_field_tag "#{param_prefix}[number]", '', options_hash.merge(:id => 'card_number', :class => 'required cardNumber', :size => 19, :maxlength => 19, :autocomplete => "off") %>
13
- &nbsp;
14
- <span id="card_type" style="display:none;">
15
- ( <span id="looks_like" ><%= Spree.t(:card_type_is) %> <span id="type"></span></span>
16
- <span id="unrecognized"><%= Spree.t(:unrecognized_card_type) %></span>
17
- )
18
- </span>
19
- </p>
10
+ <p class="field" data-hook="card_number">
11
+ <%= label_tag "card_number", Spree.t(:card_number) %><span class="required">*</span><br />
12
+ <% options_hash = Rails.env.production? ? {:autocomplete => 'off'} : {} %>
13
+ <%= text_field_tag "#{param_prefix}[number]", '', options_hash.merge(:id => 'card_number', :class => 'form-control required cardNumber', :size => 19, :maxlength => 19, :autocomplete => "off") %>
14
+ &nbsp;
15
+ <span id="card_type" style="display:none;">
16
+ ( <span id="looks_like" ><%= Spree.t(:card_type_is) %> <span id="type"></span></span>
17
+ <span id="unrecognized"><%= Spree.t(:unrecognized_card_type) %></span>
18
+ )
19
+ </span>
20
+ </p>
21
+ <div class="row">
22
+ <div class="col-md-8 field" data-hook="card_expiration">
23
+ <%= label_tag "card_expiry", Spree.t(:expiration) %><span class="required">*</span><br />
24
+ <%= text_field_tag "#{param_prefix}[expiry]", '', :id => 'card_expiry', :class => "form-control required cardExpiry", :placeholder => "MM / YY" %>
25
+ </div>
26
+ <div class="col-md-4 field" data-hook="card_code">
27
+ <%= label_tag "card_code", Spree.t(:card_code) %><span class="required">*</span><br />
28
+ <%= text_field_tag "#{param_prefix}[verification_value]", '', options_hash.merge(:id => 'card_code', :class => 'form-control required cardCode', :size => 5) %>
29
+ <%= link_to "(#{Spree.t(:what_is_this)})", spree.content_path('cvv'), :target => '_blank', "data-hook" => "cvv_link", :id => "cvv_link" %>
30
+ </div>
31
+ </div>
20
32
 
21
- <p class="field" data-hook="card_expiration">
22
- <%= label_tag "card_expiry", Spree.t(:expiration) %><span class="required">*</span><br />
23
- <%= text_field_tag "#{param_prefix}[expiry]", '', :id => 'card_expiry', :class => "required cardExpiry", :placeholder => "MM / YY" %>
24
- </p>
33
+ <%= hidden_field_tag "#{param_prefix}[cc_type]", '', :id => "cc_type", :class => 'ccType' %>
25
34
 
26
- <p class="field" data-hook="card_code">
27
- <%= label_tag "card_code", Spree.t(:card_code) %><span class="required">*</span><br />
28
- <%= text_field_tag "#{param_prefix}[verification_value]", '', options_hash.merge(:id => 'card_code', :class => 'required cardCode', :size => 5) %>
29
- <%= link_to "(#{Spree.t(:what_is_this)})", spree.content_path('cvv'), :target => '_blank', "data-hook" => "cvv_link", :id => "cvv_link" %>
30
- </p>
31
-
32
- <%= hidden_field_tag "#{param_prefix}[cc_type]", '', :id => "cc_type", :class => 'ccType' %>
35
+ </div>
@@ -5,33 +5,27 @@
5
5
  <!--[if IE 9 ]> <html class="ie ie9" lang="<%= I18n.locale %>"> <![endif]-->
6
6
  <!--[if gt IE 9]><!--><html lang="<%= I18n.locale %>"><!--<![endif]-->
7
7
  <head data-hook="inside_head">
8
- <%= render :partial => 'spree/shared/head' %>
8
+ <%= render partial: 'spree/shared/head' %>
9
9
  </head>
10
10
  <body class="<%= body_class %>" id="<%= @body_id || 'default' %>" data-hook="body">
11
+ <%= render partial: 'spree/shared/google_analytics.js' %>
12
+ <%= render partial: 'spree/shared/header' %>
11
13
 
12
14
  <div class="container">
13
15
 
14
- <%= render :partial => 'spree/shared/header' %>
15
-
16
- <div id="wrapper" class="row" data-hook>
16
+ <div class="row" data-hook>
17
17
 
18
18
  <%= breadcrumbs(@taxon) %>
19
19
 
20
- <%= render :partial => 'spree/shared/sidebar' if content_for? :sidebar %>
20
+ <%= render partial: 'spree/shared/sidebar' if content_for? :sidebar %>
21
21
 
22
- <div id="content" class="columns <%= !content_for?(:sidebar) ? "sixteen" : "twelve omega" %>" data-hook>
22
+ <div id="content" class="<%= !content_for?(:sidebar) ? "col-sm-12" : "col-sm-8 col-md-9" %>" data-hook>
23
23
  <%= flash_messages %>
24
24
  <%= yield %>
25
25
  </div>
26
26
 
27
27
  <%= yield :templates %>
28
-
29
28
  </div>
30
-
31
- <%= render :partial => 'spree/shared/footer' %>
32
-
33
29
  </div>
34
-
35
- <%= render :partial => 'spree/shared/google_analytics' %>
36
30
  </body>
37
31
  </html>
@@ -1,3 +1,8 @@
1
+ <thead>
2
+ <tr data-hook="cart_adjustments_headers">
3
+ <th class="cart-adjustment-header" colspan="6"><%= Spree.t(:order_adjustments) %></th>
4
+ </tr>
5
+ </thead>
1
6
  <tbody id="cart_adjustments" data-hook>
2
7
  <% if @order.line_item_adjustments.exists? %>
3
8
  <% @order.line_item_adjustments.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
@@ -1,7 +1,7 @@
1
- <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @order } %>
2
- <table id="cart-detail" data-hook>
1
+ <%= render partial: 'spree/shared/error_messages', locals: { target: @order } %>
2
+ <table class="table" id="cart-detail" data-hook>
3
3
  <thead>
4
- <tr data-hook="cart_items_headers">
4
+ <tr class="active" data-hook="cart_items_headers">
5
5
  <th class="cart-item-description-header" colspan="2"><%= Spree.t(:item) %></th>
6
6
  <th class="cart-item-price-header"><%= Spree.t(:price) %></th>
7
7
  <th class="cart-item-quantity-header"><%= Spree.t(:qty) %></th>
@@ -10,19 +10,19 @@
10
10
  </tr>
11
11
  </thead>
12
12
  <tbody id="line_items" data-hook>
13
- <%= render partial: 'spree/orders/line_item', collection: order_form.object.line_items, locals: {order_form: order_form} %>
13
+ <%= render partial: 'spree/orders/line_item', collection: order_form.object.line_items, locals: { order_form: order_form } %>
14
14
  </tbody>
15
15
  <% if @order.adjustments.nonzero.exists? || @order.line_item_adjustments.nonzero.exists? || @order.shipment_adjustments.nonzero.exists? || @order.shipments.any? %>
16
16
  <tr class="cart-subtotal">
17
- <td colspan="4" align='right'><h5><%= Spree.t(:cart_subtotal, :count => @order.line_items.sum(:quantity)) %></h5></th>
17
+ <td colspan="4" align='right'><h5><%= Spree.t(:cart_subtotal, count: @order.line_items.sum(:quantity)) %></h5></td>
18
18
  <td colspan><h5><%= order_form.object.display_item_total %></h5></td>
19
19
  <td></td>
20
20
  </tr>
21
21
  <%= render "spree/orders/adjustments" %>
22
22
  <% end %>
23
- <tr class="cart-total">
24
- <td colspan="4" align='right'><h5><%= Spree.t(:total) %></h5></th>
25
- <td colspan><h5><%= order_form.object.display_total %></h5></td>
23
+ <tr class="warning cart-total">
24
+ <td colspan="4" align='right'><h5><%= Spree.t(:total) %></h5></td>
25
+ <td class="lead" colspan><%= order_form.object.display_total %></td>
26
26
  <td></td>
27
27
  </tr>
28
28
  </table>
@@ -1,6 +1,6 @@
1
1
  <% variant = line_item.variant -%>
2
2
  <%= order_form.fields_for :line_items, line_item do |item_form| -%>
3
- <tr class="<%= cycle('', 'alt') %> line-item">
3
+ <tr class="line-item">
4
4
  <td class="cart-item-image" data-hook="cart_item_image">
5
5
  <% if variant.images.length == 0 %>
6
6
  <%= link_to small_image(variant.product), variant.product %>
@@ -20,17 +20,17 @@
20
20
  <%= line_item_description_text(line_item.description) %>
21
21
  </span>
22
22
  </td>
23
- <td class="cart-item-price" data-hook="cart_item_price">
23
+ <td class="lead text-primary cart-item-price" data-hook="cart_item_price">
24
24
  <%= line_item.single_money.to_html %>
25
25
  </td>
26
- <td class="cart-item-quantity" data-hook="cart_item_quantity">
27
- <%= item_form.number_field :quantity, :min => 0, :class => "line_item_quantity", :size => 5 %>
26
+ <td class="cart-item-quantity" data-hook="cart_item_quantity" valign="center">
27
+ <%= item_form.number_field :quantity, min: 0, class: "form-control line_item_quantity", size: 5 %>
28
28
  </td>
29
- <td class="cart-item-total" data-hook="cart_item_total">
29
+ <td class="lead text-primary cart-item-total" data-hook="cart_item_total">
30
30
  <%= line_item.display_amount.to_html unless line_item.quantity.nil? %>
31
31
  </td>
32
32
  <td class="cart-item-delete" data-hook="cart_item_delete">
33
- <%= link_to image_tag('icons/delete.png'), '#', :class => 'delete', :id => "delete_#{dom_id(line_item)}" %>
33
+ <%= link_to content_tag(:span, '', class: 'glyphicon glyphicon-minus-sign'), '#', class: 'delete', id: "delete_#{dom_id(line_item)}" %>
34
34
  </td>
35
35
  </tr>
36
36
  <% end -%>
@@ -5,43 +5,41 @@
5
5
  <% if @order.line_items.empty? %>
6
6
 
7
7
  <div data-hook="empty_cart">
8
- <p><%= Spree.t(:your_cart_is_empty) %></p>
9
- <p><%= link_to Spree.t(:continue_shopping), products_path, :class => 'button continue' %></p>
8
+ <div class="alert alert-info"><%= Spree.t(:your_cart_is_empty) %></div>
9
+ <p><%= link_to Spree.t(:continue_shopping), products_path, class: 'btn btn-default' %></p>
10
10
  </div>
11
11
 
12
12
  <% else %>
13
13
 
14
14
  <div data-hook="outside_cart_form">
15
- <%= form_for @order, :url => update_cart_path, :html => {:id => 'update-cart'} do |order_form| %>
15
+ <%= form_for @order, url: update_cart_path, html: { id: 'update-cart' } do |order_form| %>
16
16
  <div data-hook="inside_cart_form">
17
17
 
18
- <div data-hook="cart_items">
19
- <%= render :partial => 'form', :locals => { :order_form => order_form } %>
18
+ <div data-hook="cart_items" class="table-responsive">
19
+ <%= render partial: 'form', locals: { order_form: order_form } %>
20
20
  </div>
21
21
 
22
- <div class="links columns sixteen alpha omega" data-hook="cart_buttons">
23
- <%= order_form.text_field :coupon_code, :size => 10, :placeholder => Spree.t(:coupon_code) %>
24
- <%= button_tag :class => 'primary', :id => 'update-button' do %>
22
+ <div class="links col-md-6 navbar-form pull-right text-right" data-hook="cart_buttons">
23
+ <div class="form-group">
24
+ <%= button_tag class: 'btn btn-primary', id: 'update-button' do %>
25
25
  <%= Spree.t(:update) %>
26
26
  <% end %>
27
- <%= button_tag :class => 'button checkout primary', :id => 'checkout-link', :name => 'checkout' do %>
27
+ <%= button_tag class: 'btn btn-lg btn-success', id: 'checkout-link', name: 'checkout' do %>
28
28
  <%= Spree.t(:checkout) %>
29
29
  <% end %>
30
30
  </div>
31
-
32
31
  </div>
33
32
  <% end %>
34
33
  </div>
35
34
 
36
- <div id="empty-cart" data-hook>
37
- <%= form_tag empty_cart_path, :method => :put do %>
35
+ <div id="empty-cart" class="col-md-6 pull-left" data-hook>
36
+ <%= form_tag empty_cart_path, method: :put do %>
38
37
  <p id="clear_cart_link" data-hook>
39
- <%= submit_tag Spree.t(:empty_cart), :class => 'button gray' %>
40
- <%= Spree.t(:or) %>
41
- <%= link_to Spree.t(:continue_shopping), products_path, :class => 'continue button gray' %>
38
+ <%= submit_tag Spree.t(:empty_cart), class: 'btn btn-default' %>
39
+ <%= Spree.t(:or) %>
40
+ <%= link_to Spree.t(:continue_shopping), products_path, class: 'continue' %>
42
41
  </p>
43
42
  <% end %>
44
43
  </div>
45
-
46
44
  <% end %>
47
45
  </div>