refinerycms-stores 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/app/controllers/refinery/products/products_controller.rb +2 -1
- data/app/controllers/refinery/stores/stores_controller.rb +2 -6
- data/app/controllers/refinery/stores_application_controller.rb +12 -0
- data/app/views/refinery/products/products/show.html.erb +62 -91
- data/app/views/refinery/stores/stores/_cart.html.erb +1 -1
- data/app/views/refinery/stores/stores/_list_product.html.erb +1 -1
- data/refinerycms-stores.gemspec +26 -1
- metadata +251 -162
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.6
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Refinery
|
2
2
|
module Stores
|
3
|
-
class StoresController < ::
|
3
|
+
class StoresController < ::Refinery::StoresApplicationController
|
4
4
|
|
5
5
|
before_filter :find_all_stores, :only => :index
|
6
6
|
before_filter :find_page, :except => [:index, :add_to_cart, :empty_cart, :checkout]
|
@@ -55,11 +55,7 @@ module Refinery
|
|
55
55
|
redirect_to refinery.stores_store_path( find_first_store )
|
56
56
|
end
|
57
57
|
|
58
|
-
|
59
|
-
def find_cart
|
60
|
-
@cart = (session[:cart] ||= Cart.new)
|
61
|
-
end
|
62
|
-
|
58
|
+
|
63
59
|
protected
|
64
60
|
|
65
61
|
def find_first_store
|
@@ -3,103 +3,74 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :body_content_left do %>
|
6
|
-
<section>
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
</section>
|
66
|
-
<section>
|
67
|
-
<h1>Tax Type</h1>
|
68
|
-
<p>
|
69
|
-
<%=raw @product.tax_type %>
|
70
|
-
</p>
|
71
|
-
</section>
|
72
|
-
<section>
|
73
|
-
<h1>Digital Download</h1>
|
74
|
-
<p>
|
75
|
-
<%=raw @product.digital_download %>
|
76
|
-
</p>
|
77
|
-
</section>
|
78
|
-
<section>
|
79
|
-
<h1>Main Pic</h1>
|
80
|
-
<p>
|
81
|
-
<%=raw @product.main_pic %>
|
82
|
-
</p>
|
83
|
-
</section>
|
84
|
-
<section>
|
85
|
-
<h1>Inactive</h1>
|
86
|
-
<p>
|
87
|
-
<%=raw @product.inactive %>
|
88
|
-
</p>
|
6
|
+
<section id="product">
|
7
|
+
|
8
|
+
<div class="product_show">
|
9
|
+
|
10
|
+
<div class="product_photo">
|
11
|
+
|
12
|
+
<% if @product.main_pic_id -%>
|
13
|
+
<%= image_fu @product.main_pic, Refinery::Images.user_image_sizes[:large], :class => "product-pic", :alt => @product.name %>
|
14
|
+
<% else -%>
|
15
|
+
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="product_text">
|
21
|
+
|
22
|
+
<h2> <%= @product.name %> </h2>
|
23
|
+
<p>
|
24
|
+
<%= raw @product.description %>
|
25
|
+
</p>
|
26
|
+
|
27
|
+
</div>
|
28
|
+
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div class="product_spec">
|
32
|
+
|
33
|
+
<div class="product_code">
|
34
|
+
|
35
|
+
<p>
|
36
|
+
code: <%= @product.code %> <br/>
|
37
|
+
size:
|
38
|
+
<%= number_with_precision(@product.size_width, :precision => 1) %> x
|
39
|
+
<%= number_with_precision(@product.size_height, :precision => 1) %> x
|
40
|
+
<%= number_with_precision(@product.size_depth, :precision => 1) %> <br/>
|
41
|
+
weight:
|
42
|
+
<%= number_with_precision(@product.weight, :precision => 1) %> lbs
|
43
|
+
|
44
|
+
<% unless @product.digital_download_id.blank? %>
|
45
|
+
<i>digital download</i>
|
46
|
+
<% end -%>
|
47
|
+
</p>
|
48
|
+
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div class="product_pricebuy">
|
52
|
+
|
53
|
+
<p>
|
54
|
+
<%= number_to_currency(@product.price) %>
|
55
|
+
</p>
|
56
|
+
|
57
|
+
<div class="product-action">
|
58
|
+
<%= button_to( "add to cart", refinery.add_to_cart_stores_stores_path(:id => @product), :class => "add-to-cart" ) %>
|
59
|
+
</div>
|
60
|
+
|
61
|
+
</div>
|
62
|
+
|
63
|
+
</div>
|
64
|
+
|
89
65
|
</section>
|
66
|
+
|
90
67
|
<% end %>
|
91
68
|
|
92
69
|
<% content_for :body_content_right do %>
|
93
70
|
<aside>
|
94
|
-
|
95
|
-
<ul id="products">
|
96
|
-
<% @products.each do |product| %>
|
97
|
-
<li>
|
98
|
-
<%= link_to product.name, refinery.products_product_path(product) %>
|
99
|
-
</li>
|
100
|
-
<% end %>
|
101
|
-
</ul>
|
71
|
+
<%= render( :partial => "refinery/stores/stores/cart", :object => @cart ) %>
|
102
72
|
</aside>
|
73
|
+
|
103
74
|
<% end %>
|
104
75
|
|
105
76
|
<%= render '/refinery/content_page' %>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
</div>
|
9
9
|
|
10
10
|
<table>
|
11
|
-
<%= render(:partial => "cart_item", :collection => cart.items) %>
|
11
|
+
<%= render(:partial => "refinery/stores/stores/cart_item", :collection => cart.items) %>
|
12
12
|
<tr class="total-line">
|
13
13
|
<td colspan="2">Total</td>
|
14
14
|
<td class="total-cell"><%= number_to_currency(cart.total_price) %></td>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<dd>
|
10
10
|
<%= link_to( ( truncate( list_product.name, :length => 60 ) + " »" ).html_safe, refinery.products_product_path( list_product ) ) %>
|
11
11
|
<br/>
|
12
|
-
|
12
|
+
<%= number_to_currency(list_product.price) %>
|
13
13
|
<% # = button_to( "add to cart", refinery.add_to_cart_stores_stores_path(:id => list_product), :class => "add-to-cart" ) %>
|
14
14
|
|
15
15
|
</dd>
|
data/refinerycms-stores.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "refinerycms-stores"
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Daudi Amani"]
|
@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
|
|
30
30
|
"app/controllers/refinery/products/products_controller.rb",
|
31
31
|
"app/controllers/refinery/stores/admin/stores_controller.rb",
|
32
32
|
"app/controllers/refinery/stores/stores_controller.rb",
|
33
|
+
"app/controllers/refinery/stores_application_controller.rb",
|
33
34
|
"app/helpers/refinery/orders/orders_helper.rb",
|
34
35
|
"app/models/refinery/addresses/address.rb",
|
35
36
|
"app/models/refinery/orders/line_item.rb",
|
@@ -222,6 +223,14 @@ Gem::Specification.new do |s|
|
|
222
223
|
s.add_development_dependency(%q<rb-inotify>, [">= 0.5.1"])
|
223
224
|
s.add_development_dependency(%q<libnotify>, ["~> 0.1.3"])
|
224
225
|
s.add_development_dependency(%q<therubyracer>, [">= 0"])
|
226
|
+
s.add_development_dependency(%q<refinerycms-testing>, ["~> 2.0.0"])
|
227
|
+
s.add_development_dependency(%q<factory_girl_rails>, [">= 0"])
|
228
|
+
s.add_development_dependency(%q<generator_spec>, [">= 0"])
|
229
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
230
|
+
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
231
|
+
s.add_development_dependency(%q<rb-inotify>, [">= 0.5.1"])
|
232
|
+
s.add_development_dependency(%q<libnotify>, ["~> 0.1.3"])
|
233
|
+
s.add_development_dependency(%q<therubyracer>, [">= 0"])
|
225
234
|
else
|
226
235
|
s.add_dependency(%q<refinerycms-stores>, [">= 0"])
|
227
236
|
s.add_dependency(%q<refinerycms>, ["~> 2.0.0"])
|
@@ -303,6 +312,14 @@ Gem::Specification.new do |s|
|
|
303
312
|
s.add_dependency(%q<rb-inotify>, [">= 0.5.1"])
|
304
313
|
s.add_dependency(%q<libnotify>, ["~> 0.1.3"])
|
305
314
|
s.add_dependency(%q<therubyracer>, [">= 0"])
|
315
|
+
s.add_dependency(%q<refinerycms-testing>, ["~> 2.0.0"])
|
316
|
+
s.add_dependency(%q<factory_girl_rails>, [">= 0"])
|
317
|
+
s.add_dependency(%q<generator_spec>, [">= 0"])
|
318
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
319
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
320
|
+
s.add_dependency(%q<rb-inotify>, [">= 0.5.1"])
|
321
|
+
s.add_dependency(%q<libnotify>, ["~> 0.1.3"])
|
322
|
+
s.add_dependency(%q<therubyracer>, [">= 0"])
|
306
323
|
end
|
307
324
|
else
|
308
325
|
s.add_dependency(%q<refinerycms-stores>, [">= 0"])
|
@@ -385,6 +402,14 @@ Gem::Specification.new do |s|
|
|
385
402
|
s.add_dependency(%q<rb-inotify>, [">= 0.5.1"])
|
386
403
|
s.add_dependency(%q<libnotify>, ["~> 0.1.3"])
|
387
404
|
s.add_dependency(%q<therubyracer>, [">= 0"])
|
405
|
+
s.add_dependency(%q<refinerycms-testing>, ["~> 2.0.0"])
|
406
|
+
s.add_dependency(%q<factory_girl_rails>, [">= 0"])
|
407
|
+
s.add_dependency(%q<generator_spec>, [">= 0"])
|
408
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
409
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
410
|
+
s.add_dependency(%q<rb-inotify>, [">= 0.5.1"])
|
411
|
+
s.add_dependency(%q<libnotify>, ["~> 0.1.3"])
|
412
|
+
s.add_dependency(%q<therubyracer>, [">= 0"])
|
388
413
|
end
|
389
414
|
end
|
390
415
|
|