refinerycms-stores 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. data/Gemfile +26 -0
  2. data/Gemfile.lock +306 -0
  3. data/Guardfile +27 -0
  4. data/LICENSE.txt +20 -0
  5. data/Rakefile +65 -0
  6. data/VERSION +1 -0
  7. data/app/assets/stylesheets/refinery/refinerycms-stores.sass +76 -0
  8. data/app/controllers/refinery/addresses/admin/addresses_controller.rb +12 -0
  9. data/app/controllers/refinery/orders/admin/orders_controller.rb +12 -0
  10. data/app/controllers/refinery/orders/orders_controller.rb +96 -0
  11. data/app/controllers/refinery/products/admin/products_controller.rb +12 -0
  12. data/app/controllers/refinery/products/products_controller.rb +17 -0
  13. data/app/controllers/refinery/stores/admin/stores_controller.rb +12 -0
  14. data/app/controllers/refinery/stores/stores_controller.rb +80 -0
  15. data/app/helpers/refinery/orders/orders_helper.rb +11 -0
  16. data/app/models/refinery/addresses/address.rb +12 -0
  17. data/app/models/refinery/orders/line_item.rb +24 -0
  18. data/app/models/refinery/orders/order.rb +364 -0
  19. data/app/models/refinery/products/product.rb +17 -0
  20. data/app/models/refinery/stores/store.rb +33 -0
  21. data/app/views/refinery/addresses/admin/addresses/_actions.html.erb +25 -0
  22. data/app/views/refinery/addresses/admin/addresses/_address.html.erb +16 -0
  23. data/app/views/refinery/addresses/admin/addresses/_addresses.html.erb +2 -0
  24. data/app/views/refinery/addresses/admin/addresses/_form.html.erb +89 -0
  25. data/app/views/refinery/addresses/admin/addresses/_records.html.erb +18 -0
  26. data/app/views/refinery/addresses/admin/addresses/_sortable_list.html.erb +5 -0
  27. data/app/views/refinery/addresses/admin/addresses/edit.html.erb +1 -0
  28. data/app/views/refinery/addresses/admin/addresses/index.html.erb +7 -0
  29. data/app/views/refinery/addresses/admin/addresses/new.html.erb +1 -0
  30. data/app/views/refinery/orders/admin/orders/_actions.html.erb +25 -0
  31. data/app/views/refinery/orders/admin/orders/_form.html.erb +122 -0
  32. data/app/views/refinery/orders/admin/orders/_order.html.erb +20 -0
  33. data/app/views/refinery/orders/admin/orders/_orders.html.erb +2 -0
  34. data/app/views/refinery/orders/admin/orders/_records.html.erb +18 -0
  35. data/app/views/refinery/orders/admin/orders/_sortable_list.html.erb +5 -0
  36. data/app/views/refinery/orders/admin/orders/edit.html.erb +1 -0
  37. data/app/views/refinery/orders/admin/orders/index.html.erb +7 -0
  38. data/app/views/refinery/orders/admin/orders/new.html.erb +1 -0
  39. data/app/views/refinery/orders/orders/_address_form.html.haml +35 -0
  40. data/app/views/refinery/orders/orders/_card_form.html.haml +63 -0
  41. data/app/views/refinery/orders/orders/_order_snapshot.html.haml +44 -0
  42. data/app/views/refinery/orders/orders/confirmation.html.haml +26 -0
  43. data/app/views/refinery/orders/orders/edit.html.haml +36 -0
  44. data/app/views/refinery/orders/orders/index.html.haml +6 -0
  45. data/app/views/refinery/orders/orders/purchase.html.haml +25 -0
  46. data/app/views/refinery/orders/orders/show.html.haml +36 -0
  47. data/app/views/refinery/products/admin/products/_actions.html.erb +25 -0
  48. data/app/views/refinery/products/admin/products/_form.html.erb +127 -0
  49. data/app/views/refinery/products/admin/products/_product.html.erb +20 -0
  50. data/app/views/refinery/products/admin/products/_products.html.erb +2 -0
  51. data/app/views/refinery/products/admin/products/_records.html.erb +18 -0
  52. data/app/views/refinery/products/admin/products/_sortable_list.html.erb +5 -0
  53. data/app/views/refinery/products/admin/products/edit.html.erb +4 -0
  54. data/app/views/refinery/products/admin/products/index.html.erb +10 -0
  55. data/app/views/refinery/products/admin/products/new.html.erb +4 -0
  56. data/app/views/refinery/products/products/show.html.erb +105 -0
  57. data/app/views/refinery/stores/admin/stores/_actions.html.erb +57 -0
  58. data/app/views/refinery/stores/admin/stores/_form.html.erb +56 -0
  59. data/app/views/refinery/stores/admin/stores/_records.html.erb +18 -0
  60. data/app/views/refinery/stores/admin/stores/_sortable_list.html.erb +5 -0
  61. data/app/views/refinery/stores/admin/stores/_store.html.erb +20 -0
  62. data/app/views/refinery/stores/admin/stores/_stores.html.erb +2 -0
  63. data/app/views/refinery/stores/admin/stores/edit.html.erb +4 -0
  64. data/app/views/refinery/stores/admin/stores/index.html.erb +13 -0
  65. data/app/views/refinery/stores/admin/stores/new.html.erb +4 -0
  66. data/app/views/refinery/stores/stores/_cart.html.erb +22 -0
  67. data/app/views/refinery/stores/stores/_cart_item.html.erb +9 -0
  68. data/app/views/refinery/stores/stores/_list_product.html.erb +16 -0
  69. data/app/views/refinery/stores/stores/index.html.erb +11 -0
  70. data/app/views/refinery/stores/stores/show.html.erb +28 -0
  71. data/config/locales/en.yml +143 -0
  72. data/config/locales/es.yml +143 -0
  73. data/config/locales/fr.yml +139 -0
  74. data/config/locales/nb.yml +143 -0
  75. data/config/locales/nl.yml +143 -0
  76. data/config/routes.rb +81 -0
  77. data/db/migrate/1_create_stores_stores.rb +29 -0
  78. data/db/migrate/2_create_products_products.rb +44 -0
  79. data/db/migrate/3_create_orders_orders.rb +44 -0
  80. data/db/migrate/4_create_orders_line_items.rb +20 -0
  81. data/db/migrate/5_create_addresses_addresses.rb +39 -0
  82. data/db/seeds.rb +23 -0
  83. data/lib/generators/refinery/stores_generator.rb +17 -0
  84. data/lib/refinery/addresses/engine.rb +31 -0
  85. data/lib/refinery/addresses.rb +21 -0
  86. data/lib/refinery/cart.rb +36 -0
  87. data/lib/refinery/cart_item.rb +28 -0
  88. data/lib/refinery/orders/engine.rb +31 -0
  89. data/lib/refinery/orders.rb +21 -0
  90. data/lib/refinery/products/engine.rb +31 -0
  91. data/lib/refinery/products.rb +21 -0
  92. data/lib/refinery/store_gateway.rb +106 -0
  93. data/lib/refinery/stores/engine.rb +31 -0
  94. data/lib/refinery/stores.rb +21 -0
  95. data/lib/refinerycms-stores.rb +7 -0
  96. data/lib/tasks/refinery/stores.rake +13 -0
  97. data/readme.md +10 -0
  98. data/refinerycms-stores.gemspec +261 -0
  99. data/spec/models/refinery/addresses/address_spec.rb +18 -0
  100. data/spec/models/refinery/orders/order_spec.rb +18 -0
  101. data/spec/models/refinery/products/product_spec.rb +18 -0
  102. data/spec/models/refinery/stores/store_spec.rb +18 -0
  103. data/spec/requests/refinery/addresses/admin/addresses_spec.rb +101 -0
  104. data/spec/requests/refinery/orders/admin/orders_spec.rb +101 -0
  105. data/spec/requests/refinery/products/admin/products_spec.rb +101 -0
  106. data/spec/requests/refinery/stores/admin/stores_spec.rb +101 -0
  107. data/spec/spec_helper.rb +53 -0
  108. data/spec/support/factories/refinery/addresses.rb +7 -0
  109. data/spec/support/factories/refinery/orders.rb +7 -0
  110. data/spec/support/factories/refinery/products.rb +7 -0
  111. data/spec/support/factories/refinery/stores.rb +7 -0
  112. data/tasks/rspec.rake +6 -0
  113. data/tasks/testing.rake +8 -0
  114. data/test/helper.rb +17 -0
  115. data/test/test_refinerycms-cart.rb +7 -0
  116. metadata +571 -0
@@ -0,0 +1,127 @@
1
+ <%= form_for [refinery, :products_admin, @product] do |f| -%>
2
+ <%= render '/refinery/admin/error_messages',
3
+ :object => @product,
4
+ :include_object_name => true %>
5
+
6
+ <table width="100%" class='product-header' >
7
+ <tr>
8
+ <td style="vertical-align: top;" >
9
+ <div class='field'>
10
+ <%= f.label 'choose a store' -%>
11
+ <%= f.select :store_id, ::Refinery::Stores::Store.select_list -%>
12
+ </div>
13
+
14
+ <div class='field '>
15
+ <%= f.label :name -%>
16
+ <%= f.text_field :name, :size => 80 -%>
17
+ </div>
18
+
19
+ <div class='field '>
20
+ <%= f.label :date_available -%>
21
+ <%= f.datetime_select :date_available -%>
22
+ </div>
23
+
24
+ <div class='field '>
25
+ <%= f.label :inactive -%>
26
+ <%= f.check_box :inactive -%>
27
+ </div>
28
+
29
+
30
+ </td>
31
+
32
+
33
+ <td class="mainpic" >
34
+
35
+ <div class='field'>
36
+ <%= f.label :main_pic -%>
37
+ <%= render :partial => "/refinery/admin/image_picker", :locals => {
38
+ :f => f,
39
+ :field => :main_pic_id,
40
+ :image => @product.main_pic,
41
+ :toggle_image_display => false
42
+ } %>
43
+ </div>
44
+ </td>
45
+ </tr>
46
+ </table>
47
+
48
+ <div class='clearfix' >
49
+ <div class='field float-field'>
50
+ <%= f.label :code -%>
51
+ <%= f.text_field :code -%>
52
+ </div>
53
+
54
+ <div class='field float-field'>
55
+ <%= f.label :price -%>
56
+ <%= f.text_field :price -%>
57
+ </div>
58
+
59
+ <div class='field float-field'>
60
+ <%= f.label :quantity -%>
61
+ <%= f.text_field :quantity -%>
62
+ </div>
63
+
64
+ <div class='field float-field'>
65
+ <%= f.label :weight -%>
66
+ <%= f.text_field :weight -%>
67
+ </div>
68
+
69
+ <div class='field float-field'>
70
+ <%= f.label :size_width -%>
71
+ <%= f.text_field :size_width -%>
72
+ </div>
73
+
74
+ <div class='field float-field'>
75
+ <%= f.label :size_height -%>
76
+ <%= f.text_field :size_height -%>
77
+ </div>
78
+
79
+ <div class='field float-field'>
80
+ <%= f.label :size_depth -%>
81
+ <%= f.text_field :size_depth -%>
82
+ </div>
83
+
84
+ <div class='field float-field'>
85
+ <% #= f.label :tax_type -%>
86
+ <% #= f.text_field :tax_type -%>
87
+ </div>
88
+
89
+ <div class='field float-field'>
90
+ <% #= f.label :digital_download -%>
91
+ <% #= f.check_box :digital_download, :checked => @product[:is_digital_download] -%>
92
+ </div>
93
+ </div>
94
+
95
+
96
+ <div class='field'>
97
+ <div id='page-tabs' class='clearfix ui-tabs ui-widget ui-widget-content ui-corner-all'>
98
+ <ul id='page_parts'>
99
+ <% [:description].each_with_index do |part, part_index| %>
100
+ <li class='ui-state-default<%= ' ui-state-active' if part_index == 0 %>'>
101
+ <%= link_to t("#{part}", :scope => "activerecord.attributes.refinery/products/product", :default => part.to_s.titleize), "##{part}" %>
102
+ </li>
103
+ <% end %>
104
+ </ul>
105
+ <div id='page_part_editors'>
106
+ <% [:description].each do |part| %>
107
+ <div class='page_part' id='<%= part %>'>
108
+ <%= f.text_area part, :rows => 20, :class => 'wymeditor widest' -%>
109
+ </div>
110
+ <% end %>
111
+ </div>
112
+ </div>
113
+
114
+ </div>
115
+
116
+ <%= render '/refinery/admin/form_actions', :f => f,
117
+ :continue_editing => false,
118
+ :delete_title => t('delete', :scope => 'refinery.products.admin.products.product'),
119
+ :delete_confirmation => t('message', :scope => 'refinery.admin.delete', :title => @product.name) %>
120
+ <% end -%>
121
+ <% content_for :javascripts do %>
122
+ <script>
123
+ $(document).ready(function(){
124
+ page_options.init(false, '', '');
125
+ });
126
+ </script>
127
+ <% end %>
@@ -0,0 +1,20 @@
1
+ <li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(product) -%>">
2
+ <span class='title'>
3
+ <%= product.name %>
4
+
5
+ </span>
6
+ <span class='actions'>
7
+
8
+ <%= link_to refinery_icon_tag("application_go.png"), refinery.products_product_path(product),
9
+ :title => t('.view_live_html'),
10
+ :target => "_blank" %>
11
+
12
+ <%= link_to refinery_icon_tag("application_edit.png"), refinery.edit_products_admin_product_path(product),
13
+ :title => t('.edit') %>
14
+ <%= link_to refinery_icon_tag("delete.png"), refinery.products_admin_product_path(product),
15
+ :class => "cancel confirm-delete",
16
+ :title => t('.delete'),
17
+ :confirm => t('message', :scope => 'refinery.admin.delete', :title => product.name),
18
+ :method => :delete %>
19
+ </span>
20
+ </li>
@@ -0,0 +1,2 @@
1
+ <%= will_paginate @products if Refinery::Products::Admin::ProductsController.pageable? %>
2
+ <%= render 'sortable_list' %>
@@ -0,0 +1,18 @@
1
+ <% if searching? %>
2
+ <h2><%= t('results_for', :scope => 'refinery.admin.search', :query => params[:search]) %></h2>
3
+ <% end %>
4
+ <div class='pagination_container'>
5
+ <% if @products.any? %>
6
+ <%= render 'products' %>
7
+ <% else %>
8
+ <p>
9
+ <% unless searching? %>
10
+ <strong>
11
+ <%= t('.no_items_yet') %>
12
+ </strong>
13
+ <% else %>
14
+ <%= t('no_results', :scope => 'refinery.admin.search') %>
15
+ <% end %>
16
+ </p>
17
+ <% end %>
18
+ </div>
@@ -0,0 +1,5 @@
1
+ <ul id='sortable_list'>
2
+ <%= render :partial => 'product', :collection => @products %>
3
+ </ul>
4
+ <%= render '/refinery/admin/sortable_list',
5
+ :continue_reordering => (local_assigns.keys.include?(:continue_reordering)) ? continue_reordering : true %>
@@ -0,0 +1,4 @@
1
+ <% content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-stores')%>
2
+
3
+
4
+ <%= render 'form' %>
@@ -0,0 +1,10 @@
1
+ <% content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-stores')%>
2
+
3
+
4
+ <section id='records'>
5
+ <%= render 'records' %>
6
+ </section>
7
+ <aside id='actions'>
8
+ <%= render 'actions' %>
9
+ </aside>
10
+ <%= render '/refinery/admin/make_sortable', :tree => false if !searching? and ::Refinery::Products::Admin::ProductsController.sortable? and ::Refinery::Products::Product.count > 1 %>
@@ -0,0 +1,4 @@
1
+ <% content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-stores')%>
2
+
3
+
4
+ <%= render 'form' %>
@@ -0,0 +1,105 @@
1
+ <% content_for :body_content_title do %>
2
+ <%= @product.name %>
3
+ <% end %>
4
+
5
+ <% content_for :body_content_left do %>
6
+ <section>
7
+ <h1>Store</h1>
8
+ <p>
9
+ <%=raw @product.store %>
10
+ </p>
11
+ </section>
12
+ <section>
13
+ <h1>Name</h1>
14
+ <p>
15
+ <%=raw @product.name %>
16
+ </p>
17
+ </section>
18
+ <section>
19
+ <h1>Code</h1>
20
+ <p>
21
+ <%=raw @product.code %>
22
+ </p>
23
+ </section>
24
+ <section>
25
+ <h1>Description</h1>
26
+ <p>
27
+ <%=raw @product.description %>
28
+ </p>
29
+ </section>
30
+ <section>
31
+ <h1>Date Available</h1>
32
+ <p>
33
+ <%=raw @product.date_available %>
34
+ </p>
35
+ </section>
36
+ <section>
37
+ <h1>Price</h1>
38
+ <p>
39
+ <%=raw @product.price %>
40
+ </p>
41
+ </section>
42
+ <section>
43
+ <h1>Size Width</h1>
44
+ <p>
45
+ <%=raw @product.size_width %>
46
+ </p>
47
+ </section>
48
+ <section>
49
+ <h1>Size Height</h1>
50
+ <p>
51
+ <%=raw @product.size_height %>
52
+ </p>
53
+ </section>
54
+ <section>
55
+ <h1>Size Depth</h1>
56
+ <p>
57
+ <%=raw @product.size_depth %>
58
+ </p>
59
+ </section>
60
+ <section>
61
+ <h1>Weight</h1>
62
+ <p>
63
+ <%=raw @product.weight %>
64
+ </p>
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>
89
+ </section>
90
+ <% end %>
91
+
92
+ <% content_for :body_content_right do %>
93
+ <aside>
94
+ <h2><%= t('.other') %></h2>
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>
102
+ </aside>
103
+ <% end %>
104
+
105
+ <%= render '/refinery/content_page' %>
@@ -0,0 +1,57 @@
1
+ <ul>
2
+ <% if ::Refinery::Stores::Admin::StoresController.searchable? %>
3
+ <li>
4
+ <%= render '/refinery/admin/search', :url => refinery.stores_admin_stores_path %>
5
+ </li>
6
+ <% end %>
7
+ </ul>
8
+
9
+
10
+
11
+ <ul class='collapsible_menu'>
12
+ <li class='not_a_link'>
13
+ <%= link_to t('.title'), '#',
14
+ :class => 'page_icon' %>
15
+ </li>
16
+ <li>
17
+ <%= link_to t('.manage'), refinery.stores_admin_stores_path,
18
+ :class => 'page_icon' %>
19
+ </li>
20
+ <li>
21
+ <%= link_to t('.create_new'), refinery.new_stores_admin_store_path,
22
+ :class => "add_icon" %>
23
+ </li>
24
+ <% if !searching? && ::Refinery::Stores::Admin::StoresController.sortable? && ::Refinery::Stores::Store.any? %>
25
+ <li>
26
+ <%= link_to t('.reorder', :what => "Stores"),
27
+ refinery.stores_admin_stores_path,
28
+ :id => "reorder_action",
29
+ :class => "reorder_icon" %>
30
+
31
+ <%= link_to t('.reorder_done', :what => "Stores"),
32
+ refinery.stores_admin_stores_path,
33
+ :id => "reorder_action_done",
34
+ :style => "display: none;",
35
+ :class => "reorder_icon" %>
36
+ </li>
37
+ <% end %>
38
+
39
+ </ul>
40
+
41
+ <ul class='collapsible_menu'>
42
+ <li class='not_a_link'>
43
+ <%= link_to t('refinery.products.admin.products.actions.title'), '#',
44
+ :class => 'folder_icon' %>
45
+ </li>
46
+ <li>
47
+ <%= link_to t('refinery.products.admin.products.actions.manage'), refinery.products_admin_products_path,
48
+ :class => 'folder_icon' %>
49
+ </li>
50
+ <li>
51
+ <%= link_to t('refinery.products.admin.products.actions.create_new'), refinery.new_products_admin_product_path(),
52
+ :class => 'add_icon' %>
53
+ </li>
54
+ </ul>
55
+
56
+
57
+ </ul>
@@ -0,0 +1,56 @@
1
+ <%= form_for [refinery, :stores_admin, @store] do |f| -%>
2
+ <%= render '/refinery/admin/error_messages',
3
+ :object => @store,
4
+ :include_object_name => true %>
5
+
6
+
7
+ <div class='field'>
8
+ <%= f.label :name -%>
9
+ <%= f.text_field :name, :class => 'larger widest' -%>
10
+
11
+ </div>
12
+
13
+ <div class='field'>
14
+ <%= f.label :meta_keywords -%>
15
+ <%= f.text_field :meta_keywords -%>
16
+
17
+ </div>
18
+
19
+ <div class='field'>
20
+ <%= f.label :is_active -%>
21
+ <%= f.check_box :is_active, :checked => @store[:is_active] -%>
22
+
23
+ </div>
24
+
25
+ <div class='field'>
26
+ <div id='page-tabs' class='clearfix ui-tabs ui-widget ui-widget-content ui-corner-all'>
27
+ <ul id='page_parts'>
28
+ <% [:description].each_with_index do |part, part_index| %>
29
+ <li class='ui-state-default<%= ' ui-state-active' if part_index == 0 %>'>
30
+ <%= link_to t("#{part}", :scope => "activerecord.attributes.refinery/stores/store", :default => part.to_s.titleize), "##{part}" %>
31
+ </li>
32
+ <% end %>
33
+ </ul>
34
+ <div id='page_part_editors'>
35
+ <% [:description].each do |part| %>
36
+ <div class='page_part' id='<%= part %>'>
37
+ <%= f.text_area part, :rows => 20, :class => 'wymeditor widest' -%>
38
+ </div>
39
+ <% end %>
40
+ </div>
41
+ </div>
42
+
43
+ </div>
44
+
45
+ <%= render '/refinery/admin/form_actions', :f => f,
46
+ :continue_editing => false,
47
+ :delete_title => t('delete', :scope => 'refinery.stores.admin.stores.store'),
48
+ :delete_confirmation => t('message', :scope => 'refinery.admin.delete', :title => @store.name) %>
49
+ <% end -%>
50
+ <% content_for :javascripts do %>
51
+ <script>
52
+ $(document).ready(function(){
53
+ page_options.init(false, '', '');
54
+ });
55
+ </script>
56
+ <% end %>
@@ -0,0 +1,18 @@
1
+ <% if searching? %>
2
+ <h2><%= t('results_for', :scope => 'refinery.admin.search', :query => params[:search]) %></h2>
3
+ <% end %>
4
+ <div class='pagination_container'>
5
+ <% if @stores.any? %>
6
+ <%= render 'stores' %>
7
+ <% else %>
8
+ <p>
9
+ <% unless searching? %>
10
+ <strong>
11
+ <%= t('.no_items_yet') %>
12
+ </strong>
13
+ <% else %>
14
+ <%= t('no_results', :scope => 'refinery.admin.search') %>
15
+ <% end %>
16
+ </p>
17
+ <% end %>
18
+ </div>
@@ -0,0 +1,5 @@
1
+ <ul id='sortable_list'>
2
+ <%= render :partial => 'store', :collection => @stores %>
3
+ </ul>
4
+ <%= render '/refinery/admin/sortable_list',
5
+ :continue_reordering => (local_assigns.keys.include?(:continue_reordering)) ? continue_reordering : true %>
@@ -0,0 +1,20 @@
1
+ <li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(store) -%>">
2
+ <span class='title'>
3
+ <%= store.name %>
4
+
5
+ </span>
6
+ <span class='actions'>
7
+
8
+ <%= link_to refinery_icon_tag("application_go.png"), refinery.stores_store_path(store),
9
+ :title => t('.view_live_html'),
10
+ :target => "_blank" %>
11
+
12
+ <%= link_to refinery_icon_tag("application_edit.png"), refinery.edit_stores_admin_store_path(store),
13
+ :title => t('.edit') %>
14
+ <%= link_to refinery_icon_tag("delete.png"), refinery.stores_admin_store_path(store),
15
+ :class => "cancel confirm-delete",
16
+ :title => t('.delete'),
17
+ :confirm => t('message', :scope => 'refinery.admin.delete', :title => store.name),
18
+ :method => :delete %>
19
+ </span>
20
+ </li>
@@ -0,0 +1,2 @@
1
+ <%= will_paginate @stores if Refinery::Stores::Admin::StoresController.pageable? %>
2
+ <%= render 'sortable_list' %>
@@ -0,0 +1,4 @@
1
+ <% content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-stores')%>
2
+
3
+
4
+ <%= render 'form' %>
@@ -0,0 +1,13 @@
1
+ <% content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-stores')%>
2
+
3
+
4
+ <section id='records'>
5
+ <%= render 'records' %>
6
+ </section>
7
+
8
+ <aside id='actions' class='multilist'>
9
+ <%= render 'actions' %>
10
+ </aside>
11
+
12
+ <%= render '/refinery/admin/make_sortable', :tree => false if !searching? and ::Refinery::Stores::Admin::StoresController.sortable? and ::Refinery::Stores::Store.count > 1 %>
13
+
@@ -0,0 +1,4 @@
1
+ <% content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-stores')%>
2
+
3
+
4
+ <%= render 'form' %>
@@ -0,0 +1,22 @@
1
+ <div id='cart'>
2
+
3
+ <div class="cart-title">
4
+ <h3>Your Cart</h3>
5
+ <% if cart.items.empty? -%>
6
+ <p><i>Your cart is empty; click add-to-cart to add products.</i></p>
7
+ <% end -%>
8
+ </div>
9
+
10
+ <table>
11
+ <%= render(:partial => "cart_item", :collection => cart.items) %>
12
+ <tr class="total-line">
13
+ <td colspan="2">Total</td>
14
+ <td class="total-cell"><%= number_to_currency(cart.total_price) %></td>
15
+ </tr>
16
+ <tr>
17
+ <td> <%= button_to( "checkout", refinery.checkout_stores_stores_path(), :class => "checkout-cart" )%></td>
18
+ <td> <%= button_to( "empty cart", refinery.empty_cart_stores_stores_path(), :class => "empty-cart" ) %></td>
19
+ </tr>
20
+ </table>
21
+
22
+ </div>
@@ -0,0 +1,9 @@
1
+ <% if cart_item == @current_item %>
2
+ <tr id="current_item">
3
+ <% else %>
4
+ <tr>
5
+ <% end %>
6
+ <td><%= cart_item.quantity %> &times; </td>
7
+ <td><%= h(cart_item.name) %></td>
8
+ <td class="item-price"><%= number_to_currency(cart_item.price) %></td>
9
+ </tr>
@@ -0,0 +1,16 @@
1
+ <dl>
2
+ <dt>
3
+ <% if list_product.main_pic_id -%>
4
+ <%= image_fu list_product.main_pic, Refinery::Images.user_image_sizes[:small], :class => "catalog-pic", :alt => list_product.name %>
5
+ <% else -%>
6
+ &nbsp;
7
+ <% end %>
8
+ </dt>
9
+ <dd>
10
+ <%= link_to( ( truncate( list_product.name, :length => 60 ) + " &raquo;" ).html_safe, refinery.products_product_path( list_product ) ) %>
11
+ <br/>
12
+ $<%= number_with_precision(list_product.price, :precision => 2) %>
13
+ <%= button_to( "add to cart", refinery.add_to_cart_stores_stores_path(:id => list_product), :class => "add-to-cart" ) %>
14
+
15
+ </dd>
16
+ </dl>
@@ -0,0 +1,11 @@
1
+ <% content_for :body_content_left do %>
2
+ <ul id="stores">
3
+ <% @stores.each do |store| %>
4
+ <li>
5
+ <%= link_to store.name, refinery.stores_store_path(store) %>
6
+ </li>
7
+ <% end %>
8
+ </ul>
9
+ <% end %>
10
+
11
+ <%= render '/refinery/content_page' %>
@@ -0,0 +1,28 @@
1
+ <% content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-stores')%>
2
+
3
+
4
+ <% content_for :body_content_title do %>
5
+ <%= @store.name %>
6
+ <% end %>
7
+
8
+ <% content_for :body_content_left do %>
9
+ <section>
10
+ <p>
11
+ <%=raw @store.description %>
12
+ </p>
13
+ </section>
14
+
15
+ <section class='catalog-brief-list' >
16
+ <%= render :partial => "list_product", :collection => @store.active_products %>
17
+ </section>
18
+
19
+ <% end %>
20
+
21
+ <% content_for :body_content_right do %>
22
+ <aside>
23
+ <%= render( :partial => "cart", :object => @cart ) %>
24
+ </aside>
25
+ <% end %>
26
+
27
+ <%= render "/refinery/content_page" %>
28
+