synergy 0.50.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +9 -0
- data/LICENSE.txt +674 -0
- data/README.md +53 -0
- data/Rakefile +76 -0
- data/app/controllers/admin/products_controller_decorator.rb +64 -0
- data/app/controllers/checkout_controller_decorator.rb +10 -0
- data/app/models/calculator/cash_on_delivery.rb +14 -0
- data/app/models/taxon_decorator.rb +3 -0
- data/app/views/admin/overview/index.html.erb +170 -0
- data/app/views/admin/products/index.html.erb +94 -0
- data/app/views/shared/_filters.html.erb +0 -0
- data/config/initializers/secoint.rb +1 -0
- data/config/locales/affiliate_ru.yml +12 -0
- data/config/locales/devise.ru.yml +48 -0
- data/config/locales/email_to_friend_ru.yml +22 -0
- data/config/locales/reviews_ru.yml +59 -0
- data/config/locales/robokassa_ru.yml +14 -0
- data/config/locales/ru.yml +65 -0
- data/config/locales/wishlist_ru.yml +27 -0
- data/config/routes.rb +4 -0
- data/db/default/countries.yml +1583 -0
- data/db/default/roles.yml +7 -0
- data/db/default/states.yml +418 -0
- data/db/default/zone_members.yml +7 -0
- data/db/default/zones.yml +8 -0
- data/db/migrate/20090311090247_make_unicode_friendly.rb +48 -0
- data/db/migrate/20090827180351_add_secondname_to_addresses.rb +9 -0
- data/db/sample/calculators.yml +16 -0
- data/db/sample/preferences.yml +20 -0
- data/db/sample/shipping_categories.yml +3 -0
- data/db/sample/shipping_methods.yml +9 -0
- data/lib/synergy.rb +48 -0
- data/lib/synergy_hooks.rb +8 -0
- data/lib/tasks/install.rake +30 -0
- data/lib/tasks/synergy.rake +1 -0
- data/public/images/admin/icons/help.png +0 -0
- data/public/javascripts/admin/inline_help.js +24 -0
- data/public/javascripts/admin/jquery.simpletip-1.3.1.pack.js +14 -0
- data/public/stylesheets/admin/inline_help.css +21 -0
- data/public/stylesheets/admin/synergy.css +8 -0
- data/spec/spec_helper.rb +30 -0
- data/synergy.gemspec +30 -0
- metadata +261 -0
@@ -0,0 +1,418 @@
|
|
1
|
+
---
|
2
|
+
<% country_id = 168 %>
|
3
|
+
states_01:
|
4
|
+
id: 1
|
5
|
+
name: "Республика Адыгея"
|
6
|
+
country_id: <%= country_id %>
|
7
|
+
abbr: "RU-AD"
|
8
|
+
states_02:
|
9
|
+
id: 2
|
10
|
+
name: "Республика Башкортостан"
|
11
|
+
country_id: <%= country_id %>
|
12
|
+
abbr: "RU-BA"
|
13
|
+
states_03:
|
14
|
+
id: 3
|
15
|
+
name: "Республика Бурятия"
|
16
|
+
country_id: <%= country_id %>
|
17
|
+
abbr: "RU-BU"
|
18
|
+
states_04:
|
19
|
+
id: 4
|
20
|
+
name: "Республика Алтай"
|
21
|
+
country_id: <%= country_id %>
|
22
|
+
abbr: "RU-AL"
|
23
|
+
states_05:
|
24
|
+
id: 5
|
25
|
+
name: "Республика Дагестан"
|
26
|
+
country_id: <%= country_id %>
|
27
|
+
abbr: "RU-DA"
|
28
|
+
states_06:
|
29
|
+
id: 6
|
30
|
+
name: "Республика Ингушетия"
|
31
|
+
country_id: <%= country_id %>
|
32
|
+
abbr: "RU-IN"
|
33
|
+
states_07:
|
34
|
+
id: 7
|
35
|
+
name: "Кабардино-Балкарская республика"
|
36
|
+
country_id: <%= country_id %>
|
37
|
+
abbr: "RU-KB"
|
38
|
+
states_08:
|
39
|
+
id: 8
|
40
|
+
name: "Республика Калмыкия"
|
41
|
+
country_id: <%= country_id %>
|
42
|
+
abbr: "RU-KL"
|
43
|
+
states_09:
|
44
|
+
id: 9
|
45
|
+
name: "Карачаево-Черкесская республика"
|
46
|
+
country_id: <%= country_id %>
|
47
|
+
abbr: "RU-KC"
|
48
|
+
states_10:
|
49
|
+
id: 10
|
50
|
+
name: "Республика Карелия"
|
51
|
+
country_id: <%= country_id %>
|
52
|
+
abbr: "RU-KR"
|
53
|
+
states_11:
|
54
|
+
id: 11
|
55
|
+
name: "Республика Коми"
|
56
|
+
country_id: <%= country_id %>
|
57
|
+
abbr: "RU-KO"
|
58
|
+
states_12:
|
59
|
+
id: 12
|
60
|
+
name: "Республика Марий Эл"
|
61
|
+
country_id: <%= country_id %>
|
62
|
+
abbr: "RU-ME"
|
63
|
+
states_13:
|
64
|
+
id: 13
|
65
|
+
name: "Республика Мордовия"
|
66
|
+
country_id: <%= country_id %>
|
67
|
+
abbr: "RU-MO"
|
68
|
+
states_14:
|
69
|
+
id: 14
|
70
|
+
name: "Республика Саха (Якутия)"
|
71
|
+
country_id: <%= country_id %>
|
72
|
+
abbr: "RU-SA"
|
73
|
+
states_15:
|
74
|
+
id: 15
|
75
|
+
name: "Республика Северная Осетия — Алания"
|
76
|
+
country_id: <%= country_id %>
|
77
|
+
abbr: "RU-SE"
|
78
|
+
states_16:
|
79
|
+
id: 16
|
80
|
+
name: "Республика Татарстан"
|
81
|
+
country_id: <%= country_id %>
|
82
|
+
abbr: "RU-TA"
|
83
|
+
states_17:
|
84
|
+
id: 17
|
85
|
+
name: "Республика Тыва"
|
86
|
+
country_id: <%= country_id %>
|
87
|
+
abbr: "RU-TY"
|
88
|
+
states_18:
|
89
|
+
id: 18
|
90
|
+
name: "Удмуртская республика"
|
91
|
+
country_id: <%= country_id %>
|
92
|
+
abbr: "RU-UD"
|
93
|
+
states_19:
|
94
|
+
id: 19
|
95
|
+
name: "Республика Хакасия"
|
96
|
+
country_id: <%= country_id %>
|
97
|
+
abbr: "RU-KK"
|
98
|
+
states_20:
|
99
|
+
id: 20
|
100
|
+
name: "Чеченская республика"
|
101
|
+
country_id: <%= country_id %>
|
102
|
+
abbr: "RU-CE"
|
103
|
+
states_21:
|
104
|
+
id: 21
|
105
|
+
name: "Чувашская республика"
|
106
|
+
country_id: <%= country_id %>
|
107
|
+
abbr: "RU-CU"
|
108
|
+
states_22:
|
109
|
+
id: 22
|
110
|
+
name: "Алтайский край"
|
111
|
+
country_id: <%= country_id %>
|
112
|
+
abbr: "RU-ALT"
|
113
|
+
states_75:
|
114
|
+
id: 75
|
115
|
+
name: "Забайкальский край"
|
116
|
+
country_id: <%= country_id %>
|
117
|
+
abbr: "RU-ZAB"
|
118
|
+
states_41:
|
119
|
+
id: 41
|
120
|
+
name: "Камчатский край"
|
121
|
+
country_id: <%= country_id %>
|
122
|
+
abbr: "RU-KAM"
|
123
|
+
states_23:
|
124
|
+
id: 23
|
125
|
+
name: "Краснодарский край"
|
126
|
+
country_id: <%= country_id %>
|
127
|
+
abbr: "RU-KDA"
|
128
|
+
states_24:
|
129
|
+
id: 24
|
130
|
+
name: "Красноярский край"
|
131
|
+
country_id: <%= country_id %>
|
132
|
+
abbr: "RU-KIA"
|
133
|
+
states_59:
|
134
|
+
id: 59
|
135
|
+
name: "Пермский край"
|
136
|
+
country_id: <%= country_id %>
|
137
|
+
abbr: "RU-PER"
|
138
|
+
states_25:
|
139
|
+
id: 25
|
140
|
+
name: "Приморский край"
|
141
|
+
country_id: <%= country_id %>
|
142
|
+
abbr: "RU-PRI"
|
143
|
+
states_26:
|
144
|
+
id: 26
|
145
|
+
name: "Ставропольский край"
|
146
|
+
country_id: <%= country_id %>
|
147
|
+
abbr: "RU-STA"
|
148
|
+
states_27:
|
149
|
+
id: 27
|
150
|
+
name: "Хабаровский край"
|
151
|
+
country_id: <%= country_id %>
|
152
|
+
abbr: "RU-KHA"
|
153
|
+
states_28:
|
154
|
+
id: 28
|
155
|
+
name: "Амурская область"
|
156
|
+
country_id: <%= country_id %>
|
157
|
+
abbr: "RU-AMU"
|
158
|
+
states_29:
|
159
|
+
id: 29
|
160
|
+
name: "Архангельская область"
|
161
|
+
country_id: <%= country_id %>
|
162
|
+
abbr: "RU-ARK"
|
163
|
+
states_30:
|
164
|
+
id: 30
|
165
|
+
name: "Астраханская область"
|
166
|
+
country_id: <%= country_id %>
|
167
|
+
abbr: "RU-AST"
|
168
|
+
states_31:
|
169
|
+
id: 31
|
170
|
+
name: "Белгородская область"
|
171
|
+
country_id: <%= country_id %>
|
172
|
+
abbr: "RU-BEL"
|
173
|
+
states_32:
|
174
|
+
id: 32
|
175
|
+
name: "Брянская область"
|
176
|
+
country_id: <%= country_id %>
|
177
|
+
abbr: "RU-BRY"
|
178
|
+
states_33:
|
179
|
+
id: 33
|
180
|
+
name: "Владимирская область"
|
181
|
+
country_id: <%= country_id %>
|
182
|
+
abbr: "RU-VLA"
|
183
|
+
states_34:
|
184
|
+
id: 34
|
185
|
+
name: "Волгоградская область"
|
186
|
+
country_id: <%= country_id %>
|
187
|
+
abbr: "RU-VGG"
|
188
|
+
states_35:
|
189
|
+
id: 35
|
190
|
+
name: "Вологодская область"
|
191
|
+
country_id: <%= country_id %>
|
192
|
+
abbr: "RU-VLG"
|
193
|
+
states_36:
|
194
|
+
id: 36
|
195
|
+
name: "Воронежская область"
|
196
|
+
country_id: <%= country_id %>
|
197
|
+
abbr: "RU-VOR"
|
198
|
+
states_37:
|
199
|
+
id: 37
|
200
|
+
name: "Ивановская область"
|
201
|
+
country_id: <%= country_id %>
|
202
|
+
abbr: "RU-IVA"
|
203
|
+
states_38:
|
204
|
+
id: 38
|
205
|
+
name: "Иркутская область"
|
206
|
+
country_id: <%= country_id %>
|
207
|
+
abbr: "RU-IRK"
|
208
|
+
states_39:
|
209
|
+
id: 39
|
210
|
+
name: "Калининградская область"
|
211
|
+
country_id: <%= country_id %>
|
212
|
+
abbr: "RU-KGD"
|
213
|
+
states_40:
|
214
|
+
id: 40
|
215
|
+
name: "Калужская область"
|
216
|
+
country_id: <%= country_id %>
|
217
|
+
abbr: "RU-KLU"
|
218
|
+
states_42:
|
219
|
+
id: 42
|
220
|
+
name: "Кемеровская область"
|
221
|
+
country_id: <%= country_id %>
|
222
|
+
abbr: "RU-KEM"
|
223
|
+
states_43:
|
224
|
+
id: 43
|
225
|
+
name: "Кировская область"
|
226
|
+
country_id: <%= country_id %>
|
227
|
+
abbr: "RU-KIR"
|
228
|
+
states_44:
|
229
|
+
id: 44
|
230
|
+
name: "Костромская область"
|
231
|
+
country_id: <%= country_id %>
|
232
|
+
abbr: "RU-KOS"
|
233
|
+
states_45:
|
234
|
+
id: 45
|
235
|
+
name: "Курганская область"
|
236
|
+
country_id: <%= country_id %>
|
237
|
+
abbr: "RU-KGN"
|
238
|
+
states_46:
|
239
|
+
id: 46
|
240
|
+
name: "Курская область"
|
241
|
+
country_id: <%= country_id %>
|
242
|
+
abbr: "RU-KRS"
|
243
|
+
states_47:
|
244
|
+
id: 47
|
245
|
+
name: "Ленинградская область"
|
246
|
+
country_id: <%= country_id %>
|
247
|
+
abbr: "RU-LEN"
|
248
|
+
states_48:
|
249
|
+
id: 48
|
250
|
+
name: "Липецкая область"
|
251
|
+
country_id: <%= country_id %>
|
252
|
+
abbr: "RU-LIP"
|
253
|
+
states_49:
|
254
|
+
id: 49
|
255
|
+
name: "Магаданская область"
|
256
|
+
country_id: <%= country_id %>
|
257
|
+
abbr: "RU-MAG"
|
258
|
+
states_50:
|
259
|
+
id: 50
|
260
|
+
name: "Московская область"
|
261
|
+
country_id: <%= country_id %>
|
262
|
+
abbr: "RU-MOS"
|
263
|
+
states_51:
|
264
|
+
id: 51
|
265
|
+
name: "Мурманская область"
|
266
|
+
country_id: <%= country_id %>
|
267
|
+
abbr: "RU-MUR"
|
268
|
+
states_52:
|
269
|
+
id: 52
|
270
|
+
name: "Нижегородская область"
|
271
|
+
country_id: <%= country_id %>
|
272
|
+
abbr: "RU-NIZ"
|
273
|
+
states_53:
|
274
|
+
id: 53
|
275
|
+
name: "Новгородская область"
|
276
|
+
country_id: <%= country_id %>
|
277
|
+
abbr: "RU-NGR"
|
278
|
+
states_54:
|
279
|
+
id: 54
|
280
|
+
name: "Новосибирская область"
|
281
|
+
country_id: <%= country_id %>
|
282
|
+
abbr: "RU-NVS"
|
283
|
+
states_55:
|
284
|
+
id: 55
|
285
|
+
name: "Омская область"
|
286
|
+
country_id: <%= country_id %>
|
287
|
+
abbr: "RU-OMS"
|
288
|
+
states_56:
|
289
|
+
id: 56
|
290
|
+
name: "Оренбургская область"
|
291
|
+
country_id: <%= country_id %>
|
292
|
+
abbr: "RU-ORE"
|
293
|
+
states_57:
|
294
|
+
id: 57
|
295
|
+
name: "Орловская область"
|
296
|
+
country_id: <%= country_id %>
|
297
|
+
abbr: "RU-ORL"
|
298
|
+
states_58:
|
299
|
+
id: 58
|
300
|
+
name: "Пензенская область"
|
301
|
+
country_id: <%= country_id %>
|
302
|
+
abbr: "RU-PNZ"
|
303
|
+
states_60:
|
304
|
+
id: 60
|
305
|
+
name: "Псковская область"
|
306
|
+
country_id: <%= country_id %>
|
307
|
+
abbr: "RU-PSK"
|
308
|
+
states_61:
|
309
|
+
id: 61
|
310
|
+
name: "Ростовская область"
|
311
|
+
country_id: <%= country_id %>
|
312
|
+
abbr: "RU-ROS"
|
313
|
+
states_62:
|
314
|
+
id: 62
|
315
|
+
name: "Рязанская область"
|
316
|
+
country_id: <%= country_id %>
|
317
|
+
abbr: "RU-RYA"
|
318
|
+
states_63:
|
319
|
+
id: 63
|
320
|
+
name: "Самарская область"
|
321
|
+
country_id: <%= country_id %>
|
322
|
+
abbr: "RU-SAM"
|
323
|
+
states_64:
|
324
|
+
id: 64
|
325
|
+
name: "Саратовская область"
|
326
|
+
country_id: <%= country_id %>
|
327
|
+
abbr: "RU-SAR"
|
328
|
+
states_65:
|
329
|
+
id: 65
|
330
|
+
name: "Сахалинская область"
|
331
|
+
country_id: <%= country_id %>
|
332
|
+
abbr: "RU-SAK"
|
333
|
+
states_66:
|
334
|
+
id: 66
|
335
|
+
name: "Свердловская область"
|
336
|
+
country_id: <%= country_id %>
|
337
|
+
abbr: "RU-SVE"
|
338
|
+
states_67:
|
339
|
+
id: 67
|
340
|
+
name: "Смоленская область"
|
341
|
+
country_id: <%= country_id %>
|
342
|
+
abbr: "RU-SMO"
|
343
|
+
states_68:
|
344
|
+
id: 68
|
345
|
+
name: "Тамбовская область"
|
346
|
+
country_id: <%= country_id %>
|
347
|
+
abbr: "RU-TAM"
|
348
|
+
states_69:
|
349
|
+
id: 69
|
350
|
+
name: "Тверская область"
|
351
|
+
country_id: <%= country_id %>
|
352
|
+
abbr: "RU-TVE"
|
353
|
+
states_70:
|
354
|
+
id: 70
|
355
|
+
name: "Томская область"
|
356
|
+
country_id: <%= country_id %>
|
357
|
+
abbr: "RU-TOM"
|
358
|
+
states_71:
|
359
|
+
id: 71
|
360
|
+
name: "Тульская область"
|
361
|
+
country_id: <%= country_id %>
|
362
|
+
abbr: "RU-TUL"
|
363
|
+
states_72:
|
364
|
+
id: 72
|
365
|
+
name: "Тюменская область"
|
366
|
+
country_id: <%= country_id %>
|
367
|
+
abbr: "RU-TYU"
|
368
|
+
states_73:
|
369
|
+
id: 73
|
370
|
+
name: "Ульяновская область"
|
371
|
+
country_id: <%= country_id %>
|
372
|
+
abbr: "RU-ULY"
|
373
|
+
states_74:
|
374
|
+
id: 74
|
375
|
+
name: "Челябинская область"
|
376
|
+
country_id: <%= country_id %>
|
377
|
+
abbr: "RU-CHE"
|
378
|
+
states_76:
|
379
|
+
id: 76
|
380
|
+
name: "Ярославская область"
|
381
|
+
country_id: <%= country_id %>
|
382
|
+
abbr: "RU-YAR"
|
383
|
+
states_77:
|
384
|
+
id: 77
|
385
|
+
name: "Москва"
|
386
|
+
country_id: <%= country_id %>
|
387
|
+
abbr: "RU-MOW"
|
388
|
+
states_78:
|
389
|
+
id: 78
|
390
|
+
name: "Санкт-Петербург"
|
391
|
+
country_id: <%= country_id %>
|
392
|
+
abbr: "RU-SPE"
|
393
|
+
states_79:
|
394
|
+
id: 79
|
395
|
+
name: "Еврейская автономная область"
|
396
|
+
country_id: <%= country_id %>
|
397
|
+
abbr: "RU-YEV"
|
398
|
+
states_83:
|
399
|
+
id: 83
|
400
|
+
name: "Ненецкий автономный округ"
|
401
|
+
country_id: <%= country_id %>
|
402
|
+
abbr: "RU-NEN"
|
403
|
+
states_86:
|
404
|
+
id: 86
|
405
|
+
name: "Ханты-Мансийский автономный округ - Югра"
|
406
|
+
country_id: <%= country_id %>
|
407
|
+
abbr: "RU-KHM"
|
408
|
+
states_87:
|
409
|
+
id: 87
|
410
|
+
name: "Чукотский автономный округ"
|
411
|
+
country_id: <%= country_id %>
|
412
|
+
abbr: "RU-CHU"
|
413
|
+
states_89:
|
414
|
+
id: 89
|
415
|
+
name: "Ямало-Ненецкий автономный округ"
|
416
|
+
country_id: <%= country_id %>
|
417
|
+
abbr: "RU-YAN"
|
418
|
+
|
@@ -0,0 +1,48 @@
|
|
1
|
+
class MakeUnicodeFriendly < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
alter_database_and_tables_charsets "utf8", "utf8_general_ci"
|
4
|
+
end
|
5
|
+
|
6
|
+
def self.down
|
7
|
+
alter_database_and_tables_charsets
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
def self.alter_database_and_tables_charsets charset = default_charset, collation = default_collation
|
12
|
+
case connection.adapter_name
|
13
|
+
when 'Mysql2'
|
14
|
+
execute "ALTER DATABASE `#{connection.current_database}` CHARACTER SET #{charset} COLLATE #{collation}"
|
15
|
+
|
16
|
+
connection.tables.each do |table|
|
17
|
+
execute "ALTER TABLE #{table} CONVERT TO CHARACTER SET #{charset} COLLATE #{collation}"
|
18
|
+
end
|
19
|
+
else
|
20
|
+
# OK, not quite irreversible but can't be done if there's not
|
21
|
+
# the code here to support it...
|
22
|
+
# raise ActiveRecord::IrreversibleMigration.new("Migration error: Unsupported database for migration to UTF-8 support")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.default_charset
|
27
|
+
case connection.adapter_name
|
28
|
+
when 'Mysql2'
|
29
|
+
execute("show variables like 'character_set_server'").fetch_hash['Value']
|
30
|
+
else
|
31
|
+
nil
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.default_collation
|
36
|
+
case connection.adapter_name
|
37
|
+
when 'Mysql2'
|
38
|
+
execute("show variables like 'collation_server'").fetch_hash['Value']
|
39
|
+
else
|
40
|
+
nil
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.connection
|
45
|
+
ActiveRecord::Base.connection
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|