office_clerk 0.4 → 0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +11 -36
  3. data/LICENSE +22 -0
  4. data/app/assets/javascripts/office_clerk.js +0 -7
  5. data/app/assets/stylesheets/{office_clerk.scss → office_clerk.css.scss} +0 -0
  6. data/app/controllers/orders_controller.rb +10 -1
  7. data/app/controllers/products_controller.rb +2 -32
  8. data/app/controllers/shop_controller.rb +1 -0
  9. data/app/helpers/orders_helper.rb +6 -5
  10. data/app/helpers/shop_helper.rb +8 -7
  11. data/app/mailers/order_mailer.rb +19 -0
  12. data/app/views/addresses/_form_fields.html.haml +4 -4
  13. data/app/views/baskets/edit.html.haml +1 -1
  14. data/app/views/categories/edit.html.haml +22 -18
  15. data/app/views/clerks/edit.html.haml +6 -9
  16. data/app/views/layouts/office_clerk.haml +1 -0
  17. data/app/views/layouts/sales_clerk.haml +10 -0
  18. data/app/views/order_mailer/cancel.html.haml +6 -0
  19. data/app/views/order_mailer/confirm.html.haml +7 -0
  20. data/app/views/order_mailer/paid.html.haml +6 -0
  21. data/app/views/order_mailer/shipped.html.haml +6 -0
  22. data/app/views/orders/edit.html.haml +1 -1
  23. data/app/views/orders/show.html.haml +48 -44
  24. data/app/views/products/_head.haml +4 -2
  25. data/app/views/products/edit.html.haml +35 -24
  26. data/app/views/products/show.html.haml +32 -41
  27. data/app/views/purchases/edit.html.haml +4 -4
  28. data/app/views/sessions/sign_up.haml +1 -1
  29. data/app/views/shop/_product_box.haml +13 -0
  30. data/app/views/suppliers/edit.html.haml +2 -2
  31. data/bin/rails +3 -15
  32. data/config/environments/production.rb +2 -77
  33. data/config/locales/config.yml +1 -1
  34. data/config/locales/en.yml +75 -45
  35. data/config/locales/fi.yml +60 -67
  36. data/config/routes.rb +1 -1
  37. data/db/migrate/20131226143612_categories.rb +2 -1
  38. data/db/migrate/20131226151332_products.rb +2 -1
  39. data/lib/office_clerk.rb +2 -7
  40. data/lib/office_clerk/version.rb +1 -1
  41. data/lib/templates/haml/scaffold/_form.html.haml +1 -1
  42. data/office_clerk.gemspec +6 -12
  43. data/spec/features/products/edit_spec.rb +0 -4
  44. data/spec/mailers/order_mailer_spec.rb +24 -0
  45. data/spec/models/baskets/items_spec.rb +3 -3
  46. data/spec/models/locale_spec.rb +4 -0
  47. data/test_app/db/migrate/20141114205527_categories.office.rb +2 -2
  48. data/test_app/db/migrate/20141114205532_products.office.rb +2 -2
  49. data/test_app/db/schema.rb +4 -2
  50. data/todo +0 -4
  51. metadata +68 -111
  52. data/config/initializers/migrate.rb +0 -6
  53. data/config/initializers/simple_form.rb +0 -149
  54. data/config/initializers/simple_form_bootstrap.rb +0 -48
  55. data/db/seeds.rb +0 -4
  56. data/test/fixtures/baskets.yml +0 -41993
  57. data/test/fixtures/categories.yml +0 -638
  58. data/test/fixtures/clerks.yml +0 -694
  59. data/test/fixtures/items.yml +0 -83651
  60. data/test/fixtures/orders.yml +0 -58918
  61. data/test/fixtures/products.yml +0 -110904
  62. data/test/fixtures/purchases.yml +0 -1755
  63. data/test/fixtures/suppliers.yml +0 -341
@@ -1,341 +0,0 @@
1
- ---
2
- Supplier_1:
3
- id: 8
4
- supplier_name: AlbertL
5
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
6
- created_at: 2014-01-28 21:15:58.572945000 Z
7
- updated_at: 2014-01-28 21:15:58.572945000 Z
8
- Supplier_2:
9
- id: 12
10
- supplier_name: AnRa
11
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
12
- created_at: 2014-01-28 21:15:58.988037000 Z
13
- updated_at: 2014-01-28 21:15:58.988037000 Z
14
- Supplier_3:
15
- id: 14
16
- supplier_name: Arco
17
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
18
- created_at: 2014-01-28 21:15:59.261576000 Z
19
- updated_at: 2014-01-28 21:15:59.261576000 Z
20
- Supplier_4:
21
- id: 17
22
- supplier_name: Azalia Moda
23
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
24
- created_at: 2014-01-28 21:16:00.173415000 Z
25
- updated_at: 2014-01-28 21:16:00.173415000 Z
26
- Supplier_5:
27
- id: 9
28
- supplier_name: Bel Arte
29
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
30
- created_at: 2014-01-28 21:15:58.662414000 Z
31
- updated_at: 2014-01-28 21:15:58.662414000 Z
32
- Supplier_6:
33
- id: 10
34
- supplier_name: Bell Arte
35
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
36
- created_at: 2014-01-28 21:15:58.775483000 Z
37
- updated_at: 2014-01-28 21:15:58.775483000 Z
38
- Supplier_7:
39
- id: 13
40
- supplier_name: Belly Mode
41
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
42
- created_at: 2014-01-28 21:15:59.169490000 Z
43
- updated_at: 2014-01-28 21:15:59.169490000 Z
44
- Supplier_8:
45
- id: 20
46
- supplier_name: Belly Moden
47
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
48
- created_at: 2014-01-28 21:16:00.521921000 Z
49
- updated_at: 2014-01-28 21:16:00.521921000 Z
50
- Supplier_9:
51
- id: 46
52
- supplier_name: Boltze
53
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
54
- created_at: 2014-01-28 21:16:13.249972000 Z
55
- updated_at: 2014-01-28 21:16:13.249972000 Z
56
- Supplier_10:
57
- id: 30
58
- supplier_name: Café-Tasse
59
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
60
- created_at: 2014-01-28 21:16:03.105520000 Z
61
- updated_at: 2014-01-28 21:16:03.105520000 Z
62
- Supplier_11:
63
- id: 22
64
- supplier_name: Chatochak
65
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
66
- created_at: 2014-01-28 21:16:01.158844000 Z
67
- updated_at: 2014-01-28 21:16:01.158844000 Z
68
- Supplier_12:
69
- id: 56
70
- supplier_name: Cor Mulder
71
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess
72
- name: ''
73
- street: ''
74
- city: ''
75
- phone: ''
76
- created_at: 2014-05-26 16:03:13.407318000 Z
77
- updated_at: 2014-05-26 16:03:13.415770000 Z
78
- Supplier_13:
79
- id: 1
80
- supplier_name: D&B
81
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
82
- created_at: 2014-01-28 21:15:57.241330000 Z
83
- updated_at: 2014-01-28 21:15:57.241330000 Z
84
- Supplier_14:
85
- id: 15
86
- supplier_name: Darach
87
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
88
- created_at: 2014-01-28 21:15:59.463730000 Z
89
- updated_at: 2014-01-28 21:15:59.463730000 Z
90
- Supplier_15:
91
- id: 45
92
- supplier_name: Envirosax
93
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
94
- created_at: 2014-01-28 21:16:11.669750000 Z
95
- updated_at: 2014-01-28 21:16:11.669750000 Z
96
- Supplier_16:
97
- id: 41
98
- supplier_name: Extradesign Frank Mayer
99
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
100
- created_at: 2014-01-28 21:16:09.165503000 Z
101
- updated_at: 2014-01-28 21:16:09.165503000 Z
102
- Supplier_17:
103
- id: 54
104
- supplier_name: Fairy
105
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
106
- created_at: 2014-01-28 21:16:38.034767000 Z
107
- updated_at: 2014-01-28 21:16:38.034767000 Z
108
- Supplier_18:
109
- id: 2
110
- supplier_name: Farfalla
111
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
112
- created_at: 2014-01-28 21:15:57.280990000 Z
113
- updated_at: 2014-01-28 21:15:57.280990000 Z
114
- Supplier_19:
115
- id: 16
116
- supplier_name: Feuer & Glas
117
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
118
- created_at: 2014-01-28 21:16:00.039623000 Z
119
- updated_at: 2014-01-28 21:16:00.039623000 Z
120
- Supplier_20:
121
- id: 24
122
- supplier_name: FeuerGlas
123
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
124
- created_at: 2014-01-28 21:16:01.879714000 Z
125
- updated_at: 2014-01-28 21:16:01.879714000 Z
126
- Supplier_21:
127
- id: 23
128
- supplier_name: Frosch & Rabe
129
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
130
- created_at: 2014-01-28 21:16:01.378903000 Z
131
- updated_at: 2014-01-28 21:16:01.378903000 Z
132
- Supplier_22:
133
- id: 4
134
- supplier_name: Goodwill
135
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
136
- created_at: 2014-01-28 21:15:57.609804000 Z
137
- updated_at: 2014-01-28 21:15:57.609804000 Z
138
- Supplier_23:
139
- id: 27
140
- supplier_name: Hata
141
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
142
- created_at: 2014-01-28 21:16:02.881223000 Z
143
- updated_at: 2014-01-28 21:16:02.881223000 Z
144
- Supplier_24:
145
- id: 6
146
- supplier_name: Himalaya
147
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
148
- created_at: 2014-01-28 21:15:58.243113000 Z
149
- updated_at: 2014-01-28 21:15:58.243113000 Z
150
- Supplier_25:
151
- id: 39
152
- supplier_name: Intia
153
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
154
- created_at: 2014-01-28 21:16:08.331674000 Z
155
- updated_at: 2014-01-28 21:16:08.331674000 Z
156
- Supplier_26:
157
- id: 48
158
- supplier_name: Ipuro
159
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
160
- created_at: 2014-01-28 21:16:18.324526000 Z
161
- updated_at: 2014-01-28 21:16:18.324526000 Z
162
- Supplier_27:
163
- id: 29
164
- supplier_name: Jameson & Tailor
165
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
166
- created_at: 2014-01-28 21:16:03.065052000 Z
167
- updated_at: 2014-01-28 21:16:03.065052000 Z
168
- Supplier_28:
169
- id: 7
170
- supplier_name: Jameson&Tailor
171
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
172
- created_at: 2014-01-28 21:15:58.441271000 Z
173
- updated_at: 2014-01-28 21:15:58.441271000 Z
174
- Supplier_29:
175
- id: 5
176
- supplier_name: Jameson&Taylor
177
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
178
- created_at: 2014-01-28 21:15:57.671785000 Z
179
- updated_at: 2014-01-28 21:15:57.671785000 Z
180
- Supplier_30:
181
- id: 36
182
- supplier_name: KasoKana
183
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
184
- created_at: 2014-01-28 21:16:05.184496000 Z
185
- updated_at: 2014-01-28 21:16:05.184496000 Z
186
- Supplier_31:
187
- id: 35
188
- supplier_name: Kaszer
189
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
190
- created_at: 2014-01-28 21:16:04.859249000 Z
191
- updated_at: 2014-01-28 21:16:04.859249000 Z
192
- Supplier_32:
193
- id: 18
194
- supplier_name: Khaosan
195
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
196
- created_at: 2014-01-28 21:16:00.226320000 Z
197
- updated_at: 2014-01-28 21:16:00.226320000 Z
198
- Supplier_33:
199
- id: 44
200
- supplier_name: Klippan
201
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
202
- created_at: 2014-01-28 21:16:10.506529000 Z
203
- updated_at: 2014-01-28 21:16:10.506529000 Z
204
- Supplier_34:
205
- id: 37
206
- supplier_name: Legian
207
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
208
- created_at: 2014-01-28 21:16:06.300774000 Z
209
- updated_at: 2014-01-28 21:16:06.300774000 Z
210
- Supplier_35:
211
- id: 43
212
- supplier_name: Lollia
213
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
214
- created_at: 2014-01-28 21:16:10.474547000 Z
215
- updated_at: 2014-01-28 21:16:10.474547000 Z
216
- Supplier_36:
217
- id: 32
218
- supplier_name: Loqi
219
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
220
- created_at: 2014-01-28 21:16:03.427532000 Z
221
- updated_at: 2014-01-28 21:16:03.427532000 Z
222
- Supplier_37:
223
- id: 31
224
- supplier_name: Lotao
225
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
226
- created_at: 2014-01-28 21:16:03.115165000 Z
227
- updated_at: 2014-01-28 21:16:03.115165000 Z
228
- Supplier_38:
229
- id: 42
230
- supplier_name: Lovely
231
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
232
- created_at: 2014-01-28 21:16:09.183316000 Z
233
- updated_at: 2014-01-28 21:16:09.183316000 Z
234
- Supplier_39:
235
- id: 47
236
- supplier_name: NatureScent
237
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
238
- created_at: 2014-01-28 21:16:14.647809000 Z
239
- updated_at: 2014-01-28 21:16:14.647809000 Z
240
- Supplier_40:
241
- id: 25
242
- supplier_name: NoName
243
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
244
- created_at: 2014-01-28 21:16:01.889551000 Z
245
- updated_at: 2014-01-28 21:16:01.889551000 Z
246
- Supplier_41:
247
- id: 55
248
- supplier_name: Orient Import
249
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
250
- created_at: 2014-01-28 21:16:45.803286000 Z
251
- updated_at: 2014-01-28 21:16:45.803286000 Z
252
- Supplier_42:
253
- id: 21
254
- supplier_name: PE Florence
255
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
256
- created_at: 2014-01-28 21:16:00.690513000 Z
257
- updated_at: 2014-01-28 21:16:00.690513000 Z
258
- Supplier_43:
259
- id: 53
260
- supplier_name: Pajoma
261
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
262
- created_at: 2014-01-28 21:16:25.922802000 Z
263
- updated_at: 2014-01-28 21:16:25.922802000 Z
264
- Supplier_44:
265
- id: 34
266
- supplier_name: Putumamayo
267
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
268
- created_at: 2014-01-28 21:16:03.999158000 Z
269
- updated_at: 2014-01-28 21:16:03.999158000 Z
270
- Supplier_45:
271
- id: 33
272
- supplier_name: Putumayo
273
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
274
- created_at: 2014-01-28 21:16:03.982017000 Z
275
- updated_at: 2014-01-28 21:16:03.982017000 Z
276
- Supplier_46:
277
- id: 50
278
- supplier_name: Qubu Mirror
279
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
280
- created_at: 2014-01-28 21:16:22.306955000 Z
281
- updated_at: 2014-01-28 21:16:22.306955000 Z
282
- Supplier_47:
283
- id: 38
284
- supplier_name: Rainbow Silver
285
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
286
- created_at: 2014-01-28 21:16:07.863958000 Z
287
- updated_at: 2014-01-28 21:16:07.863958000 Z
288
- Supplier_48:
289
- id: 52
290
- supplier_name: Seyko
291
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
292
- created_at: 2014-01-28 21:16:24.955805000 Z
293
- updated_at: 2014-01-28 21:16:24.955805000 Z
294
- Supplier_49:
295
- id: 40
296
- supplier_name: Suka Suka
297
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
298
- created_at: 2014-01-28 21:16:08.908621000 Z
299
- updated_at: 2014-01-28 21:16:08.908621000 Z
300
- Supplier_50:
301
- id: 3
302
- supplier_name: Sybra
303
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
304
- created_at: 2014-01-28 21:15:57.459440000 Z
305
- updated_at: 2014-01-28 21:15:57.459440000 Z
306
- Supplier_51:
307
- id: 28
308
- supplier_name: Tegalalang
309
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
310
- created_at: 2014-01-28 21:16:02.898732000 Z
311
- updated_at: 2014-01-28 21:16:02.898732000 Z
312
- Supplier_52:
313
- id: 51
314
- supplier_name: Tegallalang
315
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
316
- created_at: 2014-01-28 21:16:24.345785000 Z
317
- updated_at: 2014-01-28 21:16:24.345785000 Z
318
- Supplier_53:
319
- id: 49
320
- supplier_name: Treshna Bali
321
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
322
- created_at: 2014-01-28 21:16:19.802273000 Z
323
- updated_at: 2014-01-28 21:16:19.802273000 Z
324
- Supplier_54:
325
- id: 11
326
- supplier_name: YamYam
327
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
328
- created_at: 2014-01-28 21:15:58.969236000 Z
329
- updated_at: 2014-01-28 21:15:58.969236000 Z
330
- Supplier_55:
331
- id: 26
332
- supplier_name: farfalla
333
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
334
- created_at: 2014-01-28 21:16:02.288026000 Z
335
- updated_at: 2014-01-28 21:16:02.288026000 Z
336
- Supplier_56:
337
- id: 19
338
- supplier_name: none
339
- address: !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}
340
- created_at: 2014-01-28 21:16:00.491258000 Z
341
- updated_at: 2014-01-28 21:16:00.491258000 Z