kylekthompson-shoppe 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (239) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +55 -0
  4. data/Rakefile +36 -0
  5. data/app/assets/images/shoppe/chosen-sprite.png +0 -0
  6. data/app/assets/images/shoppe/chosen-sprite@2x.png +0 -0
  7. data/app/assets/images/shoppe/document.svg +1 -0
  8. data/app/assets/images/shoppe/icons/bag.svg +1 -0
  9. data/app/assets/images/shoppe/icons/balance.svg +1 -0
  10. data/app/assets/images/shoppe/icons/box.svg +1 -0
  11. data/app/assets/images/shoppe/icons/building.svg +1 -0
  12. data/app/assets/images/shoppe/icons/chart.svg +1 -0
  13. data/app/assets/images/shoppe/icons/chat.svg +1 -0
  14. data/app/assets/images/shoppe/icons/checkbox.svg +1 -0
  15. data/app/assets/images/shoppe/icons/checkbox2.svg +1 -0
  16. data/app/assets/images/shoppe/icons/cloud.svg +1 -0
  17. data/app/assets/images/shoppe/icons/cone.svg +1 -0
  18. data/app/assets/images/shoppe/icons/credit_card.svg +1 -0
  19. data/app/assets/images/shoppe/icons/currency.svg +1 -0
  20. data/app/assets/images/shoppe/icons/edit.svg +14 -0
  21. data/app/assets/images/shoppe/icons/flowchart.svg +1 -0
  22. data/app/assets/images/shoppe/icons/gift.svg +1 -0
  23. data/app/assets/images/shoppe/icons/globe.svg +1 -0
  24. data/app/assets/images/shoppe/icons/id.svg +1 -0
  25. data/app/assets/images/shoppe/icons/id2.svg +1 -0
  26. data/app/assets/images/shoppe/icons/locked.svg +1 -0
  27. data/app/assets/images/shoppe/icons/report.svg +1 -0
  28. data/app/assets/images/shoppe/icons/search.svg +1 -0
  29. data/app/assets/images/shoppe/icons/support.svg +1 -0
  30. data/app/assets/images/shoppe/icons/tags.svg +1 -0
  31. data/app/assets/images/shoppe/icons/toolbox.svg +1 -0
  32. data/app/assets/images/shoppe/icons/unlocked.svg +1 -0
  33. data/app/assets/images/shoppe/icons/wallet.svg +1 -0
  34. data/app/assets/images/shoppe/logo.svg +47 -0
  35. data/app/assets/images/shoppe/move.svg +1 -0
  36. data/app/assets/images/shoppe/shoppe.svg +25 -0
  37. data/app/assets/images/shoppe/square.svg +9 -0
  38. data/app/assets/images/shoppe/statuses/accepted.svg +14 -0
  39. data/app/assets/images/shoppe/statuses/paid.svg +16 -0
  40. data/app/assets/images/shoppe/statuses/received.svg +15 -0
  41. data/app/assets/images/shoppe/statuses/rejected.svg +14 -0
  42. data/app/assets/images/shoppe/statuses/shipped.svg +14 -0
  43. data/app/assets/images/shoppe/table-tear-off.png +0 -0
  44. data/app/assets/javascripts/shoppe/application.coffee +123 -0
  45. data/app/assets/javascripts/shoppe/chosen.jquery.js +1166 -0
  46. data/app/assets/javascripts/shoppe/jquery_ui.js +6 -0
  47. data/app/assets/javascripts/shoppe/mousetrap.js +9 -0
  48. data/app/assets/javascripts/shoppe/order_form.coffee +47 -0
  49. data/app/assets/stylesheets/shoppe/application.scss +601 -0
  50. data/app/assets/stylesheets/shoppe/chosen.scss +424 -0
  51. data/app/assets/stylesheets/shoppe/dialog.scss +25 -0
  52. data/app/assets/stylesheets/shoppe/elements.scss +79 -0
  53. data/app/assets/stylesheets/shoppe/printable.scss +67 -0
  54. data/app/assets/stylesheets/shoppe/reset.scss +93 -0
  55. data/app/assets/stylesheets/shoppe/sub.scss +106 -0
  56. data/app/assets/stylesheets/shoppe/variables.scss +1 -0
  57. data/app/controllers/shoppe/addresses_controller.rb +47 -0
  58. data/app/controllers/shoppe/application_controller.rb +46 -0
  59. data/app/controllers/shoppe/attachments_controller.rb +14 -0
  60. data/app/controllers/shoppe/countries_controller.rb +47 -0
  61. data/app/controllers/shoppe/customers_controller.rb +55 -0
  62. data/app/controllers/shoppe/dashboard_controller.rb +9 -0
  63. data/app/controllers/shoppe/delivery_service_prices_controller.rb +45 -0
  64. data/app/controllers/shoppe/delivery_services_controller.rb +47 -0
  65. data/app/controllers/shoppe/orders_controller.rb +119 -0
  66. data/app/controllers/shoppe/payments_controller.rb +33 -0
  67. data/app/controllers/shoppe/product_categories_controller.rb +47 -0
  68. data/app/controllers/shoppe/product_category_localisations_controller.rb +58 -0
  69. data/app/controllers/shoppe/product_localisations_controller.rb +58 -0
  70. data/app/controllers/shoppe/products_controller.rb +58 -0
  71. data/app/controllers/shoppe/sessions_controller.rb +34 -0
  72. data/app/controllers/shoppe/settings_controller.rb +16 -0
  73. data/app/controllers/shoppe/stock_level_adjustments_controller.rb +40 -0
  74. data/app/controllers/shoppe/tax_rates_controller.rb +49 -0
  75. data/app/controllers/shoppe/users_controller.rb +53 -0
  76. data/app/controllers/shoppe/variants_controller.rb +50 -0
  77. data/app/helpers/shoppe/application_helper.rb +60 -0
  78. data/app/helpers/shoppe/product_category_helper.rb +36 -0
  79. data/app/mailers/shoppe/order_mailer.rb +25 -0
  80. data/app/mailers/shoppe/user_mailer.rb +10 -0
  81. data/app/models/shoppe/address.rb +44 -0
  82. data/app/models/shoppe/country.rb +27 -0
  83. data/app/models/shoppe/customer.rb +41 -0
  84. data/app/models/shoppe/delivery_service.rb +33 -0
  85. data/app/models/shoppe/delivery_service_price.rb +31 -0
  86. data/app/models/shoppe/order.rb +100 -0
  87. data/app/models/shoppe/order/actions.rb +94 -0
  88. data/app/models/shoppe/order/billing.rb +105 -0
  89. data/app/models/shoppe/order/delivery.rb +229 -0
  90. data/app/models/shoppe/order/states.rb +69 -0
  91. data/app/models/shoppe/order_item.rb +239 -0
  92. data/app/models/shoppe/payment.rb +86 -0
  93. data/app/models/shoppe/product.rb +189 -0
  94. data/app/models/shoppe/product/product_attributes.rb +20 -0
  95. data/app/models/shoppe/product/variants.rb +51 -0
  96. data/app/models/shoppe/product_attribute.rb +66 -0
  97. data/app/models/shoppe/product_categorization.rb +14 -0
  98. data/app/models/shoppe/product_category.rb +75 -0
  99. data/app/models/shoppe/setting.rb +68 -0
  100. data/app/models/shoppe/stock_level_adjustment.rb +19 -0
  101. data/app/models/shoppe/tax_rate.rb +46 -0
  102. data/app/models/shoppe/user.rb +49 -0
  103. data/app/validators/permalink_validator.rb +7 -0
  104. data/app/views/layouts/shoppe/application.html.haml +34 -0
  105. data/app/views/layouts/shoppe/printable.html.haml +11 -0
  106. data/app/views/layouts/shoppe/sub.html.haml +10 -0
  107. data/app/views/shoppe/addresses/_form.html.haml +33 -0
  108. data/app/views/shoppe/addresses/edit.html.haml +5 -0
  109. data/app/views/shoppe/addresses/new.html.haml +5 -0
  110. data/app/views/shoppe/countries/_form.html.haml +35 -0
  111. data/app/views/shoppe/countries/edit.html.haml +6 -0
  112. data/app/views/shoppe/countries/index.html.haml +25 -0
  113. data/app/views/shoppe/countries/new.html.haml +7 -0
  114. data/app/views/shoppe/customers/_addresses.html.haml +20 -0
  115. data/app/views/shoppe/customers/_form.html.haml +30 -0
  116. data/app/views/shoppe/customers/_search_form.html.haml +13 -0
  117. data/app/views/shoppe/customers/edit.html.haml +5 -0
  118. data/app/views/shoppe/customers/index.html.haml +32 -0
  119. data/app/views/shoppe/customers/new.html.haml +5 -0
  120. data/app/views/shoppe/customers/show.html.haml +53 -0
  121. data/app/views/shoppe/delivery_service_prices/_form.html.haml +44 -0
  122. data/app/views/shoppe/delivery_service_prices/edit.html.haml +6 -0
  123. data/app/views/shoppe/delivery_service_prices/index.html.haml +23 -0
  124. data/app/views/shoppe/delivery_service_prices/new.html.haml +6 -0
  125. data/app/views/shoppe/delivery_services/_form.html.haml +38 -0
  126. data/app/views/shoppe/delivery_services/edit.html.haml +9 -0
  127. data/app/views/shoppe/delivery_services/index.html.haml +27 -0
  128. data/app/views/shoppe/delivery_services/new.html.haml +6 -0
  129. data/app/views/shoppe/order_mailer/accepted.text.erb +12 -0
  130. data/app/views/shoppe/order_mailer/received.text.erb +9 -0
  131. data/app/views/shoppe/order_mailer/rejected.text.erb +10 -0
  132. data/app/views/shoppe/order_mailer/shipped.text.erb +16 -0
  133. data/app/views/shoppe/orders/_form.html.haml +58 -0
  134. data/app/views/shoppe/orders/_order_details.html.haml +57 -0
  135. data/app/views/shoppe/orders/_order_items.html.haml +38 -0
  136. data/app/views/shoppe/orders/_order_items_form.html.haml +61 -0
  137. data/app/views/shoppe/orders/_payments_form.html.haml +15 -0
  138. data/app/views/shoppe/orders/_payments_table.html.haml +37 -0
  139. data/app/views/shoppe/orders/_search_form.html.haml +24 -0
  140. data/app/views/shoppe/orders/_status_bar.html.haml +35 -0
  141. data/app/views/shoppe/orders/despatch_note.html.haml +45 -0
  142. data/app/views/shoppe/orders/edit.html.haml +21 -0
  143. data/app/views/shoppe/orders/index.html.haml +39 -0
  144. data/app/views/shoppe/orders/new.html.haml +14 -0
  145. data/app/views/shoppe/orders/show.html.haml +25 -0
  146. data/app/views/shoppe/payments/refund.html.haml +13 -0
  147. data/app/views/shoppe/product_categories/_form.html.haml +50 -0
  148. data/app/views/shoppe/product_categories/edit.html.haml +8 -0
  149. data/app/views/shoppe/product_categories/index.html.haml +27 -0
  150. data/app/views/shoppe/product_categories/new.html.haml +6 -0
  151. data/app/views/shoppe/product_category_localisations/form.html.haml +29 -0
  152. data/app/views/shoppe/product_category_localisations/index.html.haml +26 -0
  153. data/app/views/shoppe/product_localisations/form.html.haml +32 -0
  154. data/app/views/shoppe/product_localisations/index.html.haml +26 -0
  155. data/app/views/shoppe/products/_form.html.haml +118 -0
  156. data/app/views/shoppe/products/_table.html.haml +42 -0
  157. data/app/views/shoppe/products/edit.html.haml +9 -0
  158. data/app/views/shoppe/products/import.html.haml +67 -0
  159. data/app/views/shoppe/products/index.html.haml +9 -0
  160. data/app/views/shoppe/products/new.html.haml +7 -0
  161. data/app/views/shoppe/sessions/new.html.haml +12 -0
  162. data/app/views/shoppe/sessions/reset.html.haml +12 -0
  163. data/app/views/shoppe/settings/edit.html.haml +19 -0
  164. data/app/views/shoppe/shared/error.html.haml +6 -0
  165. data/app/views/shoppe/stock_level_adjustments/index.html.haml +40 -0
  166. data/app/views/shoppe/tax_rates/form.html.haml +28 -0
  167. data/app/views/shoppe/tax_rates/index.html.haml +17 -0
  168. data/app/views/shoppe/user_mailer/new_password.text.erb +9 -0
  169. data/app/views/shoppe/users/_form.html.haml +27 -0
  170. data/app/views/shoppe/users/edit.html.haml +5 -0
  171. data/app/views/shoppe/users/index.html.haml +17 -0
  172. data/app/views/shoppe/users/new.html.haml +7 -0
  173. data/app/views/shoppe/variants/form.html.haml +68 -0
  174. data/app/views/shoppe/variants/index.html.haml +33 -0
  175. data/config/locales/de.yml +653 -0
  176. data/config/locales/en.yml +744 -0
  177. data/config/locales/es.yml +653 -0
  178. data/config/locales/pl.yml +662 -0
  179. data/config/locales/pt-BR.yml +655 -0
  180. data/config/routes.rb +53 -0
  181. data/db/countries.txt +252 -0
  182. data/db/migrate/20130926094549_create_shoppe_initial_schema.rb +175 -0
  183. data/db/migrate/20131024201501_add_address_type_to_shoppe_tax_rates.rb +5 -0
  184. data/db/migrate/20131024204815_create_shoppe_payments.rb +32 -0
  185. data/db/migrate/20131102143930_remove_default_on_order_item_weight.rb +9 -0
  186. data/db/migrate/20141013192427_create_shoppe_customers.rb +14 -0
  187. data/db/migrate/20141026175622_add_indexes_to_shoppe_order_items.rb +6 -0
  188. data/db/migrate/20141026175943_add_indexes_to_shoppe_orders.rb +7 -0
  189. data/db/migrate/20141026180333_add_indexes_to_shoppe_payments.rb +6 -0
  190. data/db/migrate/20141026180835_add_indexes_to_shoppe_product_attributes.rb +7 -0
  191. data/db/migrate/20141026180952_add_indexes_to_shoppe_product_categories.rb +5 -0
  192. data/db/migrate/20141026181040_add_indexes_to_shoppe_products.rb +8 -0
  193. data/db/migrate/20141026181312_add_indexes_to_shoppe_settings.rb +5 -0
  194. data/db/migrate/20141026181354_add_indexes_to_shoppe_stock_level_adjustments.rb +6 -0
  195. data/db/migrate/20141026181559_add_indexes_to_shoppe_users.rb +5 -0
  196. data/db/migrate/20141026181716_add_indexes_to_shoppe_delivery_services.rb +9 -0
  197. data/db/migrate/20141026181717_allow_multiple_shoppe_products_per_shoppe_product_category.rb +46 -0
  198. data/db/migrate/20141026181718_add_nested_to_product_categories.rb +30 -0
  199. data/db/migrate/20141027215005_create_shoppe_addresses.rb +17 -0
  200. data/db/migrate/20150315215633_add_customer_to_shoppe_orders.rb +5 -0
  201. data/db/migrate/20150513171350_create_shoppe_product_category_translation_table.rb +17 -0
  202. data/db/migrate/20150519173350_create_shoppe_product_translation_table.rb +18 -0
  203. data/db/schema.rb +308 -0
  204. data/db/seeds.rb +137 -0
  205. data/db/seeds_data/poe400.jpg +0 -0
  206. data/db/seeds_data/snom-870-blk.jpg +0 -0
  207. data/db/seeds_data/snom-870-grey.jpg +0 -0
  208. data/db/seeds_data/snom-mm2.jpg +0 -0
  209. data/db/seeds_data/spa303.jpg +0 -0
  210. data/db/seeds_data/t18p.jpg +0 -0
  211. data/db/seeds_data/t20p.jpg +0 -0
  212. data/db/seeds_data/t22p.jpg +0 -0
  213. data/db/seeds_data/t26p.jpg +0 -0
  214. data/db/seeds_data/t41pn.jpg +0 -0
  215. data/db/seeds_data/t46gn.jpg +0 -0
  216. data/db/seeds_data/w52p.jpg +0 -0
  217. data/db/seeds_data/yhs32.jpg +0 -0
  218. data/lib/shoppe.rb +60 -0
  219. data/lib/shoppe/associated_countries.rb +20 -0
  220. data/lib/shoppe/country_importer.rb +15 -0
  221. data/lib/shoppe/default_navigation.rb +21 -0
  222. data/lib/shoppe/engine.rb +55 -0
  223. data/lib/shoppe/error.rb +21 -0
  224. data/lib/shoppe/errors/inappropriate_delivery_service.rb +6 -0
  225. data/lib/shoppe/errors/insufficient_stock_to_fulfil.rb +15 -0
  226. data/lib/shoppe/errors/invalid_configuration.rb +6 -0
  227. data/lib/shoppe/errors/not_enough_stock.rb +15 -0
  228. data/lib/shoppe/errors/payment_declined.rb +6 -0
  229. data/lib/shoppe/errors/refund_failed.rb +6 -0
  230. data/lib/shoppe/errors/unorderable_item.rb +6 -0
  231. data/lib/shoppe/navigation_manager.rb +81 -0
  232. data/lib/shoppe/orderable_item.rb +39 -0
  233. data/lib/shoppe/settings.rb +26 -0
  234. data/lib/shoppe/settings_loader.rb +16 -0
  235. data/lib/shoppe/setup_generator.rb +10 -0
  236. data/lib/shoppe/version.rb +3 -0
  237. data/lib/shoppe/view_helpers.rb +16 -0
  238. data/lib/tasks/shoppe.rake +29 -0
  239. metadata +662 -0
@@ -0,0 +1,42 @@
1
+ .table
2
+ %table.data
3
+ %thead
4
+ %tr
5
+ %th{:width => '20%'}= t('shoppe.products.sku')
6
+ %th{:width => '40%'}= t('shoppe.products.name')
7
+ %th{:width => '25%'}= t('shoppe.products.price_variants')
8
+ %th{:width => '15%'}= t('shoppe.products.stock')
9
+ %tbody
10
+ - if products.empty?
11
+ %tr.empty
12
+ %td{:colspan => 4}= t('shoppe.products.no_products')
13
+ - else
14
+ - for category, products in products
15
+ %tr
16
+ %th{:colspan => 4}= category.name
17
+ - for product in products
18
+ %tr
19
+ %td= product.sku
20
+ %td= link_to product.name, [:edit, product]
21
+ - if product.has_variants?
22
+ %td.table{:colspan => 2}
23
+ %table.data
24
+ - for variant in product.variants
25
+ %tr
26
+ %td{:width => '40%'}= link_to variant.name, edit_product_variant_path(product, variant)
27
+ %td{:width => '30%'}= number_to_currency variant.price
28
+ %td{:width => '30%'}
29
+ - if variant.stock_control?
30
+ %span.float-right= link_to t('shoppe.products.edit') , stock_level_adjustments_path(:item_type => variant.class, :item_id => variant.id), :class => 'edit', :rel => 'dialog', :data => {:dialog_width => 700, :dialog_behavior => 'stockLevelAdjustments'}
31
+ = boolean_tag(variant.in_stock?, nil, :true_text => variant.stock, :false_text => t('shoppe.products.no_stock'))
32
+ - else
33
+ ∞
34
+ - else
35
+ %td= number_to_currency product.price
36
+ %td
37
+ - if product.stock_control?
38
+ %span.float-right= link_to t('shoppe.products.edit'), stock_level_adjustments_path(:item_type => product.class, :item_id => product.id), :class => 'edit', :rel => 'dialog', :data => {:dialog_width => 700, :dialog_behavior => 'stockLevelAdjustments'}
39
+ = boolean_tag(product.in_stock?, nil, :true_text => product.stock, :false_text => t('shoppe.products.no_stock'))
40
+ - else
41
+ ∞
42
+
@@ -0,0 +1,9 @@
1
+ - @page_title = t('shoppe.products.products')
2
+ = content_for :header do
3
+ %p.buttons
4
+ = link_to t('shoppe.localisations.localisations') , [@product, :localisations], :class => 'button'
5
+ = link_to t('shoppe.products.variants') , [@product, :variants], :class => 'button'
6
+ = link_to t('shoppe.products.stock_levels') , stock_level_adjustments_path(:item_id => @product.id, :item_type => @product.class), :class => 'button', :rel => 'dialog', :data => {:dialog_width => 700, :dialog_behavior => 'stockLevelAdjustments'}
7
+ = link_to t('shoppe.products.back_to_products') , :products, :class => 'button'
8
+ %h2.products= t('shoppe.products.products')
9
+ = render 'form'
@@ -0,0 +1,67 @@
1
+ - @page_title = t('shoppe.products.products')
2
+
3
+ = content_for :header do
4
+ %h2.products= t('shoppe.products.import_products')
5
+
6
+ = form_for "import", :url => import_products_path, :html => {:multipart => true} do |f|
7
+ = f.error_messages
8
+
9
+ = field_set_tag t('shoppe.imports.file_upload') do
10
+ %dl
11
+ %dt= f.label :import_file, t('shoppe.imports.required_formats')
12
+ %dd= f.file_field :import_file
13
+
14
+ = field_set_tag t('shoppe.imports.example_file') do
15
+ %dl
16
+ %dd
17
+ %table.importExample
18
+ %thead
19
+ %tr
20
+ %th name
21
+ %th sku
22
+ %th permalink
23
+ %th description
24
+ %th short_description
25
+ %th weight
26
+ %th price
27
+ %th category_name
28
+ %th qty
29
+ %tbody
30
+ %tr
31
+ %td= t('shoppe.products.imports.examples.first.name')
32
+ %td= t('shoppe.products.imports.examples.first.sku')
33
+ %td= t('shoppe.products.imports.examples.first.permalink')
34
+ %td= t('shoppe.products.imports.examples.first.description')
35
+ %td= t('shoppe.products.imports.examples.first.short_description')
36
+ %td= t('shoppe.products.imports.examples.first.weight')
37
+ %td= t('shoppe.products.imports.examples.first.price')
38
+ %td= t('shoppe.products.imports.examples.first.category_name')
39
+ %td= t('shoppe.products.imports.examples.first.qty')
40
+ %tr
41
+ %td= t('shoppe.products.imports.examples.second.name')
42
+ %td= t('shoppe.products.imports.examples.second.sku')
43
+ %td= t('shoppe.products.imports.examples.second.permalink')
44
+ %td= t('shoppe.products.imports.examples.second.description')
45
+ %td= t('shoppe.products.imports.examples.second.short_description')
46
+ %td= t('shoppe.products.imports.examples.second.weight')
47
+ %td= t('shoppe.products.imports.examples.second.price')
48
+ %td= t('shoppe.products.imports.examples.second.category_name')
49
+ %td= t('shoppe.products.imports.examples.second.qty')
50
+ %tr
51
+ %td= t('shoppe.products.imports.examples.third.name')
52
+ %td= t('shoppe.products.imports.examples.third.sku')
53
+ %td= t('shoppe.products.imports.examples.third.permalink')
54
+ %td= t('shoppe.products.imports.examples.third.description')
55
+ %td= t('shoppe.products.imports.examples.third.short_description')
56
+ %td= t('shoppe.products.imports.examples.third.weight')
57
+ %td= t('shoppe.products.imports.examples.third.price')
58
+ %td= t('shoppe.products.imports.examples.third.category_name')
59
+ %td= t('shoppe.products.imports.examples.third.qty')
60
+ %tr.tear-off
61
+ %td{:colspan => "8"}
62
+ %dd
63
+ %p.help= t('shoppe.products.imports.help')
64
+
65
+ %p.submit
66
+ = f.submit t('shoppe.import'), :class => "button green"
67
+ = link_to t('shoppe.cancel'), :products, :class => "button"
@@ -0,0 +1,9 @@
1
+ - @page_title = t('shoppe.products.products')
2
+
3
+ = content_for :header do
4
+ %p.buttons
5
+ = link_to t('shoppe.products.new_product'), :new_product, :class => 'button green'
6
+ = link_to t('shoppe.products.import_products'), :import_products, :class => 'button gray'
7
+ %h2.products= t('shoppe.products.products')
8
+
9
+ = render 'table', :products => @products
@@ -0,0 +1,7 @@
1
+ - @page_title = t('shoppe.products.products')
2
+
3
+ = content_for :header do
4
+ %p.buttons= link_to t('shoppe.products.back_to_products') , :products, :class => 'button'
5
+ %h2.products= t('shoppe.products.products')
6
+
7
+ = render 'form'
@@ -0,0 +1,12 @@
1
+ - @page_title = t('shoppe.sessions.admin_login')
2
+ = display_flash
3
+ .loginArea
4
+ = form_tag :login, :class => 'login' do
5
+ %p.field
6
+ = text_field_tag 'email_address', params[:email_address], :class => 'focus', :placeholder => t('shoppe.sessions.email')
7
+ %p.field
8
+ = password_field_tag 'password', params[:password], :class => '', :placeholder => t('shoppe.sessions.password')
9
+ %p.submit
10
+ = submit_tag t('shoppe.sessions.login'), :class => 'button green'
11
+ %p.reset
12
+ = link_to t('shoppe.sessions.reset_password?'), login_reset_path
@@ -0,0 +1,12 @@
1
+ - @page_title = t('shoppe.sessions.reset_password')
2
+
3
+ = display_flash
4
+ .loginArea
5
+ %h2= t('shoppe.sessions.reset_password')
6
+ = form_tag :login_reset, :class => 'login' do
7
+ %p.field
8
+ = text_field_tag 'email_address', params[:email_address], :class => 'focus', :placeholder => t('shoppe.sessions.email')
9
+ %p.submit
10
+ = submit_tag t('shoppe.sessions.reset') , :class => 'button green'
11
+ %p.reset
12
+ = link_to t('shoppe.sessions.back_to_login') , login_path
@@ -0,0 +1,19 @@
1
+ - @page_title = t("shoppe.settings.settings")
2
+
3
+ = content_for :header do
4
+ %h2.settings= t("shoppe.settings.settings")
5
+
6
+ = form_tag :url => settings_path do |f|
7
+
8
+ - Shoppe.settings_groups.each do |group, fields|
9
+ = field_set_tag t("shoppe.settings.#{group}") do
10
+ - fields.each do |f|
11
+ %dl.sided
12
+ %dt= settings_label f
13
+ %dd
14
+ = settings_field f
15
+ - if v = t("shoppe.settings.help")[f]
16
+ %p.help= v
17
+
18
+ %p.submit.sided
19
+ = submit_tag t("shoppe.settings.save_settings"), :class => 'button green'
@@ -0,0 +1,6 @@
1
+ - @page_title = t('shoppe.shared.error')
2
+ = display_flash
3
+ .error
4
+ %h2= t('shoppe.shared.error_occured')
5
+ %p.message= @exception.message
6
+ %p.back= link_to "←#{t('shoppe.shared.back_to_shoppe')}".html_safe, root_path, :class => 'button'
@@ -0,0 +1,40 @@
1
+ - @page_title = t('shoppe.stock_level_adjustments.stock_levels_title', item_name: @item.name)
2
+
3
+ = content_for :header do
4
+ %p.buttons
5
+ - case @item
6
+ - when Shoppe::Product
7
+ - @active_nav = :products
8
+ = link_to t('shoppe.stock_level_adjustments.edit_product'), [:edit, @item], :class => 'button'
9
+ = link_to t('shoppe.stock_level_adjustments.back_to_product'), :products, :class => 'button'
10
+
11
+ %h2.products= t('shoppe.stock_level_adjustments.stock_levels_for', item_name: @item.name)
12
+
13
+ .table
14
+ %p.info
15
+ = t('shoppe.stock_level_adjustments.current_stock_level_html', item_stock: @item.stock).html_safe
16
+ %span.float-right= page_entries_info @stock_level_adjustments
17
+
18
+ = form_for @new_sla do |f|
19
+ = hidden_field_tag 'item_type', params[:item_type]
20
+ = hidden_field_tag 'item_id', params[:item_id]
21
+ %table.data
22
+ %thead
23
+ %tr
24
+ %th{:width => '25%'}= t('shoppe.stock_level_adjustments.date')
25
+ %th{:width => '50%'}= t('shoppe.stock_level_adjustments.description')
26
+ %th{:width => '25%'}= t('shoppe.stock_level_adjustments.adjustment')
27
+ %tbody
28
+ %tr.form
29
+ %td
30
+ %td.desc= f.text_field :description
31
+ %td.adjustment
32
+ = f.text_field :adjustment
33
+ = f.submit t('shoppe.stock_level_adjustments.add'), :class => 'button button-mini green'
34
+ - for sla in @stock_level_adjustments
35
+ %tr
36
+ %td= l(sla.created_at, format: :long)
37
+ %td= sla.description
38
+ %td= sla.adjustment > 0 ? "+#{sla.adjustment}" : sla.adjustment
39
+
40
+ = paginate @stock_level_adjustments
@@ -0,0 +1,28 @@
1
+ - @page_title = t('shoppe.tax_rates.tax_rates')
2
+ = content_for :header do
3
+ %p.buttons= link_to t('shoppe.tax_rates.back_to_tax_rates'), :tax_rates, :class => 'button grey'
4
+ %h2.tax_rates= t('shoppe.tax_rates.tax_rates')
5
+
6
+ = form_for @tax_rate do |f|
7
+ = f.error_messages
8
+ = field_set_tag t('shoppe.tax_rates.rate_details') do
9
+ .splitContainer
10
+ %dl.half
11
+ %dt= f.label :name, t('shoppe.tax_rates.name')
12
+ %dd= f.text_field :name, :class => 'focus text'
13
+ %dl.half
14
+ %dt= f.label :rate, t('shoppe.tax_rates.rate')
15
+ %dd= f.text_field :rate, :class => 'text'
16
+
17
+ = field_set_tag t('shoppe.tax_rates.country_restriction') do
18
+ %dl
19
+ %dd
20
+ = f.select :address_type, Shoppe::TaxRate::ADDRESS_TYPES.map { |a| [t('shoppe.tax_rates.address_type_option', address: t("shoppe.tax_rates.#{a}")).html_safe, a]}, {}, :class => 'chosen-basic'
21
+ %dl
22
+ %dd
23
+ = f.collection_select :country_ids, Shoppe::Country.ordered, :id, :name, {}, {:class => 'chosen', :multiple => true, :data => {:placeholder => t('shoppe.tax_rates.all_countries') }}
24
+ %p.submit
25
+ - unless @tax_rate.new_record?
26
+ %span.right= link_to t('shoppe.delete'), @tax_rate, :class => 'button purple', :method => :delete, :data => {:confirm => t('shoppe.tax_rates.delete_confirmation') }
27
+ = f.submit t('shoppe.submit'), :class => 'button green'
28
+ = link_to t('shoppe.cancel'), :tax_rates, :class => 'button'
@@ -0,0 +1,17 @@
1
+ - @page_title = t('shoppe.tax_rates.tax_rates')
2
+
3
+ = content_for :header do
4
+ %p.buttons= link_to t('shoppe.tax_rates.new_tax_rate'), :new_tax_rate, :class => 'button green'
5
+ %h2.tax_rates= t('shoppe.tax_rates.tax_rates')
6
+
7
+ .table
8
+ %table.data
9
+ %thead
10
+ %tr
11
+ %th= t('shoppe.tax_rates.name')
12
+ %th= t('shoppe.tax_rates.rate')
13
+ %tbody
14
+ - for tax_rate in @tax_rates
15
+ %tr
16
+ %td= link_to tax_rate.name, [:edit, tax_rate]
17
+ %td= tax_rate.rate
@@ -0,0 +1,9 @@
1
+ Hello <%=@user.first_name%>
2
+
3
+ Your new password for Shoppe on <%=Shoppe.settings.store_name%> is: <%=@user.password%>
4
+
5
+ You can login using your e-mail address.
6
+
7
+ Thanks,
8
+
9
+ The Built-in Shoppe Robot
@@ -0,0 +1,27 @@
1
+ = form_for @user do |f|
2
+ = f.error_messages
3
+ = field_set_tag t('shoppe.users.user_details') do
4
+ .splitContainer
5
+ %dl.half
6
+ %dt= f.label :first_name, t('shoppe.users.first_name')
7
+ %dd= f.text_field :first_name, :class => 'focus text'
8
+ %dl.half
9
+ %dt= f.label :last_name, t('shoppe.users.last_name')
10
+ %dd= f.text_field :last_name, :class => 'text'
11
+ = field_set_tag t("shoppe.users.login") do
12
+ .splitContainer
13
+ %dl.third
14
+ %dt= f.label :email_address, t('shoppe.users.email')
15
+ %dd= f.text_field :email_address, :class => 'text'
16
+ %dl.third
17
+ %dt= f.label :password, t('shoppe.users.password')
18
+ %dd= f.password_field :password, :class => 'text'
19
+ %dl.third
20
+ %dt= f.label :password_confirmation, t('shoppe.users.password_confirmation')
21
+ %dd= f.password_field :password_confirmation, :class => 'text'
22
+
23
+ %p.submit
24
+ - unless @user.new_record?
25
+ %span.right= link_to t('shoppe.delete'), @user, :class => 'button purple', :method => :delete, :data => {:confirm => t('shoppe.users.delete_confirmation')}
26
+ = f.submit t('shoppe.submit'), :class => 'button green'
27
+ = link_to t('shoppe.cancel'), :users, :class => 'button'
@@ -0,0 +1,5 @@
1
+ - @page_title = t('shoppe.users.users')
2
+ = content_for :header do
3
+ %p.buttons= link_to t('shoppe.users.back_to_users'), :users, :class => 'button'
4
+ %h2.users= t('shoppe.users.users')
5
+ = render 'form'
@@ -0,0 +1,17 @@
1
+ - @page_title = t('shoppe.users.users')
2
+
3
+ = content_for :header do
4
+ %p.buttons= link_to t('shoppe.users.new_user'), :new_user, :class => 'button green'
5
+ %h2.users= t('shoppe.users.users')
6
+
7
+ .table
8
+ %table.data
9
+ %thead
10
+ %tr
11
+ %th= t('shoppe.users.name')
12
+ %th= t('shoppe.users.email')
13
+ %tbody
14
+ - for user in @users
15
+ %tr
16
+ %td= link_to user.full_name, [:edit, user]
17
+ %td= user.email_address
@@ -0,0 +1,7 @@
1
+ - @page_title = t('shoppe.users.users')
2
+
3
+ = content_for :header do
4
+ %p.buttons= link_to t('shoppe.users.back_to_users'), :users, :class => 'button'
5
+ %h2.users= t('shoppe.users.users')
6
+
7
+ = render 'form'
@@ -0,0 +1,68 @@
1
+ - @page_title = "#{t('shoppe.variants.variants')} - #{@product.name}"
2
+ = content_for :header do
3
+ %p.buttons
4
+ = link_to t('shoppe.localisations.localisations') , [@variant, :localisations], :class => 'button'
5
+ = link_to t('shoppe.variants.back_to_variants'), [@product, :variants], :class => 'button'
6
+ %h2.products= t('shoppe.variants.variants_of', product:@product.name)
7
+
8
+ = form_for [@product, @variant], :url => @variant.new_record? ? product_variants_path(@product) : product_variant_path(@product, @variant), :html => {:multipart => true} do |f|
9
+ = f.error_messages
10
+ = field_set_tag t('shoppe.variants.product_information') do
11
+ .splitContainer
12
+ %dl.third
13
+ %dt= f.label :name, t('shoppe.variants.name')
14
+ %dd= f.text_field :name, :class => 'text focus'
15
+ %dl.third
16
+ %dt= f.label :permalink, t('shoppe.variants.permalink')
17
+ %dd= f.text_field :permalink, :class => 'text'
18
+ %dl.third
19
+ %dt= f.label :sku, t('shoppe.variants.sku')
20
+ %dd= f.text_field :sku, :class => 'text'
21
+
22
+ = field_set_tag t('shoppe.variants.image') do
23
+ %dl
24
+ %dd
25
+ = attachment_preview @variant.default_image, :hide_if_blank => true
26
+ %p= f.file_field :default_image_file
27
+ = field_set_tag t("shoppe.variants.pricing") do
28
+ .splitContainer
29
+ %dl.third
30
+ %dt= f.label :price, t('shoppe.variants.price')
31
+ %dd= f.text_field :price, :class => 'text'
32
+ %dl.third
33
+ %dt= f.label :cost_price, t('shoppe.variants.cost_price')
34
+ %dd= f.text_field :cost_price, :class => 'text'
35
+ %dl.third
36
+ %dt= f.label :tax_rate_id, t('shoppe.variants.tax_rate')
37
+ %dd= f.collection_select :tax_rate_id, Shoppe::TaxRate.ordered, :id, :description, {:include_blank => true}, {:class => 'chosen-with-deselect', :data => {:placeholder => t('shoppe.variants.no_tax')}}
38
+
39
+ = field_set_tag t('shoppe.variants.stock_control') do
40
+ .splitContainer
41
+ %dl.half
42
+ %dt= f.label :weight, t('shoppe.variants.weight')
43
+ %dd= f.text_field :weight, :class => 'text'
44
+
45
+ %dl.half
46
+ %dt= f.label :stock_control, t('shoppe.variants.stock_control')
47
+ %dd.checkbox
48
+ = f.check_box :stock_control
49
+ = f.label :stock_control, t('shoppe.variants.enable_stock_control?')
50
+
51
+ = field_set_tag t('shoppe.variants.website_properties') do
52
+ .splitContainer
53
+ %dl.half
54
+ %dt= f.label :active, t('shoppe.variants.on_sale?')
55
+ %dd.checkbox
56
+ = f.check_box :active
57
+ = f.label :active, t('shoppe.variants.on_sale_info')
58
+ %dl.half
59
+ %dt= f.label :default, t('shoppe.variants.default_variant?')
60
+ %dd.checkbox
61
+ = f.check_box :default
62
+ = f.label :default, t('shoppe.variants.default_variant_info')
63
+
64
+ %p.submit
65
+ - unless @variant.new_record?
66
+ %span.right= link_to t('shoppe.delete'), product_variant_path(@product, @variant), :class => 'button purple', :method => :delete, :data => {:confirm => t('shoppe.variants.delete_confirmation')}
67
+ = f.submit t('shoppe.variants.save_variant'), :class => 'button green'
68
+ = link_to t('shoppe.cancel'), :products, :class => 'button'
@@ -0,0 +1,33 @@
1
+ - @page_title = "#{t('shoppe.variants.variants')} - #{@product.name}"
2
+
3
+ = content_for :header do
4
+ %p.buttons
5
+ = link_to t('shoppe.variants.edit_product'), [:edit, @product], :class => 'button'
6
+ = link_to t('shoppe.variants.new_variant'), [:new, @product, :variant], :class => 'button green'
7
+
8
+ %h2.products= t('shoppe.variants.variants_of', product: @product.name)
9
+
10
+ .table
11
+ %table.data
12
+ %thead
13
+ %tr
14
+ %th{:width => '20%'}= t('shoppe.variants.sku')
15
+ %th{:width => '50%'}= t('shoppe.variants.name')
16
+ %th{:width => '15%'}= t('shoppe.variants.price')
17
+ %th{:width => '15%'}= t('shoppe.variants.stock')
18
+ %tbody
19
+ - if @variants.empty?
20
+ %tr.empty
21
+ %td{:colspan => 4}= t('shoppe.variants.no_products')
22
+ - else
23
+ - for variant in @variants
24
+ %tr
25
+ %td= variant.sku
26
+ %td= link_to variant.name, edit_product_variant_path(@product, variant)
27
+ %td= number_to_currency variant.price
28
+ %td
29
+ - if variant.stock_control?
30
+ %span.float-right= link_to t('shoppe.edit'), stock_level_adjustments_path(:item_type => variant.class, :item_id => variant.id), :class => 'edit', :rel => 'dialog', :data => {:dialog_width => 700, :dialog_behavior => 'stockLevelAdjustments'}
31
+ = boolean_tag(variant.in_stock?, nil, :true_text => variant.stock, :false_text => t('shoppe.variants.no_stock'))
32
+ - else
33
+ &#8734;