refinerycms-products 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. data/app/controllers/addresses_controller.rb +22 -22
  2. data/app/controllers/admin/carts_controller.rb +7 -7
  3. data/app/controllers/admin/categories_controller.rb +50 -50
  4. data/app/controllers/admin/customers_controller.rb +12 -12
  5. data/app/controllers/admin/line_items_controller.rb +7 -7
  6. data/app/controllers/admin/products_controller.rb +23 -23
  7. data/app/controllers/carts_controller.rb +110 -110
  8. data/app/controllers/categories_controller.rb +32 -32
  9. data/app/controllers/customers_controller.rb +33 -33
  10. data/app/controllers/line_items_controller.rb +8 -8
  11. data/app/controllers/products_controller.rb +61 -61
  12. data/app/controllers/profiles_controller.rb +36 -36
  13. data/app/helpers/address_helper.rb +20 -20
  14. data/app/helpers/products_helper.rb +41 -33
  15. data/app/models/address.rb +18 -18
  16. data/app/models/cart.rb +54 -54
  17. data/app/models/category.rb +28 -28
  18. data/app/models/customer.rb +32 -32
  19. data/app/models/line_item.rb +28 -28
  20. data/app/models/product.rb +46 -46
  21. data/app/views/addresses/edit.html.erb +42 -42
  22. data/app/views/admin/carts/_actions.html.erb +27 -27
  23. data/app/views/admin/carts/_cart.html.erb +18 -18
  24. data/app/views/admin/carts/_carts.html.erb +1 -1
  25. data/app/views/admin/carts/_form.html.erb +24 -24
  26. data/app/views/admin/carts/_records.html.erb +17 -17
  27. data/app/views/admin/carts/_sortable_list.html.erb +7 -7
  28. data/app/views/admin/carts/edit.html.erb +1 -1
  29. data/app/views/admin/carts/index.html.erb +10 -10
  30. data/app/views/admin/carts/new.html.erb +1 -1
  31. data/app/views/admin/categories/_actions.html.erb +27 -27
  32. data/app/views/admin/categories/_categories.html.erb +1 -1
  33. data/app/views/admin/categories/_category.html.erb +25 -25
  34. data/app/views/admin/categories/_form.html.erb +49 -49
  35. data/app/views/admin/categories/_records.html.erb +17 -17
  36. data/app/views/admin/categories/_sortable_list.html.erb +10 -10
  37. data/app/views/admin/categories/edit.html.erb +1 -1
  38. data/app/views/admin/categories/index.html.erb +12 -12
  39. data/app/views/admin/categories/new.html.erb +1 -1
  40. data/app/views/admin/customers/_actions.html.erb +27 -27
  41. data/app/views/admin/customers/_customer.html.erb +18 -18
  42. data/app/views/admin/customers/_customers.html.erb +1 -1
  43. data/app/views/admin/customers/_form.html.erb +40 -40
  44. data/app/views/admin/customers/_records.html.erb +17 -17
  45. data/app/views/admin/customers/_sortable_list.html.erb +7 -7
  46. data/app/views/admin/customers/edit.html.erb +1 -1
  47. data/app/views/admin/customers/index.html.erb +10 -10
  48. data/app/views/admin/customers/new.html.erb +1 -1
  49. data/app/views/admin/customers/show.html.erb +59 -59
  50. data/app/views/admin/line_items/_actions.html.erb +27 -27
  51. data/app/views/admin/line_items/_form.html.erb +29 -29
  52. data/app/views/admin/line_items/_line_item.html.erb +18 -18
  53. data/app/views/admin/line_items/_line_items.html.erb +1 -1
  54. data/app/views/admin/line_items/_records.html.erb +17 -17
  55. data/app/views/admin/line_items/_sortable_list.html.erb +7 -7
  56. data/app/views/admin/line_items/edit.html.erb +1 -1
  57. data/app/views/admin/line_items/index.html.erb +10 -10
  58. data/app/views/admin/line_items/new.html.erb +1 -1
  59. data/app/views/admin/products/_actions.html.erb +42 -42
  60. data/app/views/admin/products/_form.html.erb +120 -120
  61. data/app/views/admin/products/_product.html.erb +23 -23
  62. data/app/views/admin/products/_products.html.erb +1 -1
  63. data/app/views/admin/products/_records.html.erb +17 -17
  64. data/app/views/admin/products/_sortable_list.html.erb +13 -13
  65. data/app/views/admin/products/edit.html.erb +1 -1
  66. data/app/views/admin/products/index.html.erb +12 -12
  67. data/app/views/admin/products/new.html.erb +1 -1
  68. data/app/views/carts/show.html.erb +56 -56
  69. data/app/views/categories/index.html.erb +11 -11
  70. data/app/views/categories/show.html.erb +33 -33
  71. data/app/views/customers/index.html.erb +11 -11
  72. data/app/views/customers/show.html.erb +52 -52
  73. data/app/views/line_items/index.html.erb +11 -11
  74. data/app/views/line_items/show.html.erb +39 -39
  75. data/app/views/products/index.html.erb +33 -33
  76. data/app/views/products/show.html.erb +65 -65
  77. data/app/views/profiles/_order_history.html.erb +23 -23
  78. data/app/views/profiles/_show_address.html.erb +3 -3
  79. data/app/views/profiles/account_details.html.erb +31 -31
  80. data/app/views/profiles/address_details.html.erb +9 -9
  81. data/app/views/profiles/index.html.erb +75 -75
  82. data/app/views/profiles/order_history_details.html.erb +39 -39
  83. data/config/locales/en.yml +97 -97
  84. data/config/locales/fr.yml +25 -25
  85. data/config/locales/lolcat.yml +25 -25
  86. data/config/locales/nb.yml +21 -21
  87. data/config/locales/nl.yml +21 -21
  88. data/config/routes.rb +58 -58
  89. data/lib/generators/refinerycms_products_generator.rb +5 -5
  90. data/lib/refinerycms-carts.rb +31 -31
  91. data/lib/refinerycms-categories.rb +30 -30
  92. data/lib/refinerycms-customers.rb +34 -34
  93. data/lib/refinerycms-line_items.rb +30 -30
  94. data/lib/refinerycms-products.rb +65 -65
  95. data/lib/tasks/products.rake +12 -12
  96. metadata +95 -98
@@ -1,39 +1,39 @@
1
- <% if @current_order.present? then %>
2
- <div class="confirmOrder">
3
- <h2 class="category ordernumber">Order Number: <%= @current_order.order_number %></h2>
4
- <h3 class="date"><%= @current_order.created_at.strftime("%d %B %Y") unless @current_order.created_at.blank? %></h3>
5
- <div class="clear"></div>
6
-
7
- <table>
8
- <tr>
9
- <th class="left">Product</th>
10
- <th>Price</th>
11
- <th>Quantity</th>
12
- <th>Total</th>
13
- </tr>
14
- <% order = @current_order
15
-
16
- total_price = order.grand_total %>
17
-
18
-
19
- <% order.order_items.each do |order_item| %>
20
- <tr class="<%= cycle('odd', 'even') %>">
21
- <td class="first"><%= order_item.product_name %></td>
22
- <td><%= rands(order_item.price) %></td>
23
- <td><%= order_item.quantity %></td>
24
- <td><%= rands(order_item.total) %></td>
25
- </tr>
26
- <% end %>
27
-
28
-
29
- <tr>
30
- <td class="total first" colspan="3">TOTAL PRICE</td>
31
- <td class="total"><%= rands(total_price) %></td>
32
- </tr>
33
-
34
- </table>
35
- </div>
36
- <% end %>
37
-
38
- <%= link_to "Back", :back %>
39
-
1
+ <% if @current_order.present? then %>
2
+ <div class="confirmOrder">
3
+ <h2 class="category ordernumber">Order Number: <%= @current_order.order_number %></h2>
4
+ <h3 class="date"><%= @current_order.created_at.strftime("%d %B %Y") unless @current_order.created_at.blank? %></h3>
5
+ <div class="clear"></div>
6
+
7
+ <table>
8
+ <tr>
9
+ <th class="left">Product</th>
10
+ <th>Price</th>
11
+ <th>Quantity</th>
12
+ <th>Total</th>
13
+ </tr>
14
+ <% order = @current_order
15
+
16
+ total_price = order.grand_total %>
17
+
18
+
19
+ <% order.order_items.each do |order_item| %>
20
+ <tr class="<%= cycle('odd', 'even') %>">
21
+ <td class="first"><%= order_item.product_name %></td>
22
+ <td><%= rands(order_item.price) %></td>
23
+ <td><%= order_item.quantity %></td>
24
+ <td><%= rands(order_item.total) %></td>
25
+ </tr>
26
+ <% end %>
27
+
28
+
29
+ <tr>
30
+ <td class="total first" colspan="3">TOTAL PRICE</td>
31
+ <td class="total"><%= rands(total_price) %></td>
32
+ </tr>
33
+
34
+ </table>
35
+ </div>
36
+ <% end %>
37
+
38
+ <%= link_to "Back", :back %>
39
+
@@ -1,97 +1,97 @@
1
- en:
2
- shared:
3
- admin:
4
- image_picker:
5
- image: image
6
- plugins:
7
- line_items:
8
- title: Line Items
9
- carts:
10
- title: Carts
11
- customers:
12
- title: Customers
13
- products:
14
- title: Products
15
- categories:
16
- title: Categories
17
- admin:
18
- line_items:
19
- actions:
20
- reorder: Reorder Line Items
21
- create_new: Add New Line Item
22
- reorder_done: Done Reordering Line Items
23
- records:
24
- no_items_yet: There are no Line Items yet. Click "Add New Line Item" to add your first line item.
25
- title: Line Items
26
- sorry_no_results: Sorry! There are no results found.
27
- line_item:
28
- edit: Edit this line item
29
- delete: Remove this line item forever
30
- view_live_html: View this line item live <br/><em>(opens in a new window)</em>
31
- carts:
32
- cart:
33
- edit: Edit this cart
34
- delete: Remove this cart forever
35
- view_live_html: View this cart live <br/><em>(opens in a new window)</em>
36
- actions:
37
- reorder: Reorder Carts
38
- create_new: Add New Cart
39
- reorder_done: Done Reordering Carts
40
- records:
41
- no_items_yet: There are no Carts yet. Click "Add New Cart" to add your first cart.
42
- title: Carts
43
- sorry_no_results: Sorry! There are no results found.
44
- customers:
45
- actions:
46
- create_new: Add New Customer
47
- reorder: Reorder Customers
48
- reorder_done: Done Reordering Customers
49
- records:
50
- title: Customers
51
- sorry_no_results: Sorry! There are no results found.
52
- no_items_yet: There are no Customers yet. Click "Add New Customer" to add your first customer.
53
- customer:
54
- view_live_html: View this customer live <br/><em>(opens in a new window)</em>
55
- edit: Edit this customer
56
- delete: Remove this customer forever
57
- categories:
58
- actions:
59
- create_new: Add New Category
60
- reorder: Reorder Categories
61
- reorder_done: Done Reordering Categories
62
- records:
63
- title: Categories
64
- sorry_no_results: Sorry! There are no results found.
65
- no_items_yet: There are no Categories yet. Click "Add New Category" to add your first category.
66
- category:
67
- view_live_html: View this category live <br/><em>(opens in a new window)</em>
68
- edit: Edit this category
69
- delete: Remove this category forever
70
- products:
71
- actions:
72
- create_new: Add New Product
73
- reorder: Reorder Products
74
- reorder_done: Done Reordering Products
75
- records:
76
- title: Products
77
- sorry_no_results: Sorry! There are no results found.
78
- no_items_yet: There are no Products yet. Click "Add New Product" to add your first product.
79
- product:
80
- view_live_html: View this product live <br/><em>(opens in a new window)</em>
81
- edit: Edit this product
82
- delete: Remove this product forever
83
- categories:
84
- show:
85
- other: Other Categories
86
- products:
87
- show:
88
- other: Other Products
89
- customers:
90
- show:
91
- other: Other Customers
92
- line_items:
93
- show:
94
- other: Other Line Items
95
- carts:
96
- show:
97
- other: Other Carts
1
+ en:
2
+ shared:
3
+ admin:
4
+ image_picker:
5
+ image: image
6
+ plugins:
7
+ line_items:
8
+ title: Line Items
9
+ carts:
10
+ title: Carts
11
+ customers:
12
+ title: Customers
13
+ products:
14
+ title: Products
15
+ categories:
16
+ title: Categories
17
+ admin:
18
+ line_items:
19
+ actions:
20
+ reorder: Reorder Line Items
21
+ create_new: Add New Line Item
22
+ reorder_done: Done Reordering Line Items
23
+ records:
24
+ no_items_yet: There are no Line Items yet. Click "Add New Line Item" to add your first line item.
25
+ title: Line Items
26
+ sorry_no_results: Sorry! There are no results found.
27
+ line_item:
28
+ edit: Edit this line item
29
+ delete: Remove this line item forever
30
+ view_live_html: View this line item live <br/><em>(opens in a new window)</em>
31
+ carts:
32
+ cart:
33
+ edit: Edit this cart
34
+ delete: Remove this cart forever
35
+ view_live_html: View this cart live <br/><em>(opens in a new window)</em>
36
+ actions:
37
+ reorder: Reorder Carts
38
+ create_new: Add New Cart
39
+ reorder_done: Done Reordering Carts
40
+ records:
41
+ no_items_yet: There are no Carts yet. Click "Add New Cart" to add your first cart.
42
+ title: Carts
43
+ sorry_no_results: Sorry! There are no results found.
44
+ customers:
45
+ actions:
46
+ create_new: Add New Customer
47
+ reorder: Reorder Customers
48
+ reorder_done: Done Reordering Customers
49
+ records:
50
+ title: Customers
51
+ sorry_no_results: Sorry! There are no results found.
52
+ no_items_yet: There are no Customers yet. Click "Add New Customer" to add your first customer.
53
+ customer:
54
+ view_live_html: View this customer live <br/><em>(opens in a new window)</em>
55
+ edit: Edit this customer
56
+ delete: Remove this customer forever
57
+ categories:
58
+ actions:
59
+ create_new: Add New Category
60
+ reorder: Reorder Categories
61
+ reorder_done: Done Reordering Categories
62
+ records:
63
+ title: Categories
64
+ sorry_no_results: Sorry! There are no results found.
65
+ no_items_yet: There are no Categories yet. Click "Add New Category" to add your first category.
66
+ category:
67
+ view_live_html: View this category live <br/><em>(opens in a new window)</em>
68
+ edit: Edit this category
69
+ delete: Remove this category forever
70
+ products:
71
+ actions:
72
+ create_new: Add New Product
73
+ reorder: Reorder Products
74
+ reorder_done: Done Reordering Products
75
+ records:
76
+ title: Products
77
+ sorry_no_results: Sorry! There are no results found.
78
+ no_items_yet: There are no Products yet. Click "Add New Product" to add your first product.
79
+ product:
80
+ view_live_html: View this product live <br/><em>(opens in a new window)</em>
81
+ edit: Edit this product
82
+ delete: Remove this product forever
83
+ categories:
84
+ show:
85
+ other: Other Categories
86
+ products:
87
+ show:
88
+ other: Other Products
89
+ customers:
90
+ show:
91
+ other: Other Customers
92
+ line_items:
93
+ show:
94
+ other: Other Line Items
95
+ carts:
96
+ show:
97
+ other: Other Carts
@@ -1,25 +1,25 @@
1
- fr:
2
- shared:
3
- admin:
4
- image_picker:
5
- image: image
6
- plugins:
7
- products:
8
- title: Products
9
- admin:
10
- products:
11
- actions:
12
- create_new: Créer un(e) nouve(au/l/lle) Product
13
- reorder: Réordonner les Products
14
- reorder_done: Fin de réordonnancement des Products
15
- records:
16
- title: Products
17
- sorry_no_results: "Désolé ! Aucun résultat."
18
- no_items_yet: 'Il n''y a actuellement aucun(e) Product. Cliquer sur "Créer un(e) nouve(au/l/lle) Product" pour créer votre premi(er/ère) product.'
19
- product:
20
- view_live_html: Voir ce(t/tte) product <br/><em>(Ouvre une nouvelle fenêtre)</em>
21
- edit: Modifier ce(t/tte) product
22
- delete: Supprimer définitivement ce(t/tte) product
23
- products:
24
- show:
25
- other: Autres Products
1
+ fr:
2
+ shared:
3
+ admin:
4
+ image_picker:
5
+ image: image
6
+ plugins:
7
+ products:
8
+ title: Products
9
+ admin:
10
+ products:
11
+ actions:
12
+ create_new: Créer un(e) nouve(au/l/lle) Product
13
+ reorder: Réordonner les Products
14
+ reorder_done: Fin de réordonnancement des Products
15
+ records:
16
+ title: Products
17
+ sorry_no_results: "Désolé ! Aucun résultat."
18
+ no_items_yet: 'Il n''y a actuellement aucun(e) Product. Cliquer sur "Créer un(e) nouve(au/l/lle) Product" pour créer votre premi(er/ère) product.'
19
+ product:
20
+ view_live_html: Voir ce(t/tte) product <br/><em>(Ouvre une nouvelle fenêtre)</em>
21
+ edit: Modifier ce(t/tte) product
22
+ delete: Supprimer définitivement ce(t/tte) product
23
+ products:
24
+ show:
25
+ other: Autres Products
@@ -1,25 +1,25 @@
1
- lolcat:
2
- shared:
3
- admin:
4
- image_picker:
5
- image: IMAGE
6
- plugins:
7
- products:
8
- title: Products
9
- admin:
10
- products:
11
- actions:
12
- create_new: CREATE NEW Product
13
- reorder: REORDR Products
14
- reorder_done: DUN REORDERIN Products
15
- records:
16
- title: Products
17
- sorry_no_results: SRY! THAR R NO RESULTS FINDZ.
18
- no_items_yet: THAR R NO Products YET. CLICK "CREATE NEW Product" 2 ADD UR FURST product.
19
- product:
20
- view_live_html: VIEW DIS product LIV <BR/><EM>(OPENS IN NEW WINDOW)</EM>
21
- edit: EDIT DIS product
22
- delete: REMOOV DIS product FOREVR
23
- products:
24
- show:
25
- other: OTHR Products
1
+ lolcat:
2
+ shared:
3
+ admin:
4
+ image_picker:
5
+ image: IMAGE
6
+ plugins:
7
+ products:
8
+ title: Products
9
+ admin:
10
+ products:
11
+ actions:
12
+ create_new: CREATE NEW Product
13
+ reorder: REORDR Products
14
+ reorder_done: DUN REORDERIN Products
15
+ records:
16
+ title: Products
17
+ sorry_no_results: SRY! THAR R NO RESULTS FINDZ.
18
+ no_items_yet: THAR R NO Products YET. CLICK "CREATE NEW Product" 2 ADD UR FURST product.
19
+ product:
20
+ view_live_html: VIEW DIS product LIV <BR/><EM>(OPENS IN NEW WINDOW)</EM>
21
+ edit: EDIT DIS product
22
+ delete: REMOOV DIS product FOREVR
23
+ products:
24
+ show:
25
+ other: OTHR Products
@@ -1,21 +1,21 @@
1
- nb:
2
- plugins:
3
- products:
4
- title: Products
5
- admin:
6
- products:
7
- actions:
8
- create_new: Lag en ny Product
9
- reorder: Endre rekkefølgen på Products
10
- reorder_done: Ferdig å endre rekkefølgen Products
11
- records:
12
- title: Products
13
- sorry_no_results: Beklager! Vi fant ikke noen resultater.
14
- no_items_yet: Det er ingen Products enda. Klikk på "Lag en ny Product" for å legge til din første product.
15
- product:
16
- view_live_html: Vis hvordan denne product ser ut offentlig <br/><em>(åpner i et nytt vindu)</em>
17
- edit: Rediger denne product
18
- delete: Fjern denne product permanent
19
- products:
20
- show:
21
- other: Andre Products
1
+ nb:
2
+ plugins:
3
+ products:
4
+ title: Products
5
+ admin:
6
+ products:
7
+ actions:
8
+ create_new: Lag en ny Product
9
+ reorder: Endre rekkefølgen på Products
10
+ reorder_done: Ferdig å endre rekkefølgen Products
11
+ records:
12
+ title: Products
13
+ sorry_no_results: Beklager! Vi fant ikke noen resultater.
14
+ no_items_yet: Det er ingen Products enda. Klikk på "Lag en ny Product" for å legge til din første product.
15
+ product:
16
+ view_live_html: Vis hvordan denne product ser ut offentlig <br/><em>(åpner i et nytt vindu)</em>
17
+ edit: Rediger denne product
18
+ delete: Fjern denne product permanent
19
+ products:
20
+ show:
21
+ other: Andre Products
@@ -1,21 +1,21 @@
1
- nl:
2
- plugins:
3
- products:
4
- title: Products
5
- admin:
6
- products:
7
- actions:
8
- create_new: Maak een nieuwe Product
9
- reorder: Wijzig de volgorde van de Products
10
- reorder_done: Klaar met het wijzingen van de volgorde van de Products
11
- records:
12
- title: Products
13
- sorry_no_results: Helaas! Er zijn geen resultaten gevonden.
14
- no_items_yet: Er zijn nog geen Products. Druk op 'Maak een nieuwe Product' om de eerste aan te maken.
15
- product:
16
- view_live_html: Bekijk deze product op de website <br/><em>(opent een nieuw venster)</em>
17
- edit: Bewerk deze product
18
- delete: Verwijder deze product voor eeuwig
19
- products:
20
- show:
21
- other: Andere Products
1
+ nl:
2
+ plugins:
3
+ products:
4
+ title: Products
5
+ admin:
6
+ products:
7
+ actions:
8
+ create_new: Maak een nieuwe Product
9
+ reorder: Wijzig de volgorde van de Products
10
+ reorder_done: Klaar met het wijzingen van de volgorde van de Products
11
+ records:
12
+ title: Products
13
+ sorry_no_results: Helaas! Er zijn geen resultaten gevonden.
14
+ no_items_yet: Er zijn nog geen Products. Druk op 'Maak een nieuwe Product' om de eerste aan te maken.
15
+ product:
16
+ view_live_html: Bekijk deze product op de website <br/><em>(opent een nieuw venster)</em>
17
+ edit: Bewerk deze product
18
+ delete: Verwijder deze product voor eeuwig
19
+ products:
20
+ show:
21
+ other: Andere Products