Browse files

COMPLETE OVERHAUL to get RAILS 3 working

  • Loading branch information...
1 parent 95d267f commit de8a250e769620d9e087209a192230082bada58c David Henner committed Sep 26, 2010
Showing with 9,345 additions and 12,641 deletions.
  1. +1 −4 Gemfile
  2. +9 −6 Gemfile.lock
  3. +13 −3 README
  4. +0 −3 Rakefile
  5. +12 −0 app/controllers/admin/config/overviews_controller.rb
  6. +85 −0 app/controllers/admin/config/shipping_categories_controller.rb
  7. +19 −13 app/controllers/admin/config/shipping_methods_controller.rb
  8. +15 −11 app/controllers/admin/config/shipping_rates_controller.rb
  9. +4 −3 app/controllers/admin/merchandise/products_controller.rb
  10. +0 −83 app/controllers/admin/merchandise/shipping_categories_controller.rb
  11. +1 −0 app/controllers/admin/merchandise/variants_controller.rb
  12. +3 −2 app/controllers/admin/order/base_controller.rb
  13. +11 −7 app/controllers/admin/overviews_controller.rb
  14. +2 −0 app/controllers/shopping/orders_controller.rb
  15. +2 −0 app/helpers/admin/config/overviews_helper.rb
  16. +2 −1 app/models/address.rb
  17. +0 −1 app/models/shipping_rate.rb
  18. +5 −1 app/models/tax_status.rb
  19. +3 −3 app/models/variant.rb
  20. +14 −2 app/stylesheets/ie.scss
  21. +4 −4 app/stylesheets/partials/_base.scss
  22. +8 −2 app/stylesheets/print.scss
  23. +8 −1 app/stylesheets/screen.scss
  24. +9 −0 app/views/admin/config/_sub_header.html.erb
  25. +0 −2 app/views/admin/config/accounts/_form.html.erb
  26. +4 −1 app/views/admin/config/accounts/edit.html.erb
  27. +3 −5 app/views/admin/config/accounts/index.html.erb
  28. +5 −1 app/views/admin/config/accounts/new.html.erb
  29. +12 −0 app/views/admin/config/overviews/index.html.erb
  30. +8 −5 app/views/admin/config/shipping_categories/_form.html.erb
  31. +6 −3 app/views/admin/config/shipping_categories/edit.html.erb
  32. +6 −8 app/views/admin/config/shipping_categories/index.html.erb
  33. +5 −4 app/views/admin/config/shipping_categories/new.html.erb
  34. +1 −0 app/views/admin/config/shipping_categories/show.html.erb
  35. +1 −2 app/views/admin/config/shipping_methods/_form.html.erb
  36. +3 −1 app/views/admin/config/shipping_methods/edit.html.erb
  37. +1 −0 app/views/admin/config/shipping_methods/index.html.erb
  38. +3 −1 app/views/admin/config/shipping_methods/new.html.erb
  39. +1 −5 app/views/admin/config/shipping_rates/_form.html.erb
  40. +3 −1 app/views/admin/config/shipping_rates/edit.html.erb
  41. +1 −0 app/views/admin/config/shipping_rates/index.html.erb
  42. +4 −2 app/views/admin/config/shipping_rates/new.html.erb
  43. +1 −3 app/views/admin/config/shipping_zones/_form.html.erb
  44. +4 −1 app/views/admin/config/shipping_zones/edit.html.erb
  45. +2 −0 app/views/admin/config/shipping_zones/index.html.erb
  46. +4 −1 app/views/admin/config/shipping_zones/new.html.erb
  47. +0 −3 app/views/admin/config/tax_rates/_form.html.erb
  48. +5 −3 app/views/admin/config/tax_rates/edit.html.erb
  49. +2 −0 app/views/admin/config/tax_rates/index.html.erb
  50. +3 −1 app/views/admin/config/tax_rates/new.html.erb
  51. +0 −3 app/views/admin/config/tax_statuses/_form.html.erb
  52. +5 −2 app/views/admin/config/tax_statuses/edit.html.erb
  53. +2 −0 app/views/admin/config/tax_statuses/index.html.erb
  54. +4 −1 app/views/admin/config/tax_statuses/new.html.erb
  55. +22 −2 app/views/admin/generic/shipping_categories/index.html.erb
  56. +9 −1 app/views/admin/merchandise/products/_form.erb
  57. +4 −0 app/views/admin/merchandise/products/edit.erb
  58. +1 −2 app/views/admin/order/products/_form.html.erb
  59. +4 −3 app/views/admin/order/products/new.html.erb
  60. +6 −5 app/views/admin/overviews/index.html.erb
  61. +1 −1 app/views/admin/users/edit.html.erb
  62. +1 −1 app/views/admin/users/index.html.erb
  63. +9 −8 app/views/layouts/admin.html.erb
  64. +6 −6 app/views/layouts/admin_cart.html.erb
  65. +8 −8 app/views/layouts/application.html.erb
  66. +5 −5 app/views/shopping/orders/index.html.erb
  67. +0 −2 autotest/discover.rb
  68. +13 −31 config/application.rb
  69. +9 −2 config/boot.rb
  70. +4 −4 config/compass.rb
  71. +0 −8 config/cucumber.yml
  72. +6 −15 config/database.yml
  73. +3 −3 config/environment.rb
  74. +18 −3 config/environments/development.rb
  75. +7 −9 config/environments/production.rb
  76. +2 −7 config/environments/test.rb
  77. +0 −15 config/initializers/active_merchant_extended.rb
  78. +2 −8 config/initializers/compass.rb
  79. +0 −1 config/initializers/cookie_verification_secret.rb
  80. +0 −13 config/initializers/default_to_jquery.rb
  81. +0 −119 config/initializers/devise.rb
  82. +1 −1 config/initializers/inflections.rb
  83. +0 −6 config/initializers/rspec_generator.rb
  84. +2 −2 config/initializers/secret_token.rb
  85. +2 −2 config/initializers/session_store.rb
  86. +0 −18 config/locales/date_time.en.yml
  87. +0 −36 config/locales/devise.en.yml
  88. +1 −53 config/locales/en.yml
  89. +4 −1 config/routes.rb
  90. +9 −9 db/migrate/20100706022524_add_sessions_table.rb
  91. +1 −1 db/migrate/20100813024219_create_shipping_categories.rb
  92. +4 −4 db/migrate/20100821035624_create_cart_items.rb
  93. +1 −1 db/migrate/20100906225709_create_tax_rates.rb
  94. +130 −74 db/schema.rb
  95. +0 −219 features/step_definitions/web_steps.rb
  96. +0 −59 features/support/env.rb
  97. +0 −33 features/support/paths.rb
  98. +0 −8 features/the_home_page.feature
  99. +0 −39 index.html
  100. +0 −53 lib/tasks/cucumber.rake
  101. +0 −69 lib/tasks/rspec.rake
  102. +0 −7 lib/tasks/seed.rake
  103. +0 −16 lib/tasks/sessions.rake
  104. 0 public/{stylesheets/flick → images/jqgrid}/images/ui-bg_flat_0_aaaaaa_40x100.png
  105. BIN public/images/jqgrid/images/ui-bg_flat_55_fbec88_40x100.png
  106. BIN public/images/jqgrid/images/ui-bg_glass_75_d0e5f5_1x400.png
  107. BIN public/images/jqgrid/images/ui-bg_glass_85_dfeffc_1x400.png
  108. BIN public/images/jqgrid/images/ui-bg_glass_95_fef1ec_1x400.png
  109. BIN public/images/jqgrid/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png
  110. BIN public/images/jqgrid/images/ui-bg_inset-hard_100_f5f8f9_1x100.png
  111. BIN public/images/jqgrid/images/ui-bg_inset-hard_100_fcfdfd_1x100.png
  112. BIN public/images/jqgrid/images/ui-icons_217bc0_256x240.png
  113. BIN public/images/jqgrid/images/ui-icons_2e83ff_256x240.png
  114. BIN public/images/jqgrid/images/ui-icons_469bdd_256x240.png
  115. BIN public/images/jqgrid/images/ui-icons_6da8d5_256x240.png
  116. BIN public/images/jqgrid/images/ui-icons_cd0a0a_256x240.png
  117. BIN public/images/jqgrid/images/ui-icons_d8e7f3_256x240.png
  118. BIN public/images/jqgrid/images/ui-icons_f9bd01_256x240.png
  119. BIN public/images/rails.png
  120. 0 public/javascripts/.gitkeep
  121. 0 public/javascripts/jqgrid/{ → javascripts}/JsonXml.js
  122. 0 public/javascripts/jqgrid/{ → javascripts}/jqDnR.js
  123. 0 public/javascripts/jqgrid/{ → javascripts}/jqModal.js
  124. 0 public/javascripts/jqgrid/{ → javascripts}/jquery-ui-1.8.custom.min.js
  125. 0 public/javascripts/jqgrid/{ → javascripts}/jquery.contextmenu.js
  126. 0 public/javascripts/jqgrid/{ → javascripts}/jquery.layout.js
  127. 0 public/javascripts/jqgrid/{ → javascripts}/jquery.tablednd.js
  128. 0 public/javascripts/jqgrid/{ → javascripts}/tablednd.js
  129. +0 −1 public/javascripts/jquery-ujs
  130. +6,240 −0 public/javascripts/jquery.js
  131. +154 −0 public/javascripts/jquery.min.js
  132. +132 −126 public/javascripts/rails.js
  133. +105 −105 public/stylesheets/{compiled → }/buttons.css
  134. +0 −100 public/stylesheets/compiled/ie.css
  135. +0 −5,010 public/stylesheets/compiled/plugins/silksprite/sprite.css
  136. +0 −84 public/stylesheets/compiled/print.css
  137. +0 −1,248 public/stylesheets/compiled/screen.css
  138. BIN public/stylesheets/flick/images/ui-bg_flat_0_eeeeee_40x100.png
  139. BIN public/stylesheets/flick/images/ui-bg_flat_55_ffffff_40x100.png
  140. BIN public/stylesheets/flick/images/ui-bg_flat_75_ffffff_40x100.png
  141. BIN public/stylesheets/flick/images/ui-bg_glass_65_ffffff_1x400.png
  142. BIN public/stylesheets/flick/images/ui-bg_highlight-soft_100_f6f6f6_1x100.png
  143. BIN public/stylesheets/flick/images/ui-bg_highlight-soft_25_0073ea_1x100.png
  144. BIN public/stylesheets/flick/images/ui-bg_highlight-soft_50_dddddd_1x100.png
  145. BIN public/stylesheets/flick/images/ui-icons_0073ea_256x240.png
  146. BIN public/stylesheets/flick/images/ui-icons_454545_256x240.png
  147. BIN public/stylesheets/flick/images/ui-icons_666666_256x240.png
  148. BIN public/stylesheets/flick/images/ui-icons_ff0084_256x240.png
  149. BIN public/stylesheets/flick/images/ui-icons_ffffff_256x240.png
  150. +0 −572 public/stylesheets/flick/jquery-ui-1.8.4.custom.css
  151. +89 −0 public/stylesheets/ie.css
  152. +2 −2 public/stylesheets/{compiled → }/ie6.css
  153. +11 −11 public/stylesheets/{compiled → }/link_icons.css
  154. +60 −60 public/stylesheets/{compiled → }/main.css
  155. +73 −0 public/stylesheets/print.css
  156. +0 −56 public/stylesheets/scaffold.css
  157. +1,716 −0 public/stylesheets/screen.css
  158. +9 −9 public/stylesheets/{compiled → }/tables.css
  159. +0 −10 script/cucumber
  160. +2 −5 script/rails
  161. +0 −125 spec/controllers/admin/accounts_controller_spec.rb
  162. +0 −125 spec/controllers/admin/checkout/shipments_controller_spec.rb
  163. +125 −0 spec/controllers/admin/config/overviews_controller_spec.rb
  164. +0 −125 spec/controllers/admin/config/shipping_methods_controller_spec.rb
  165. +0 −125 spec/controllers/admin/config/shipping_rates_controller_spec.rb
  166. +0 −125 spec/controllers/admin/config/shipping_zones_controller_spec.rb
  167. +0 −125 spec/controllers/admin/config/tax_rates_controller_spec.rb
  168. +0 −125 spec/controllers/admin/config/tax_statuses_controller_spec.rb
  169. +0 −28 spec/controllers/admin/generic/shipping_categories_controller_spec.rb
  170. +0 −28 spec/controllers/admin/inventory/overviews_controller_spec.rb
  171. +0 −127 spec/controllers/admin/inventory/purchase_orders_controller_spec.rb
  172. +0 −49 spec/controllers/admin/inventory/receivings_controller_spec.rb
  173. +0 −35 spec/controllers/admin/inventory/suppliers_controller_spec.rb
  174. +0 −28 spec/controllers/admin/merchandise/images/products_controller_spec.rb
  175. +0 −7 spec/controllers/admin/merchandise/product_types_controller_spec.rb
  176. +0 −7 spec/controllers/admin/merchandise/products_controller_spec.rb
  177. +0 −7 spec/controllers/admin/merchandise/properties_controller_spec.rb
  178. +0 −7 spec/controllers/admin/merchandise/prototype_properties_controller_spec.rb
  179. +0 −7 spec/controllers/admin/merchandise/prototypes_controller_spec.rb
  180. +0 −125 spec/controllers/admin/merchandise/shipping_categories_controller_spec.rb
  181. +0 −7 spec/controllers/admin/merchandise/variants_controller_spec.rb
  182. +0 −125 spec/controllers/admin/order/billing_addresses_controller_spec.rb
  183. +0 −125 spec/controllers/admin/order/carts_controller_spec.rb
  184. +0 −125 spec/controllers/admin/order/credit_cards_controller_spec.rb
  185. +0 −125 spec/controllers/admin/order/products_controller_spec.rb
  186. +0 −125 spec/controllers/admin/order/shipping_addresses_controller_spec.rb
  187. +0 −125 spec/controllers/admin/order/shipping_methods_controller_spec.rb
  188. +0 −125 spec/controllers/admin/order/users_controller_spec.rb
  189. +0 −26 spec/controllers/admin/users_controller_spec.rb
  190. +0 −127 spec/controllers/cart_items_controller_spec.rb
  191. +0 −19 spec/controllers/customer/registrations_controller_spec.rb
  192. +0 −12 spec/controllers/products_controller_spec.rb
  193. +0 −125 spec/controllers/shopping/addresses_controller_spec.rb
  194. +0 −26 spec/controllers/shopping/cart_items_controller_spec.rb
  195. +0 −125 spec/controllers/shopping/orders_controller_spec.rb
  196. +0 −125 spec/controllers/shopping/payments_controller_spec.rb
  197. +0 −125 spec/controllers/shopping/shipping_methods_controller_spec.rb
  198. +0 −19 spec/controllers/user_sessions_controller_spec.rb
  199. +0 −7 spec/controllers/welcome_controller_spec.rb
  200. +0 −28 spec/controllers/wish_items_controller_spec.rb
  201. +0 −7 spec/factories/account.rb
  202. +0 −20 spec/factories/address.rb
  203. +0 −5 spec/factories/property.rb
  204. +0 −3 spec/factories/prototype.rb
  205. +0 −8 spec/factories/purchase_order.rb
  206. +0 −5 spec/factories/supplier.rb
  207. +0 −22 spec/factories/user.rb
  208. +0 −5 spec/factories/user_role.rb
  209. +0 −15 spec/helpers/admin/checkout/shipments_helper_spec.rb
  210. +3 −3 spec/helpers/admin/{accounts_helper_spec.rb → config/overviews_helper_spec.rb}
  211. +0 −15 spec/helpers/admin/config/shipping_methods_helper_spec.rb
  212. +0 −15 spec/helpers/admin/config/shipping_rates_helper_spec.rb
  213. +0 −15 spec/helpers/admin/config/shipping_zones_helper_spec.rb
  214. +0 −15 spec/helpers/admin/config/tax_rates_helper_spec.rb
  215. +0 −15 spec/helpers/admin/config/tax_statuses_helper_spec.rb
  216. +0 −15 spec/helpers/admin/inventory/overviews_helper_spec.rb
  217. +0 −15 spec/helpers/admin/inventory/purchase_orders_helper_spec.rb
  218. +0 −15 spec/helpers/admin/inventory/receivings_helper_spec.rb
  219. +0 −15 spec/helpers/admin/merchandise/images_helper_spec.rb
  220. +0 −15 spec/helpers/admin/merchandise/shipping_categories_helper_spec.rb
  221. +0 −15 spec/helpers/admin/order/billing_addresses_helper_spec.rb
  222. +0 −15 spec/helpers/admin/order/carts_helper_spec.rb
  223. +0 −15 spec/helpers/admin/order/credit_cards_helper_spec.rb
  224. +0 −15 spec/helpers/admin/order/products_helper_spec.rb
  225. +0 −15 spec/helpers/admin/order/shipping_addresses_helper_spec.rb
  226. +0 −15 spec/helpers/admin/order/shipping_methods_helper_spec.rb
  227. +0 −15 spec/helpers/admin/order/users_helper_spec.rb
  228. +0 −15 spec/helpers/carts_helper_spec.rb
  229. +0 −15 spec/helpers/customer/registrations_helper_spec.rb
  230. +0 −15 spec/helpers/products_helper_spec.rb
  231. +0 −15 spec/helpers/shopping/addresses_helper_spec.rb
  232. +0 −15 spec/helpers/shopping/cart_items_helper_spec.rb
  233. +0 −15 spec/helpers/shopping/orders_helper_spec.rb
  234. +0 −15 spec/helpers/shopping/payments_helper_spec.rb
  235. +0 −15 spec/helpers/shopping/shipping_methods_helper_spec.rb
  236. +0 −15 spec/helpers/user_sessions_helper_spec.rb
  237. +0 −15 spec/helpers/wish_items_helper_spec.rb
  238. +0 −5 spec/models/account_spec.rb
  239. +0 −46 spec/models/address_spec.rb
  240. +0 −13 spec/models/address_type_spec.rb
  241. +0 −5 spec/models/batch_spec.rb
  242. +0 −5 spec/models/brand_spec.rb
  243. +0 −5 spec/models/cart_item_spec.rb
  244. +0 −5 spec/models/cart_spec.rb
  245. +0 −13 spec/models/country_spec.rb
  246. +0 −5 spec/models/image_spec.rb
  247. +0 −5 spec/models/invoice_spec.rb
  248. +0 −5 spec/models/item_type_spec.rb
  249. +0 −5 spec/models/order_item_spec.rb
  250. +0 −5 spec/models/order_spec.rb
  251. +0 −5 spec/models/payment_profile_spec.rb
  252. +0 −5 spec/models/payment_spec.rb
  253. +0 −5 spec/models/phone_spec.rb
  254. +0 −5 spec/models/phone_type_spec.rb
  255. +0 −5 spec/models/product_property_spec.rb
  256. +0 −5 spec/models/product_spec.rb
  257. +0 −5 spec/models/product_type_spec.rb
  258. +0 −6 spec/models/property_spec.rb
  259. +0 −6 spec/models/prototype_property_spec.rb
  260. +0 −11 spec/models/prototype_spec.rb
  261. +0 −54 spec/models/purchase_order_spec.rb
  262. +0 −5 spec/models/purchase_order_variant_spec.rb
  263. +0 −14 spec/models/role_spec.rb
  264. +0 −5 spec/models/shipment_spec.rb
  265. +0 −5 spec/models/shipping_category_spec.rb
  266. +0 −5 spec/models/shipping_method_spec.rb
  267. +0 −5 spec/models/shipping_rate_spec.rb
  268. +0 −5 spec/models/shipping_rate_type_spec.rb
  269. +0 −5 spec/models/shipping_zone_spec.rb
  270. +0 −13 spec/models/state_spec.rb
  271. +0 −5 spec/models/supplier_spec.rb
  272. +0 −5 spec/models/tax_rate_spec.rb
  273. +0 −5 spec/models/tax_status_spec.rb
  274. +0 −5 spec/models/transaction_account_spec.rb
  275. +0 −5 spec/models/transaction_ledger_spec.rb
  276. +0 −5 spec/models/transaction_spec.rb
  277. +0 −13 spec/models/user_role_spec.rb
  278. +0 −41 spec/models/user_spec.rb
  279. +0 −5 spec/models/variant_property_spec.rb
  280. +0 −5 spec/models/variant_spec.rb
  281. +0 −5 spec/models/variant_supplier_spec.rb
  282. +0 −9 spec/requests/accounts_spec.rb
  283. +0 −9 spec/requests/admin/config/admin_config_shipping_methods_spec.rb
  284. +0 −9 spec/requests/admin/config/admin_config_shipping_zones_spec.rb
  285. +0 −9 spec/requests/admin/merchandise/admin_merchandise_shipping_categories_spec.rb
  286. +0 −9 spec/requests/admin/order/admin_order_billing_addresses_spec.rb
  287. +0 −9 spec/requests/admin/order/admin_order_carts_spec.rb
  288. +0 −9 spec/requests/admin/order/admin_order_credit_cards_spec.rb
  289. +0 −9 spec/requests/admin/order/admin_order_products_spec.rb
  290. +0 −9 spec/requests/admin/order/admin_order_shipping_addresses_spec.rb
  291. +0 −9 spec/requests/admin/order/admin_order_shipping_methods_spec.rb
  292. +0 −9 spec/requests/admin/order/admin_order_users_spec.rb
  293. +0 −9 spec/requests/admins_spec.rb
  294. +0 −9 spec/requests/cart_items_spec.rb
  295. +0 −9 spec/requests/purchase_orders_spec.rb
  296. +0 −9 spec/requests/shipments_spec.rb
  297. +0 −9 spec/requests/shipping_rates_spec.rb
  298. +0 −9 spec/requests/shopping/shopping_addresses_spec.rb
  299. +0 −9 spec/requests/shopping/shopping_orders_spec.rb
  300. +0 −9 spec/requests/shopping/shopping_payments_spec.rb
Sorry, we could not display the entire diff because too many files (383) changed.
View
5 Gemfile
@@ -9,13 +9,11 @@ gem 'authlogic', "2.1.5"
gem 'cancan'#, '1.3.2'
gem 'compass', ">= 0.10.5"
-#gem 'declarative_authorization'
-#gem 'devise', '1.1.rc1'
-
gem 'fancy-buttons'
gem "friendly_id", "~> 3.0"
gem 'formtastic', "~> 1.1.0"# :git => 'git://github.com/justinfrench/formtastic.git', :branch => "rails3"
gem 'haml', ">= 3.0.13"#, ">= 3.0.4"#, "2.2.21"#,
+gem "jquery-rails"
gem 'memcache-client'
#gem 'mysql2'
@@ -72,7 +70,6 @@ group :test do
# gem 'spork'
# gem "launchy"
-
gem "ruby-debug19"
#gem "ruby-debug"
end
View
15 Gemfile.lock
@@ -46,10 +46,10 @@ GEM
autotest (4.3.2)
autotest-fsevent (0.2.3)
sys-uname
- autotest-growl (0.2.5)
+ autotest-growl (0.2.6)
autotest-rails-pure (4.1.0)
babosa (0.2.0)
- braintree (2.5.2)
+ braintree (2.6.0)
builder
builder (2.1.2)
cancan (1.3.4)
@@ -72,10 +72,12 @@ GEM
actionpack (>= 2.3.0)
activesupport (>= 2.3.0)
i18n (>= 0.4.0)
- friendly_id (3.1.6)
+ friendly_id (3.1.7)
babosa (~> 0.2.0)
- haml (3.0.13)
+ haml (3.0.18)
i18n (0.4.1)
+ jquery-rails (0.1.3)
+ rails (~> 3.0.0)
linecache19 (0.5.11)
ruby_core_source (>= 0.1.4)
mail (2.2.6.1)
@@ -98,7 +100,7 @@ GEM
rack (1.2.1)
rack-mount (0.6.13)
rack (>= 1.0.0)
- rack-test (0.5.4)
+ rack-test (0.5.5)
rack (>= 1.0)
rails (3.0.0)
actionmailer (= 3.0.0)
@@ -148,7 +150,7 @@ GEM
sunspot_rails (1.1.0)
sunspot (= 1.1.0)
sys-uname (0.8.4)
- thor (0.14.1)
+ thor (0.14.2)
treetop (1.4.8)
polyglot (>= 0.3.1)
tzinfo (0.3.23)
@@ -173,6 +175,7 @@ DEPENDENCIES
formtastic (~> 1.1.0)
friendly_id (~> 3.0)
haml (>= 3.0.13)
+ jquery-rails
memcache-client
paperclip
prawn
View
16 README
@@ -29,10 +29,20 @@ Configure your database.yml file (add the development and test database)
7. gem install compass
8. gem install fancy-buttons
+######compass install -r fancy-buttons -f fancy-buttons
+Open config/config.yml and change the encryption key and paypal or auth.net information
-######compass install -r fancy-buttons -f fancy-buttons
-create shipping_categories (just a name for use later)
+Once everything is setup, start up the server and direct it to
+admin/overviews
+
+write down the username/password and follow the directions.
+
+
+FYI:
+
+Shipping categories are categoryies based off price:
-Open config/config.yml and change the encryption key and paypal or auth.net information
+you might have two shipping categories (light items) & (heavy items)
+Have fun!!!
View
3 Rakefile
@@ -2,9 +2,6 @@
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
-
require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
Hadean::Application.load_tasks
View
12 app/controllers/admin/config/overviews_controller.rb
@@ -0,0 +1,12 @@
+class Admin::Config::OverviewsController < Admin::Config::BaseController
+ # GET /admin/config/overviews
+ # GET /admin/config/overviews.xml
+ def index
+ #@admin_config_overviews = Admin::Config::Overview.all
+
+ #respond_to do |format|
+ # format.html # index.html.erb
+ #end
+ end
+
+end
View
85 app/controllers/admin/config/shipping_categories_controller.rb
@@ -0,0 +1,85 @@
+class Admin::Config::ShippingCategoriesController < Admin::Config::BaseController
+ # GET /admin/merchandise/shipping_categories
+ # GET /admin/merchandise/shipping_categories.xml
+ def index
+ @shipping_categories = ShippingCategory.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ end
+ end
+
+ # GET /admin/merchandise/shipping_categories/1
+ # GET /admin/merchandise/shipping_categories/1.xml
+ def show
+ @shipping_category = ShippingCategory.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ end
+ end
+
+ # GET /admin/merchandise/shipping_categories/new
+ # GET /admin/merchandise/shipping_categories/new.xml
+ def new
+ form_info
+ @shipping_category = ShippingCategory.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ end
+ end
+
+ # GET /admin/merchandise/shipping_categories/1/edit
+ def edit
+ form_info
+ @shipping_category = ShippingCategory.find(params[:id])
+ end
+
+ # POST /admin/merchandise/shipping_categories
+ # POST /admin/merchandise/shipping_categories.xml
+ def create
+ @shipping_category = ShippingCategory.new(params[:shipping_category])
+
+ respond_to do |format|
+ if @shipping_category.save
+ format.html { redirect_to(admin_config_shipping_rates_path(), :notice => 'Shipping category was successfully created.') }
+ else
+ form_info
+ format.html { render :action => "new" }
+ end
+ end
+ end
+
+ # PUT /admin/merchandise/shipping_categories/1
+ # PUT /admin/merchandise/shipping_categories/1.xml
+ def update
+ @shipping_category = ShippingCategory.find(params[:id])
+
+ respond_to do |format|
+ if @shipping_category.update_attributes(params[:shipping_category])
+ format.html { redirect_to(admin_config_shipping_rates_path(), :notice => 'Shipping category was successfully updated.') }
+ else
+ form_info
+ format.html { render :action => "edit" }
+ end
+ end
+ end
+
+ # DELETE /admin/merchandise/shipping_categories/1
+ # DELETE /admin/merchandise/shipping_categories/1.xml
+ #def destroy
+ # @shipping_category = ShippingCategory.find(params[:id])
+ # # @shipping_category.destroy
+ #
+ # respond_to do |format|
+ # format.html { redirect_to(admin_merchandise_shipping_categories_url) }
+ # end
+ #end
+
+ private
+
+ def form_info
+
+ end
+end
View
32 app/controllers/admin/config/shipping_methods_controller.rb
@@ -24,11 +24,17 @@ def show
# GET /admin/config/shipping_methods/new
# GET /admin/config/shipping_methods/new.xml
def new
- @shipping_method = ShippingMethod.new
+
form_info
- respond_to do |format|
- format.html # new.html.erb
- format.xml { render :xml => @shipping_method }
+ if @shipping_zones.empty?
+ flash[:notice] = "You must create a Shipping Zone before you create a Shipping Method."
+ redirect_to new_admin_config_shipping_zone_path
+ else
+ @shipping_method = ShippingMethod.new
+ respond_to do |format|
+ format.html # new.html.erb
+ format.xml { render :xml => @shipping_method }
+ end
end
end
@@ -74,15 +80,15 @@ def update
# DELETE /admin/config/shipping_methods/1
# DELETE /admin/config/shipping_methods/1.xml
- def destroy
- @shipping_method = ShippingMethod.find(params[:id])
- @shipping_method.destroy
-
- respond_to do |format|
- format.html { redirect_to(admin_config_shipping_methods_url) }
- format.xml { head :ok }
- end
- end
+ #def destroy
+ # @shipping_method = ShippingMethod.find(params[:id])
+ # #@shipping_method.destroy
+ #
+ # respond_to do |format|
+ # format.html { redirect_to(admin_config_shipping_methods_url) }
+ # format.xml { head :ok }
+ # end
+ #end
private
View
26 app/controllers/admin/config/shipping_rates_controller.rb
@@ -20,21 +20,27 @@ def index
# GET /shipping_rates/1.xml
def show
@shipping_rate = ShippingRate.find(params[:id])
-
- respond_to do |format|
- format.html # show.html.erb
- format.xml { render :xml => @shipping_rate }
- end
+ respond_to do |format|
+ format.html # show.html.erb
+ end
end
# GET /shipping_rates/new
# GET /shipping_rates/new.xml
def new
- @shipping_rate = ShippingRate.new
form_info
- respond_to do |format|
- format.html # new.html.erb
- format.xml { render :xml => @shipping_rate }
+ if @shipping_categories.empty?
+ flash[:notice] = "You must create a Shipping Category before you create a Shipping Rate."
+ redirect_to new_admin_config_shipping_category_path
+ elsif @shipping_methods.empty?
+ flash[:notice] = "You must create a Shipping Method before you create a Shipping Rate."
+ redirect_to new_admin_config_shipping_method_path
+ else
+ @shipping_rate = ShippingRate.new
+ respond_to do |format|
+ format.html # new.html.erb
+ format.xml { render :xml => @shipping_rate }
+ end
end
end
@@ -52,11 +58,9 @@ def create
respond_to do |format|
if @shipping_rate.save
format.html { redirect_to(admin_config_shipping_rate_url(@shipping_rate), :notice => 'Shipping rate was successfully created.') }
- format.xml { render :xml => @shipping_rate, :status => :created, :location => @shipping_rate }
else
form_info
format.html { render :action => "new" }
- format.xml { render :xml => @shipping_rate.errors, :status => :unprocessable_entity }
end
end
end
View
7 app/controllers/admin/merchandise/products_controller.rb
@@ -90,11 +90,12 @@ def destroy
private
def form_info
- @prototypes = Prototype.all.collect{|pt| [pt.name, pt.id]}
- @all_properties = Property.all
- @select_product_types = ProductType.all.collect{|pt| [pt.name, pt.id]}
+ @prototypes = Prototype.all.collect{|pt| [pt.name, pt.id]}
+ @all_properties = Property.all
+ @select_product_types = ProductType.all.collect{|pt| [pt.name, pt.id]}
#@all_shipping_rates = ShippingRate.all#.collect {|sr| [sr.name, sr.id]}
@select_shipping_category = ShippingCategory.all.collect {|sc| [sc.name, sc.id]}
+ @select_tax_status = TaxStatus.all.collect {|ts| [ts.name, ts.id]}
end
end
View
83 app/controllers/admin/merchandise/shipping_categories_controller.rb
@@ -1,83 +0,0 @@
-class Admin::Merchandise::ShippingCategoriesController < ApplicationController
- # GET /admin/merchandise/shipping_categories
- # GET /admin/merchandise/shipping_categories.xml
- def index
- @admin_merchandise_shipping_categories = Admin::Merchandise::ShippingCategory.all
-
- respond_to do |format|
- format.html # index.html.erb
- format.xml { render :xml => @admin_merchandise_shipping_categories }
- end
- end
-
- # GET /admin/merchandise/shipping_categories/1
- # GET /admin/merchandise/shipping_categories/1.xml
- def show
- @admin_merchandise_shipping_category = Admin::Merchandise::ShippingCategory.find(params[:id])
-
- respond_to do |format|
- format.html # show.html.erb
- format.xml { render :xml => @admin_merchandise_shipping_category }
- end
- end
-
- # GET /admin/merchandise/shipping_categories/new
- # GET /admin/merchandise/shipping_categories/new.xml
- def new
- @admin_merchandise_shipping_category = Admin::Merchandise::ShippingCategory.new
-
- respond_to do |format|
- format.html # new.html.erb
- format.xml { render :xml => @admin_merchandise_shipping_category }
- end
- end
-
- # GET /admin/merchandise/shipping_categories/1/edit
- def edit
- @admin_merchandise_shipping_category = Admin::Merchandise::ShippingCategory.find(params[:id])
- end
-
- # POST /admin/merchandise/shipping_categories
- # POST /admin/merchandise/shipping_categories.xml
- def create
- @admin_merchandise_shipping_category = Admin::Merchandise::ShippingCategory.new(params[:admin_merchandise_shipping_category])
-
- respond_to do |format|
- if @admin_merchandise_shipping_category.save
- format.html { redirect_to(@admin_merchandise_shipping_category, :notice => 'Shipping category was successfully created.') }
- format.xml { render :xml => @admin_merchandise_shipping_category, :status => :created, :location => @admin_merchandise_shipping_category }
- else
- format.html { render :action => "new" }
- format.xml { render :xml => @admin_merchandise_shipping_category.errors, :status => :unprocessable_entity }
- end
- end
- end
-
- # PUT /admin/merchandise/shipping_categories/1
- # PUT /admin/merchandise/shipping_categories/1.xml
- def update
- @admin_merchandise_shipping_category = Admin::Merchandise::ShippingCategory.find(params[:id])
-
- respond_to do |format|
- if @admin_merchandise_shipping_category.update_attributes(params[:admin_merchandise_shipping_category])
- format.html { redirect_to(@admin_merchandise_shipping_category, :notice => 'Shipping category was successfully updated.') }
- format.xml { head :ok }
- else
- format.html { render :action => "edit" }
- format.xml { render :xml => @admin_merchandise_shipping_category.errors, :status => :unprocessable_entity }
- end
- end
- end
-
- # DELETE /admin/merchandise/shipping_categories/1
- # DELETE /admin/merchandise/shipping_categories/1.xml
- def destroy
- @admin_merchandise_shipping_category = Admin::Merchandise::ShippingCategory.find(params[:id])
- @admin_merchandise_shipping_category.destroy
-
- respond_to do |format|
- format.html { redirect_to(admin_merchandise_shipping_categories_url) }
- format.xml { head :ok }
- end
- end
-end
View
1 app/controllers/admin/merchandise/variants_controller.rb
@@ -11,6 +11,7 @@ def index
@variants.per_page, #params[:page],
@variants.current_page, #params[:rows],
@variants.total_entries)
+
}
end
end
View
5 app/controllers/admin/order/base_controller.rb
@@ -28,7 +28,7 @@ def new_admin_cart
:billing_address => nil,
:coupon => nil,
:shipping_method => nil,
- :variants => {}# the key is variant_id , a hash of {variant, shipping_rate, quantity, tax_rate, total, shipping_category_id}
+ :order_items => {}# the key is variant_id , a hash of {variant, shipping_rate, quantity, tax_rate, total, shipping_category_id}
}
# variants => [
@@ -39,14 +39,15 @@ def new_admin_cart
def next_admin_cart_form()
# if cart is empty
+ session_admin_cart[:order_items] = {}
if session_admin_cart[:user].nil?
return admin_order_users_url
elsif session_admin_cart[:shipping_address].nil?
return admin_order_shipping_addresses_url
elsif session_admin_cart[:billing_address].nil?
return admin_order_billing_addresses_url()
elsif session_admin_cart[:order_items].blank?
- #session_admin_cart[:order_items] = {}
+
return admin_order_products_url()
elsif session_admin_cart[:shipping_rate].nil?
return admin_order_shipping_methods_url()
View
18 app/controllers/admin/overviews_controller.rb
@@ -1,11 +1,13 @@
class Admin::OverviewsController < ApplicationController
# GET /admin/overviews
# GET /admin/overviews.xml
- layout 'admin'
+ layout false
def index
# The index action should
- if User.first
+ if u = User.first
+ debugger
+ u
redirect_to root_url if !current_user || !current_user.admin?
else
@@ -15,15 +17,17 @@ def index
@user = User.new(:first_name => 'Admin',
:last_name => 'User',
- :email => 'admin@not_a_real_email.com',
+ :email => 'admin@notarealemail.com',
:password => @password,
:password_confirmation => @password)
@user.role_ids = Role.all.collect{|r| r.id }
- debugger
- @current_user = @user.save
+ if @user.activate!
- debugger
- @current_user
+ @user_session = UserSession.new(:email => @user.email, :password => @password)
+ us = @user_session.save
+ debugger
+ @user_session
+ end
end
end
View
2 app/controllers/shopping/orders_controller.rb
@@ -60,6 +60,8 @@ def update
render :action => "failure"
end
else
+ ### Take this
+ flash[:error] = "Could not process the Credit Card."
render :action => 'index'
end
else
View
2 app/helpers/admin/config/overviews_helper.rb
@@ -0,0 +1,2 @@
+module Admin::Config::OverviewsHelper
+end
View
3 app/models/address.rb
@@ -16,6 +16,7 @@ class Address < ActiveRecord::Base
validates :state_name, :presence => true, :if => Proc.new { |address| address.state_id.blank? }
validates :zip_code, :presence => true
#validates :phone_id, :presence => true
+ before_validation :sanitize_data
#accepts_nested_attributes_for :phones
@@ -104,7 +105,7 @@ def sanitize_data
self.first_name = self.first_name.strip unless self.first_name.blank?
self.last_name = self.last_name.strip unless self.last_name.blank?
self.city = self.city.strip unless self.city.blank?
- self.zip_code = self.zipcode.strip unless self.zipcode.blank?
+ self.zip_code = self.zip_code.strip unless self.zip_code.blank?
#self.phone = self.phone.strip unless self.phone.blank?
self.address1 = self.address1.strip unless self.address1.blank?
self.address2 = self.address2.strip unless self.address2.blank?
View
1 app/models/shipping_rate.rb
@@ -1,7 +1,6 @@
class ShippingRate < ActiveRecord::Base
include ActionView::Helpers::NumberHelper
- belongs_to :shipping_category
belongs_to :shipping_method
belongs_to :shipping_rate_type
View
6 app/models/tax_status.rb
@@ -5,11 +5,15 @@ class TaxStatus < ActiveRecord::Base
#FOOD = 'Food'
CLOTHES = 'Clothes'
COSMETICS = 'Cosmetics'
+ STANDARD = 'Standard'
+ FOOD = 'Food'
- STATUSES = [CLOTHES, COSMETICS]
+ STATUSES = [CLOTHES, COSMETICS, STANDARD, FOOD]
CLOTHES_ID = 1
COSMETICS_ID = 2
+ STANDARD_ID = 3
+ FOOD_ID = 4
validates :name, :presence => true, :uniqueness => true
end
View
6 app/models/variant.rb
@@ -29,11 +29,11 @@ def shipping_category_id
end
def display_property_details(separator = '<br/>')
- property_details.inject {|detail| detail.join(separator) }.join(': ')
+ property_details.join(separator)
end
- def property_details
- variant_properties.collect {|vp| [vp.property.display_name ,vp.description] }
+ def property_details(separator = ': ')
+ variant_properties.collect {|vp| [vp.property.display_name ,vp.description].join(separator) }
end
def product_name
View
16 app/stylesheets/ie.scss
@@ -1,4 +1,16 @@
@import "blueprint";
-// Generate the blueprint IE-specific customizations:
-@include blueprint-ie;
+// To generate css equivalent to the blueprint css but with your configuration applied, uncomment:
+// +blueprint-ie
+
+//Recommended Blueprint configuration with scoping and semantic layout:
+body.bp {
+ @include blueprint-ie(true);
+ // Note: Blueprint centers text to fix IE6 container centering.
+ // This means all your texts will be centered under all version of IE by default.
+ // If your container does not have the .container class, don't forget to restore
+ // the correct behavior to your main container (but not the body tag!)
+ // Example:
+ // .my-container
+ // text-align: left
+}
View
8 app/stylesheets/partials/_base.scss
@@ -2,9 +2,9 @@
// Feel free to delete these if you want keep the defaults:
$blueprint-grid-columns: 24;
-$blueprint-grid-width: 30px;
+$blueprint-container-size: 950px;
$blueprint-grid-margin: 10px;
-// If you change your grid column dimensions
-// you can make a new grid background image from the command line like this:
-// compass grid-img 30+10x16
+// Use this to calculate the width based on the total width.
+// Or you can set !blueprint_grid_width to a fixed value and unset !blueprint_container_size -- it will be calculated for you.
+$blueprint-grid-width: ($blueprint-container-size + $blueprint-grid-margin) / $blueprint-grid-columns - $blueprint-grid-margin;
View
10 app/stylesheets/print.scss
@@ -1,7 +1,13 @@
@import "blueprint";
-// Generate the blueprint print styles:
-@include blueprint-print;
+//Recommended Blueprint configuration with scoping and semantic layout:
+body.bp {
+ @include blueprint-print(true); }
+
+
+
+ // Generate the blueprint print styles:
+// @include blueprint-print;
@mixin header-image {
View
9 app/stylesheets/screen.scss
@@ -1,12 +1,19 @@
// This import applies a global reset to any page that imports this stylesheet.
@import "blueprint/reset";
-// To configure blueprint, edit the partials/_base.sass file.
+// To configure blueprint, edit the partials/base.sass file.
@import "partials/base";
// Import all the default blueprint modules so that we can access their mixins.
@import "blueprint";
+// Combine the partials into a single screen stylesheet.
+@import "partials/page";
+@import "partials/form";
+@import "partials/two_col";
+
+
+// drhenner
// Import the non-default scaffolding module.
@import "blueprint/scaffolding";
View
9 app/views/admin/config/_sub_header.html.erb
@@ -0,0 +1,9 @@
+<% content_for :header_sub_bar do -%>
+ <%= link_to 'Accounts', admin_config_accounts_path %> |
+ <%= link_to 'Shipping Zones', admin_config_shipping_zones_path %> |
+ <%= link_to 'Shipping Methods', admin_config_shipping_methods_path %> |
+ <%= link_to 'Shipping Rates', admin_config_shipping_rates_path %> |
+ <%= link_to 'Tax Rates', admin_config_tax_rates_path %> |
+ <%= link_to 'Tax Statuses', admin_config_tax_statuses_path %> |
+ <%= link_to 'Shipping Categories', admin_config_shipping_categories_path %>
+<% end %>
View
2 app/views/admin/config/accounts/_form.html.erb
@@ -1,4 +1,3 @@
-<%= form_for(:account, @account) do |f| %>
<% if @account.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@account.errors.count, "error") %> prohibited this account from being saved:</h2>
@@ -26,4 +25,3 @@
<div class="actions">
<%= f.submit %>
</div>
-<% end %>
View
5 app/views/admin/config/accounts/edit.html.erb
@@ -1,6 +1,9 @@
<h1>Editing account</h1>
-<%= render 'form' %>
+
+<%= semantic_form_for( @account, :as => :account, :url => admin_config_account_path(@account)) do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+<% end %>
<%= link_to 'Show', @account %> |
<%= link_to 'Back', accounts_path %>
View
8 app/views/admin/config/accounts/index.html.erb
@@ -7,21 +7,19 @@
<th>Active</th>
<th></th>
<th></th>
- <th></th>
</tr>
<% @accounts.each do |account| %>
<tr>
<td><%= account.account_type %></td>
<td><%= account.monthly_charge %></td>
<td><%= account.active %></td>
- <td><%= link_to 'Show', account %></td>
- <td><%= link_to 'Edit', edit_account_path(account) %></td>
- <td><%= link_to 'Destroy', account, :confirm => 'Are you sure?', :method => :delete %></td>
+ <td><%= link_to 'Show', admin_config_account_path(account) %></td>
+ <td><%= link_to 'Edit', edit_admin_config_account_path(account) %></td>
</tr>
<% end %>
</table>
<br />
-<%= link_to 'New Account', new_account_path %>
+<%= link_to 'New Account', new_admin_config_account_path %>
View
6 app/views/admin/config/accounts/new.html.erb
@@ -1,5 +1,9 @@
<h1>New account</h1>
-<%= render 'form' %>
+
+<%= semantic_form_for( @account, :as => :account, :url => admin_config_accounts_path) do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+<% end %>
+
<%= link_to 'Back', accounts_path %>
View
12 app/views/admin/config/overviews/index.html.erb
@@ -0,0 +1,12 @@
+
+
+<%= render :partial => '/admin/config/sub_header'%>
+
+<h1>Configuration</h1>
+
+
+
+
+<br />
+
+<%= link_to 'Config', admin_config_overviews_path %>
View
13 app/views/admin/config/shipping_categories/_form.html.erb
@@ -1,17 +1,20 @@
-<%= form_for(@admin_merchandise_shipping_category) do |f| %>
- <% if @admin_merchandise_shipping_category.errors.any? %>
+
+ <% if @shipping_category.errors.any? %>
<div id="error_explanation">
- <h2><%= pluralize(@admin_merchandise_shipping_category.errors.count, "error") %> prohibited this admin_merchandise_shipping_category from being saved:</h2>
+ <h2><%= pluralize(@shipping_category.errors.count, "error") %> prohibited this admin_merchandise_shipping_category from being saved:</h2>
<ul>
- <% @admin_merchandise_shipping_category.errors.full_messages.each do |msg| %>
+ <% @shipping_category.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
+
+ <div class="field">
+ <%= f.text_field :name %>
+ </div>
<div class="actions">
<%= f.submit %>
</div>
-<% end %>
View
9 app/views/admin/config/shipping_categories/edit.html.erb
@@ -1,6 +1,9 @@
-<h1>Editing admin_merchandise_shipping_category</h1>
+<h1>Editing Shipping Category <%= @shipping_category.name %> </h1>
-<%= render 'form' %>
-<%= link_to 'Show', @admin_merchandise_shipping_category %> |
+<%= form_for(@shipping_category, :url => admin_merchandise_shipping_category_path(@shipping_category)) do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+<% end %>
+
+<%= link_to 'Show', admin_merchandise_shipping_category_path(@shipping_category) %> |
<%= link_to 'Back', admin_merchandise_shipping_categories_path %>
View
14 app/views/admin/config/shipping_categories/index.html.erb
@@ -1,21 +1,19 @@
-<h1>Listing admin_merchandise_shipping_categories</h1>
+<h1>Shipping Categories</h1>
<table>
<tr>
- <th></th>
- <th></th>
+ <th>Name</th>
<th></th>
</tr>
-<% @admin_merchandise_shipping_categories.each do |admin_merchandise_shipping_category| %>
+<% @shipping_categories.each do |shipping_category| %>
<tr>
- <td><%= link_to 'Show', admin_merchandise_shipping_category %></td>
- <td><%= link_to 'Edit', edit_admin_merchandise_shipping_category_path(admin_merchandise_shipping_category) %></td>
- <td><%= link_to 'Destroy', admin_merchandise_shipping_category, :confirm => 'Are you sure?', :method => :delete %></td>
+ <td><%= shipping_category.name %></td>
+ <td><%= link_to 'Edit', edit_admin_config_shipping_category_path(shipping_category) %></td>
</tr>
<% end %>
</table>
<br />
-<%= link_to 'New Shipping category', new_admin_merchandise_shipping_category_path %>
+<%= link_to 'New Shipping category', new_admin_config_shipping_category_path %>
View
9 app/views/admin/config/shipping_categories/new.html.erb
@@ -1,5 +1,6 @@
-<h1>New admin_merchandise_shipping_category</h1>
+<h1>New Shipping Category</h1>
-<%= render 'form' %>
-
-<%= link_to 'Back', admin_merchandise_shipping_categories_path %>
+<%= form_for(@shipping_category, :url => admin_config_shipping_categories_path) do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+<% end %>
+<%= link_to 'Back', admin_config_shipping_categories_path %>
View
1 app/views/admin/config/shipping_categories/show.html.erb
@@ -1,5 +1,6 @@
<p id="notice"><%= notice %></p>
+<%= @shipping_category.name %><br/>
<%= link_to 'Edit', edit_admin_merchandise_shipping_category_path(@admin_merchandise_shipping_category) %> |
<%= link_to 'Back', admin_merchandise_shipping_categories_path %>
View
3 app/views/admin/config/shipping_methods/_form.html.erb
@@ -1,4 +1,4 @@
-<%= semantic_form_for(:shipping_method, @shipping_method, :url => admin_config_shipping_method_path) do |f| %>
+
<% if @shipping_method.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@shipping_method.errors.count, "error") %> prohibited this Shipping Method from being saved:</h2>
@@ -24,4 +24,3 @@
<div class="actions">
<%= f.submit %>
</div>
-<% end %>
View
4 app/views/admin/config/shipping_methods/edit.html.erb
@@ -1,6 +1,8 @@
<h1>Editing Shipping Method</h1>
-<%= render 'form' %>
+<%= semantic_form_for(:shipping_method, @shipping_method, :url => admin_config_shipping_method_path(@shipping_method)) do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+<% end %>
<%= link_to 'Show', admin_config_shipping_method_path(@shipping_method) %> |
<%= link_to 'Back', admin_config_shipping_methods_path %>
View
1 app/views/admin/config/shipping_methods/index.html.erb
@@ -1,3 +1,4 @@
+<%= render :partial => '/admin/config/sub_header'%>
<h1>Shipping Methods</h1>
<table class='pretty_table'>
View
4 app/views/admin/config/shipping_methods/new.html.erb
@@ -1,5 +1,7 @@
<h1>New Shipping Method</h1>
-<%= render 'form' %>
+<%= semantic_form_for(:shipping_method, @shipping_method, :url => admin_config_shipping_methods_path) do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+<% end %>
<%= link_to 'Back', admin_config_shipping_methods_path %>
View
6 app/views/admin/config/shipping_rates/_form.html.erb
@@ -1,4 +1,3 @@
-<%= semantic_form_for(:shipping_rate, @shipping_rate, :url => admin_config_shipping_rate_path) do |f| %>
<% if @shipping_rate.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@shipping_rate.errors.count, "error") %> prohibited this shipping_rate from being saved:</h2>
@@ -22,14 +21,11 @@
<%= f.input :shipping_rate_type_id, :as => :select,
:collection => @shipping_rate_types %>
</div>
- <div class="field">
- <%= f.input :shipping_category_id %>
- </div>
+
<div class="field">
<%= f.input :shipping_category_id, :as => :select,
:collection => @shipping_categories %>
</div>
<div class="actions">
<%= f.submit %>
</div>
-<% end %>
View
4 app/views/admin/config/shipping_rates/edit.html.erb
@@ -1,6 +1,8 @@
<h1>Editing shipping_rate</h1>
-<%= render 'form' %>
+<%= semantic_form_for(:shipping_rate, @shipping_rate, :url => admin_config_shipping_rate_path) do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+<% end %>
<%= link_to 'Show', admin_config_shipping_rate_path(@shipping_rate) %> |
<%= link_to 'Back', admin_config_shipping_rates_path %>
View
1 app/views/admin/config/shipping_rates/index.html.erb
@@ -1,3 +1,4 @@
+<%= render :partial => '/admin/config/sub_header'%>
<h1>Shipping Rates</h1>
<table>
View
6 app/views/admin/config/shipping_rates/new.html.erb
@@ -1,5 +1,7 @@
-<h1>New shipping_rate</h1>
+<h1>New Shipping Rate</h1>
-<%= render 'form' %>
+<%= semantic_form_for(:shipping_rate, @shipping_rate, :url => admin_config_shipping_rates_path) do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+<% end %>
<%= link_to 'Back', admin_config_shipping_rates_path %>
View
4 app/views/admin/config/shipping_zones/_form.html.erb
@@ -1,5 +1,4 @@
-<% path_to_submit = @shipping_zone.new_record? ? admin_config_shipping_zones_path : admin_config_shipping_zone_path(@shipping_zone) %>
-<%= semantic_form_for(:shipping_zone, @shipping_zone, :url => path_to_submit) do |f| %>
+
<% if @shipping_zone.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@shipping_zone.errors.count, "error") %> prohibited this Shipping Zone from being saved:</h2>
@@ -18,4 +17,3 @@
<div class="actions">
<%= f.submit %>
</div>
-<% end %>
View
5 app/views/admin/config/shipping_zones/edit.html.erb
@@ -1,6 +1,9 @@
<h1>Editing Shipping Zone</h1>
-<%= render 'form' %>
+
+<%= form_for(@shipping_zone, :as => :shipping_zone, :url => admin_config_shipping_zone_path(@shipping_zone)) do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+<% end %>
<%= link_to 'Show', admin_config_shipping_zone_path(@shipping_zone) %> |
<%= link_to 'Back', admin_config_shipping_zones_path %>
View
2 app/views/admin/config/shipping_zones/index.html.erb
@@ -1,3 +1,5 @@
+<%= render :partial => '/admin/config/sub_header'%>
+
<h1> Shipping Zones</h1>
<table class='span-12'>
View
5 app/views/admin/config/shipping_zones/new.html.erb
@@ -1,5 +1,8 @@
<h1>New Shipping Zone</h1>
-<%= render 'form' %>
+
+<%= form_for(@shipping_zone, :as => :shipping_zone, :url => admin_config_shipping_zones_path()) do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+<% end %>
<%= link_to 'Back', admin_config_shipping_zones_path %>
View
3 app/views/admin/config/tax_rates/_form.html.erb
@@ -1,6 +1,4 @@
-<% path_to_submit = @tax_rate.new_record? ? admin_config_tax_rates_path : admin_config_tax_rate_path(@tax_rate) %>
-<%= form_for(:tax_rate, @tax_rate, :url => path_to_submit) do |f| %>
<% if @tax_rate.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@tax_rate.errors.count, "error") %> prohibited this tax_rate from being saved:</h2>
@@ -40,4 +38,3 @@
<div class="actions">
<%= f.submit %>
</div>
-<% end %>
View
8 app/views/admin/config/tax_rates/edit.html.erb
@@ -1,6 +1,8 @@
-<h1>Editing tax_rate</h1>
+<h1>Editing (<%= @tax_rate.state.abbreviation %> <%= @tax_rate.tax_status.name %>) Tax Rate</h1>
-<%= render 'form' %>
+<%= form_for(@tax_rate, :as => :tax_rate, :url => admin_config_tax_rate_path(@tax_rate)) do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+<% end %>
-<%= link_to 'Show', admin_config_tax_rate(@tax_rate) %> |
+<%= link_to 'Show', admin_config_tax_rate_path(@tax_rate) %> |
<%= link_to 'Back', admin_config_tax_rates_path %>
View
2 app/views/admin/config/tax_rates/index.html.erb
@@ -1,3 +1,5 @@
+<%= render :partial => '/admin/config/sub_header'%>
+
<h1>Tax Rates</h1>
<table>
View
4 app/views/admin/config/tax_rates/new.html.erb
@@ -1,5 +1,7 @@
<h1>New tax_rate</h1>
-<%= render 'form' %>
+<%= form_for(@tax_rate, :as => :tax_rate, :url => admin_config_tax_rates_path()) do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+<% end %>
<%= link_to 'Back', admin_config_tax_rates_path %>
View
3 app/views/admin/config/tax_statuses/_form.html.erb
@@ -1,6 +1,4 @@
-<% path_to_submit = @tax_status.new_record? ? admin_config_tax_statuses_path : admin_config_tax_status_path(@tax_status) %>
-<%= form_for(:tax_status, @tax_status, :url => path_to_submit) do |f| %>
<% if @tax_status.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@tax_status.errors.count, "error") %> prohibited this tax_status from being saved:</h2>
@@ -20,4 +18,3 @@
<div class="actions">
<%= f.submit %>
</div>
-<% end %>
View
7 app/views/admin/config/tax_statuses/edit.html.erb
@@ -1,6 +1,9 @@
<h1>Editing tax_status</h1>
-<%= render 'form' %>
-<%= link_to 'Show', admin_config_tax_status(@tax_status) %> |
+<%= form_for(@tax_status, :as => :tax_status, :url => admin_config_tax_statuses_path(@tax_status)) do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+<% end %>
+
+<%= link_to 'Show', admin_config_tax_status_path(@tax_status) %> |
<%= link_to 'Back', admin_config_tax_statuses_path %>
View
2 app/views/admin/config/tax_statuses/index.html.erb
@@ -1,3 +1,5 @@
+<%= render :partial => '/admin/config/sub_header'%>
+
<h1>Tax Statuses</h1>
<table>
View
5 app/views/admin/config/tax_statuses/new.html.erb
@@ -1,5 +1,8 @@
<h1>New tax_status</h1>
-<%= render 'form' %>
+
+<%= form_for(@tax_status, :as => :tax_status, :url => admin_config_tax_status_path()) do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+<% end %>
<%= link_to 'Back', admin_config_tax_statuses_path %>
View
24 app/views/admin/generic/shipping_categories/index.html.erb
@@ -1,2 +1,22 @@
-<h1>Admin::Generic::ShippingCategories#:index,</h1>
-<p>Find me in app/views/admin/generic/shipping_categories/:index,.html.erb</p>
+<%= render :partial => '/admin/config/sub_header'%>
+<h1>Shipping Categories</h1>
+
+<table>
+ <tr>
+ <th>Name</th>
+ <th></th>
+ <th></th>
+ </tr>
+
+<% @tax_statuses.each do |tax_status| %>
+ <tr>
+ <td><%= tax_status.name %></td>
+ <td><%= link_to 'Show', admin_config_tax_status_path(tax_status) %></td>
+ <td><%= link_to 'Edit', edit_admin_config_tax_status_path(tax_status) %></td>
+ </tr>
+<% end %>
+</table>
+
+<br />
+
+<%= link_to 'New Tax status', new_admin_config_tax_status_path %>
View
10 app/views/admin/merchandise/products/_form.erb
@@ -62,10 +62,18 @@
<%= form.label :shipping_category %>
</div>
- @select_shipping_category
<div class='span-6 last'>
<%= form.select :shipping_category_id, @select_shipping_category %>
</div>
+
+<div class='clear'></div>
+ <div class='span-3'>
+ <%= form.label :tax_status %>
+ </div>
+
+ <div class='span-6 last'>
+ <%= form.select :tax_status_id, @select_tax_status %>
+ </div>
<%#= render :partial => 'admin/merchandise/products/shipping_rates_form' %>
</fieldset>
View
4 app/views/admin/merchandise/products/edit.erb
@@ -1,4 +1,8 @@
<h2>Edit Product</h2>
+<%= link_to 'Add Image', edit_admin_merchandise_images_product_path(@product), :class => 'button light' %>
+
+<%= link_to 'Variants', admin_merchandise_product_variants_path(@product), :class => 'button light' %>
+
<%= form_for :product, @product, :url => admin_merchandise_product_path(@product),
:html => {:class => 'prepend-6'} do |form| %>
View
3 app/views/admin/order/products/_form.html.erb
@@ -1,4 +1,4 @@
-<%= form_for(:product, @admin_order_product) do |f| %>
+
<% if @admin_order_product.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@admin_order_product.errors.count, "error") %> prohibited this admin_order_product from being saved:</h2>
@@ -14,4 +14,3 @@
<div class="actions">
<%= f.submit %>
</div>
-<% end %>
View
7 app/views/admin/order/products/new.html.erb
@@ -1,5 +1,6 @@
-<h1>New admin_order_product</h1>
-
-<%= render 'form' %>
+<h1>New Product</h1>
+<%= form_for( @product, :as => :product, :url => admin_order_products_path) do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+<% end %>
<%= link_to 'Back', admin_order_products_path %>
View
11 app/views/admin/overviews/index.html.erb
@@ -8,10 +8,11 @@
<div id='setup_hadean' style='text-align:left;'>
<ol class='roman-list'>
- <li>Getting started. First create properties. A property is just a characteristic that your products have.</li>
- <li>Next create a prototype. A prototype is the building block of a product. The prototype is used to inherit the types of properties that your products will have.</li>
- <li>Next create a product</li>
- <li>Next create a variant. A variant is a specific type of product. If Diet Gatorade is your product, Fruit Punch Gatorage might be your variant. </li>
- <li>Next you could upload images.</li>
+ <li>Go to <%= link_to 'Config', admin_config_overviews_path %> and click on every option in the sub-header.</li>
+ <li>Then create <%= link_to 'Properties', admin_merchandise_properties_path %>. A property is just a characteristic that your products have.</li>
+ <li>Next create a <%= link_to 'Prototype', admin_merchandise_prototypes_path %>. A prototype is the building block of a product. The prototype is used to inherit the types of properties that your products will have.</li>
+ <li>Next create a <%= link_to 'Product', admin_merchandise_products_path %></li>
+ <li>Next create a <%= link_to 'Variant', admin_merchandise_variants_path %>. A variant is a specific type of product. If Diet Gatorade is your product, Fruit Punch Gatorage might be your variant. </li>
+ <li>Next you could upload <%= link_to 'Images', admin_merchandise_images_products_path %>.</li>
</ol>
</div>
View
2 app/views/admin/users/edit.html.erb
@@ -1,6 +1,6 @@
<h1>Edit <%= @user.name %> </h1>
-<%= semantic_form_for :user, @user, :url => admin_user_path(@user) do |form| %>
+<%= semantic_form_for @user, :as => :user, :url => admin_user_path(@user) do |form| %>
<%= form.inputs do %>
<%= render :partial => '/admin/users/form', :locals => {:form => form} %>
<% end %>
View
2 app/views/admin/users/index.html.erb
@@ -20,7 +20,7 @@
[
{ :field => "first_name", :label => "First name", :width => 80, :resizable => false },
{ :field => "last_name", :label => "Last", :width => 80, :resizable => false },
- { :field => "email", :label => "Email", :width => 355, :resizable => false },
+ { :field => "email", :label => "Email", :width => 195, :resizable => false },
{ :field => "state", :label => "State", :width => 70, :resizable => false }
],
{
View
17 app/views/layouts/admin.html.erb
@@ -3,16 +3,17 @@
<head>
<title>Hadean</title>
<%= stylesheet_link_tag :all %>
- <%= stylesheet_link_tag 'compiled/buttons.css', :media => 'screen, projection' %>
- <%= stylesheet_link_tag 'compiled/screen.css', :media => 'screen, projection' %>
- <%= stylesheet_link_tag 'compiled/print.css', :media => 'print'%>
- <%= stylesheet_link_tag 'compiled/main.css' %>
+ <%= stylesheet_link_tag 'buttons.css', :media => 'screen, projection' %>
+ <%= stylesheet_link_tag 'screen.css', :media => 'screen, projection' %>
+ <%= stylesheet_link_tag 'print.css', :media => 'print'%>
+ <%= stylesheet_link_tag 'main.css' %>
<!--[if lt IE 8]
- <%= stylesheet_link_tag 'compiled/ie.css', :media => 'screen, projection'%>
+ <%= stylesheet_link_tag 'ie.css', :media => 'screen, projection'%>
<![endif]-->
<%= csrf_meta_tag %>
- <%= javascript_include_tag 'jquery-1.4.2.min', 'jquery-ujs/src/rails', 'jquery-ui-1.8.4.custom.min','application' %>
+ <%#= javascript_include_tag 'jquery-1.4.2.min', 'jquery-ujs/src/rails', 'jquery-ui-1.8.4.custom.min','application' %>
+ <%= javascript_include_tag 'jquery-1.4.2.min', 'rails', 'jquery-ui-1.8.4.custom.min','application' %>
<%= yield :head %>
</head>
<body class="bp">
@@ -34,7 +35,6 @@
</div>
</div>
</div>
-
<div id='header_bar' class='float-left'>
<%= link_to 'Orders', admin_order_carts_path, :class => 'button spade inline-block', :id => 'admin_orders_button' %>
<%= link_to 'Merchandise', admin_merchandise_path, :class => 'button spade inline-block', :id => 'merchandise_button' %>
@@ -46,10 +46,11 @@
:class => "button spade inline-block",
:id => "admin_users_button" %>
- <%= link_to "Setup", admin_config_overviews_path,
+ <%= link_to "Config", admin_config_overviews_path,
:class => "button spade inline-block",
:id => "admin_users_button" %>
</div>
+
<div id='header_sub_bar'>
<%= yield :header_sub_bar %>
</div>
View
12 app/views/layouts/admin_cart.html.erb
@@ -3,16 +3,16 @@
<head>
<title>Hadean</title>
<%= stylesheet_link_tag :all %>
- <%= stylesheet_link_tag 'compiled/buttons.css', :media => 'screen, projection' %>
- <%= stylesheet_link_tag 'compiled/screen.css', :media => 'screen, projection' %>
- <%= stylesheet_link_tag 'compiled/print.css', :media => 'print'%>
- <%= stylesheet_link_tag 'compiled/main.css' %>
+ <%= stylesheet_link_tag 'buttons.css', :media => 'screen, projection' %>
+ <%= stylesheet_link_tag 'screen.css', :media => 'screen, projection' %>
+ <%= stylesheet_link_tag 'print.css', :media => 'print'%>
+ <%= stylesheet_link_tag 'main.css' %>
<!--[if lt IE 8]
- <%= stylesheet_link_tag 'compiled/ie.css', :media => 'screen, projection'%>
+ <%= stylesheet_link_tag 'ie.css', :media => 'screen, projection'%>
<![endif]-->
<%= csrf_meta_tag %>
- <%= javascript_include_tag 'jquery-1.4.2.min', 'jquery-ujs/src/rails', 'jquery-ui-1.8.4.custom.min','application' %>
+ <%= javascript_include_tag 'jquery-1.4.2.min', 'rails', 'jquery-ui-1.8.4.custom.min','application' %>
<%= yield :head %>
</head>
<body class="bp">
View
16 app/views/layouts/application.html.erb
@@ -3,19 +3,19 @@
<head>
<title>Hadean</title>
<%= stylesheet_link_tag :all %>
- <%= stylesheet_link_tag 'compiled/buttons.css', :media => 'screen, projection' %>
- <%= stylesheet_link_tag 'compiled/screen.css', :media => 'screen, projection' %>
- <%= stylesheet_link_tag 'compiled/link_icons.css', :media => 'screen, projection' %>
+ <%= stylesheet_link_tag 'buttons.css', :media => 'screen, projection' %>
+ <%= stylesheet_link_tag 'screen.css', :media => 'screen, projection' %>
+ <%= stylesheet_link_tag 'link_icons.css', :media => 'screen, projection' %>
<%= stylesheet_link_tag 'sprite.css' %>
- <%= stylesheet_link_tag 'compiled/print.css', :media => 'print'%>
- <%= stylesheet_link_tag 'compiled/main.css' %>
+ <%= stylesheet_link_tag 'print.css', :media => 'print'%>
+ <%= stylesheet_link_tag 'main.css' %>
<!--[if lt IE 8]
- <%= stylesheet_link_tag 'compiled/ie.css', :media => 'screen, projection'%>
+ <%= stylesheet_link_tag 'ie.css', :media => 'screen, projection'%>
<![endif]-->
<%= csrf_meta_tag %>
<%#= javascript_include_tag :defaults %>
- <%#= javascript_include_tag 'jquery-1.4.2.min', 'rails' %>
- <%= javascript_include_tag 'jquery-1.4.2.min', 'jquery-ujs/src/rails', 'jquery-ui-1.8.4.custom.min','application' %>
+ <%= javascript_include_tag 'jquery-1.4.2.min', 'rails', 'jquery-ui-1.8.4.custom.min','application', :cache => 'all_1' %>
+ <%#= javascript_include_tag 'jquery-1.4.2.min', 'jquery-ujs/src/rails', 'jquery-ui-1.8.4.custom.min','application' %>
<%= yield :head %>
</head>
View
10 app/views/shopping/orders/index.html.erb
@@ -1,5 +1,5 @@
<% content_for :head do -%>
- <%= stylesheet_link_tag 'compiled/tables.css' %>
+ <%= stylesheet_link_tag 'tables.css' %>
<% end %>
<div id='order-wrapper' class='span-24'>
<div class='span-14'>
@@ -15,12 +15,12 @@
<% end %>
</div>
- <div id='final-order-shipping-address' class='box span-6' style='text-align:left;'>
+ <div id='final-order-shipping-address' class='box span-6 rounded-4' style='text-align:left;'>
<h5>Shipping Address</h5>
<%= render :partial => '/shared/compact_address', :locals => {:shopping_address => @order.ship_address} %>
<%= link_to 'Change address', shopping_addresses_path, :class => 'button green' %>
</div>
- <div id='final-order-shipping-address' class='box span-6' style='text-align:left;'>
+ <div id='final-order-shipping-address' class='box span-6 rounded-8 last' style='text-align:left;'>
<h5>Billing Address</h5>
<%= render :partial => '/shared/compact_address', :locals => {:shopping_address => @order.bill_address} %>
</div>
@@ -54,9 +54,9 @@
</table>
<div>
</div>
- <%= form_tag(:order, shopping_order_path(@order),
+ <%= form_tag( shopping_order_path(@order),
:method => :put,
- :as => :order,
+ #:as => :order,
:id => 'purchase_order') do %>
View
2 autotest/discover.rb
@@ -1,2 +0,0 @@
-Autotest.add_discovery { "rails" }
-Autotest.add_discovery { "rspec2" }
View
44 config/application.rb
@@ -12,55 +12,37 @@ class Application < Rails::Application
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
- # Add additional load paths for your own custom dirs
- # config.load_paths += %W( #{config.root}/extras )
+ # Custom directories with classes and modules you want to be autoloadable.
+ # config.autoload_paths += %W(#{config.root}/extras)
# Only load the plugins named here, in the order given (default is alphabetical).
- # :all can be used as a placeholder for all plugins not explicitly named
+ # :all can be used as a placeholder for all plugins not explicitly named.
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
- # Activate observers that should always be running
+ # Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
- config.time_zone = 'Central Time (US & Canada)'
+ # config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
- # Configure generators values. Many other options are available, be sure to check the documentation.
- # config.generators do |g|