forgeos_core 1.9.1 → 1.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. data/COPYING +339 -0
  2. data/COPYING.LESSER +165 -0
  3. data/app/assets/images/forgeos/dataTables/Sorting icons.psd +0 -0
  4. data/app/assets/images/forgeos/dataTables/back_disabled.jpg +0 -0
  5. data/app/assets/images/forgeos/dataTables/back_enabled.jpg +0 -0
  6. data/app/assets/images/forgeos/dataTables/favicon.ico +0 -0
  7. data/app/assets/images/forgeos/dataTables/forward_disabled.jpg +0 -0
  8. data/app/assets/images/forgeos/dataTables/forward_enabled.jpg +0 -0
  9. data/app/assets/images/forgeos/dataTables/sort_asc.png +0 -0
  10. data/app/assets/images/forgeos/dataTables/sort_asc_disabled.png +0 -0
  11. data/app/assets/images/forgeos/dataTables/sort_both.png +0 -0
  12. data/app/assets/images/forgeos/dataTables/sort_desc.png +0 -0
  13. data/app/assets/images/forgeos/dataTables/sort_desc_disabled.png +0 -0
  14. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/bubble-quantity-products.png +0 -0
  15. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/check-checked.png +0 -0
  16. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/check-unchecked.png +0 -0
  17. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/context.gif +0 -0
  18. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/create.png +0 -0
  19. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/dark-blue-minus.png +0 -0
  20. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/dark-blue-plus.png +0 -0
  21. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/dot.gif +0 -0
  22. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/f.png +0 -0
  23. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/fminus.gif +0 -0
  24. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/fminus_rtl.gif +0 -0
  25. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/folder.png +0 -0
  26. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/fplus.gif +0 -0
  27. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/fplus_rtl.gif +0 -0
  28. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/lastli.gif +0 -0
  29. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/lastli_rtl.gif +0 -0
  30. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/li.gif +0 -0
  31. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/remove.png +0 -0
  32. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/rename.png +0 -0
  33. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/association_categories/throbber.gif +0 -0
  34. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/brown-minus.png +0 -0
  35. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/brown-plus.png +0 -0
  36. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/bubble-quantity-elements.png +0 -0
  37. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/context.gif +0 -0
  38. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/create.png +0 -0
  39. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/dot.gif +0 -0
  40. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/f.png +0 -0
  41. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/fminus.gif +0 -0
  42. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/fminus_rtl.gif +0 -0
  43. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/fplus.gif +0 -0
  44. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/fplus_rtl.gif +0 -0
  45. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/images.png +0 -0
  46. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/lastli.gif +0 -0
  47. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/lastli_rtl.gif +0 -0
  48. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/li.gif +0 -0
  49. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/remove.png +0 -0
  50. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/rename.png +0 -0
  51. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/categories/throbber.gif +0 -0
  52. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/marker.gif +0 -0
  53. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/marker_rtl.gif +0 -0
  54. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/plus.gif +0 -0
  55. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/remove.gif +0 -0
  56. data/app/assets/{stylesheets → images}/forgeos/jstree/themes/remove.png +0 -0
  57. data/app/assets/javascripts/forgeos/admin/functions/forgeos_core/commons.js +8 -3
  58. data/app/assets/javascripts/forgeos/admin/functions/forgeos_core/dataTable.js +2 -2
  59. data/app/assets/javascripts/forgeos/admin/functions/forgeos_core/tinyMCE.js +1 -1
  60. data/app/assets/javascripts/forgeos/admin/functions/forgeos_core/trees.js +202 -257
  61. data/app/assets/javascripts/forgeos/admin/inits/forgeos_core/left-sidebar.js +16 -23
  62. data/app/assets/javascripts/forgeos/admin/inits/forgeos_core/settings.js +5 -5
  63. data/app/assets/javascripts/forgeos/admin/inits/forgeos_core/tabs.js +3 -3
  64. data/app/assets/javascripts/forgeos/admin/inits/forgeos_core/trees.js +2 -45
  65. data/app/assets/javascripts/forgeos/jquery.dataTables.min.js +138 -529
  66. data/app/assets/javascripts/forgeos/jstree/jquery.jstree.js +4544 -0
  67. data/app/assets/stylesheets/forgeos/admin/forgeos_core/_lightbox.css.sass +2 -21
  68. data/app/assets/stylesheets/forgeos/admin/forgeos_core/_settings.css.sass +77 -39
  69. data/app/assets/stylesheets/forgeos/dataTables/demo_table.css +150 -27
  70. data/app/assets/stylesheets/forgeos/jstree/themes/association_categories/style.css.sass +36 -154
  71. data/app/assets/stylesheets/forgeos/jstree/themes/categories/style.css.sass +59 -58
  72. data/app/controllers/admin/accounts_controller.rb +1 -1
  73. data/app/controllers/admin/administrators_controller.rb +13 -4
  74. data/app/controllers/admin/attachments_controller.rb +7 -3
  75. data/app/controllers/admin/base_controller.rbc +1305 -0
  76. data/app/controllers/admin/categories_controller.rb +1 -1
  77. data/app/controllers/admin/dashboard_controller.rbc +361 -0
  78. data/app/controllers/admin/person_sessions_controller.rbc +1248 -0
  79. data/app/controllers/admin/rights_controller.rb +6 -6
  80. data/app/controllers/admin/roles_controller.rb +8 -3
  81. data/app/controllers/admin/users_controller.rb +12 -6
  82. data/app/controllers/forgeos/application_controller.rb +1 -2
  83. data/app/controllers/forgeos/application_controller.rbc +2027 -0
  84. data/app/helpers/admin/attachment_helper.rbc +2340 -0
  85. data/app/helpers/admin/base_helper.rb +0 -15
  86. data/app/helpers/admin/base_helper.rbc +2522 -0
  87. data/app/helpers/forgeos/application_helper.rbc +3152 -0
  88. data/app/models/administrator.rbc +415 -0
  89. data/app/models/category.rb +3 -3
  90. data/app/models/person.rb +5 -9
  91. data/app/models/person.rbc +1498 -0
  92. data/app/models/person_session.rbc +142 -0
  93. data/app/models/right.rbc +432 -0
  94. data/app/models/role.rbc +469 -0
  95. data/app/models/setting.rbc +699 -0
  96. data/app/views/admin/accounts/_form.html.haml +1 -1
  97. data/app/views/admin/administrators/activate.js.erb +1 -0
  98. data/app/views/admin/administrators/destroy.js.erb +1 -0
  99. data/app/views/admin/administrators/index.json.erb +10 -12
  100. data/app/views/admin/attachments/_form.html.haml +2 -2
  101. data/app/views/admin/attachments/destroy.js.erb +1 -0
  102. data/app/views/admin/attachments/index.json.erb +4 -5
  103. data/app/views/admin/categories/_associated_elements.html.haml +4 -8
  104. data/app/views/admin/categories/index.json.erb +1 -1
  105. data/app/views/admin/rights/destroy.js.erb +1 -0
  106. data/app/views/admin/rights/index.json.erb +5 -6
  107. data/app/views/admin/roles/activate.js.erb +1 -0
  108. data/app/views/admin/roles/destroy.js.erb +1 -0
  109. data/app/views/admin/roles/index.json.erb +10 -12
  110. data/app/views/admin/settings/_tabs.html.haml +0 -6
  111. data/app/views/admin/settings/edit.html.haml +19 -16
  112. data/app/views/admin/sidebars/_attachments_popups.html.haml +1 -1
  113. data/app/views/admin/sidebars/_left_sidebar.html.haml +2 -2
  114. data/app/views/admin/users/activate.js.erb +1 -0
  115. data/app/views/admin/users/destroy.js.erb +1 -0
  116. data/app/views/admin/users/index.json.erb +8 -11
  117. data/app/views/admin/visual/_visual_popup.html.haml +2 -2
  118. data/app/views/admin/visual/_visuals_popup.html.haml +1 -1
  119. data/app/views/layouts/admin.html.haml +5 -4
  120. data/app/views/layouts/admin_login.html.haml +3 -3
  121. data/config/initializers/load_settings.rbc +330 -0
  122. data/config/routes.rb +5 -8
  123. data/config/routes.rbc +2203 -0
  124. data/lib/extensions/form_helper_extensions.rb +2 -2
  125. data/lib/extensions/form_helper_extensions.rbc +295 -0
  126. data/lib/extensions/i18n_fallbacks_config.rbc +246 -0
  127. data/lib/extensions.rbc +126 -0
  128. data/lib/forgeos/core/engine.rbc +316 -0
  129. data/lib/forgeos/core.rbc +325 -0
  130. data/lib/forgeos.rbc +1942 -0
  131. data/lib/forgeos_core.rbc +53 -0
  132. data/lib/map_fields.rbc +4437 -0
  133. data/lib/sortable_attachments.rbc +1399 -0
  134. data/lib/sphinx_globalize.rbc +785 -0
  135. metadata +286 -53
  136. data/app/assets/javascripts/forgeos/jstree/jquery.tree.js +0 -2061
  137. data/app/assets/javascripts/forgeos/jstree/plugins/jquery.tree.contextmenu.js +0 -129
  138. data/app/assets/javascripts/forgeos/jstree/plugins/jquery.tree.cookie.js +0 -70
  139. data/app/assets/stylesheets/forgeos/jquery.selectbox.css +0 -75
  140. data/app/assets/stylesheets/forgeos/jstree/themes/categories/style.css +0 -106
  141. data/app/assets/stylesheets/forgeos/jstree/tree_component.css.sass +0 -204
@@ -0,0 +1,415 @@
1
+ !RBIX
2
+ 5362583714419577066
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 31
13
+ 99
14
+ 7
15
+ 0
16
+ 45
17
+ 1
18
+ 2
19
+ 65
20
+ 49
21
+ 3
22
+ 3
23
+ 13
24
+ 99
25
+ 12
26
+ 7
27
+ 4
28
+ 12
29
+ 7
30
+ 5
31
+ 12
32
+ 65
33
+ 12
34
+ 49
35
+ 6
36
+ 4
37
+ 15
38
+ 49
39
+ 4
40
+ 0
41
+ 15
42
+ 2
43
+ 11
44
+ I
45
+ 6
46
+ I
47
+ 0
48
+ I
49
+ 0
50
+ I
51
+ 0
52
+ n
53
+ p
54
+ 7
55
+ x
56
+ 13
57
+ Administrator
58
+ x
59
+ 6
60
+ Person
61
+ n
62
+ x
63
+ 10
64
+ open_class
65
+ x
66
+ 14
67
+ __class_init__
68
+ M
69
+ 1
70
+ n
71
+ n
72
+ x
73
+ 13
74
+ Administrator
75
+ i
76
+ 120
77
+ 5
78
+ 66
79
+ 5
80
+ 7
81
+ 0
82
+ 47
83
+ 49
84
+ 1
85
+ 1
86
+ 15
87
+ 5
88
+ 7
89
+ 2
90
+ 44
91
+ 43
92
+ 3
93
+ 79
94
+ 49
95
+ 4
96
+ 1
97
+ 13
98
+ 7
99
+ 5
100
+ 7
101
+ 0
102
+ 49
103
+ 6
104
+ 2
105
+ 15
106
+ 47
107
+ 49
108
+ 7
109
+ 2
110
+ 15
111
+ 5
112
+ 7
113
+ 8
114
+ 7
115
+ 9
116
+ 47
117
+ 49
118
+ 10
119
+ 2
120
+ 15
121
+ 5
122
+ 7
123
+ 11
124
+ 44
125
+ 43
126
+ 3
127
+ 4
128
+ 4
129
+ 49
130
+ 4
131
+ 1
132
+ 13
133
+ 7
134
+ 12
135
+ 2
136
+ 49
137
+ 6
138
+ 2
139
+ 15
140
+ 13
141
+ 7
142
+ 13
143
+ 7
144
+ 14
145
+ 64
146
+ 49
147
+ 6
148
+ 2
149
+ 15
150
+ 13
151
+ 7
152
+ 15
153
+ 7
154
+ 16
155
+ 64
156
+ 49
157
+ 6
158
+ 2
159
+ 15
160
+ 13
161
+ 7
162
+ 17
163
+ 7
164
+ 18
165
+ 64
166
+ 49
167
+ 6
168
+ 2
169
+ 15
170
+ 47
171
+ 49
172
+ 19
173
+ 2
174
+ 15
175
+ 5
176
+ 7
177
+ 20
178
+ 47
179
+ 49
180
+ 21
181
+ 1
182
+ 15
183
+ 99
184
+ 7
185
+ 22
186
+ 7
187
+ 23
188
+ 65
189
+ 67
190
+ 49
191
+ 24
192
+ 0
193
+ 49
194
+ 25
195
+ 4
196
+ 11
197
+ I
198
+ 6
199
+ I
200
+ 0
201
+ I
202
+ 0
203
+ I
204
+ 0
205
+ n
206
+ p
207
+ 26
208
+ x
209
+ 4
210
+ role
211
+ x
212
+ 10
213
+ belongs_to
214
+ x
215
+ 6
216
+ rights
217
+ x
218
+ 4
219
+ Hash
220
+ x
221
+ 16
222
+ new_from_literal
223
+ x
224
+ 7
225
+ through
226
+ x
227
+ 3
228
+ []=
229
+ x
230
+ 8
231
+ has_many
232
+ x
233
+ 9
234
+ right_ids
235
+ x
236
+ 7
237
+ role_id
238
+ x
239
+ 15
240
+ attr_accessible
241
+ x
242
+ 10
243
+ categories
244
+ x
245
+ 8
246
+ readonly
247
+ x
248
+ 10
249
+ join_table
250
+ s
251
+ 19
252
+ categories_elements
253
+ x
254
+ 11
255
+ foreign_key
256
+ s
257
+ 10
258
+ element_id
259
+ x
260
+ 23
261
+ association_foreign_key
262
+ s
263
+ 11
264
+ category_id
265
+ x
266
+ 23
267
+ has_and_belongs_to_many
268
+ x
269
+ 8
270
+ activate
271
+ x
272
+ 13
273
+ before_create
274
+ x
275
+ 12
276
+ access_path?
277
+ M
278
+ 1
279
+ n
280
+ n
281
+ x
282
+ 12
283
+ access_path?
284
+ i
285
+ 11
286
+ 5
287
+ 48
288
+ 0
289
+ 20
290
+ 0
291
+ 20
292
+ 1
293
+ 49
294
+ 1
295
+ 2
296
+ 11
297
+ I
298
+ 5
299
+ I
300
+ 2
301
+ I
302
+ 2
303
+ I
304
+ 2
305
+ n
306
+ p
307
+ 2
308
+ x
309
+ 6
310
+ rights
311
+ x
312
+ 39
313
+ find_by_controller_name_and_action_name
314
+ p
315
+ 5
316
+ I
317
+ -1
318
+ I
319
+ e
320
+ I
321
+ 0
322
+ I
323
+ f
324
+ I
325
+ b
326
+ x
327
+ 81
328
+ /home/cyrill62/Sites/fcorer3/vendor/gems/forgeos_core/app/models/administrator.rb
329
+ p
330
+ 2
331
+ x
332
+ 10
333
+ controller
334
+ x
335
+ 6
336
+ action
337
+ x
338
+ 17
339
+ method_visibility
340
+ x
341
+ 15
342
+ add_defn_method
343
+ p
344
+ 25
345
+ I
346
+ 2
347
+ I
348
+ 2
349
+ I
350
+ a
351
+ I
352
+ 3
353
+ I
354
+ 22
355
+ I
356
+ 4
357
+ I
358
+ 2c
359
+ I
360
+ 6
361
+ I
362
+ 2f
363
+ I
364
+ a
365
+ I
366
+ 38
367
+ I
368
+ 7
369
+ I
370
+ 40
371
+ I
372
+ 8
373
+ I
374
+ 4a
375
+ I
376
+ 9
377
+ I
378
+ 54
379
+ I
380
+ a
381
+ I
382
+ 5d
383
+ I
384
+ 6
385
+ I
386
+ 62
387
+ I
388
+ c
389
+ I
390
+ 6a
391
+ I
392
+ e
393
+ I
394
+ 78
395
+ x
396
+ 81
397
+ /home/cyrill62/Sites/fcorer3/vendor/gems/forgeos_core/app/models/administrator.rb
398
+ p
399
+ 0
400
+ x
401
+ 13
402
+ attach_method
403
+ p
404
+ 3
405
+ I
406
+ 0
407
+ I
408
+ 1
409
+ I
410
+ 1f
411
+ x
412
+ 81
413
+ /home/cyrill62/Sites/fcorer3/vendor/gems/forgeos_core/app/models/administrator.rb
414
+ p
415
+ 0
@@ -24,14 +24,14 @@ class Category < ActiveRecord::Base
24
24
  unless self.attachments.empty?
25
25
  "background-image: url('#{self.attachments.first.public_filename(:categories_icon)}') !important;background-position: 0 3px"
26
26
  else
27
- ''
27
+ nil
28
28
  end
29
29
  end
30
30
 
31
31
  def to_jstree
32
32
  hash = {}
33
- hash[:attributes] = { :id => "#{self.class.to_s.underscore}_#{id}", :type => 'folder' }
34
- hash[:data] = { :title => "#{name}<span>#{total_elements_count}</span>", :attributes => { :class => 'big-icons', :style => category_picture }}
33
+ hash[:attr] = { :id => "#{self.class.to_s.underscore}_#{id}", :type => 'folder' }
34
+ hash[:data] = { :title => name, :attr => { :style => category_picture, :title => total_elements_count } }
35
35
  unless children.empty?
36
36
  hash[:children] = children.all(:order => 'position ASC').collect(&:to_jstree)
37
37
  end
data/app/models/person.rb CHANGED
@@ -40,28 +40,24 @@ class Person < ActiveRecord::Base
40
40
 
41
41
  # Disactivates the user in the database.
42
42
  def disactivate
43
- self.active = false
44
- save(false) unless self.new_record?
43
+ update_attribute(:active, false)
45
44
  end
46
45
 
47
46
  # Activates the user in the database.
48
47
  def activate
49
- self.active = true
50
- save(false) unless self.new_record?
48
+ update_attribute(:active, true)
51
49
  end
52
50
 
53
- # return the user status
54
- def active?
55
- self.active
56
- end
51
+ protected
57
52
 
58
- protected
59
53
  def skip_uniquess_of_email?
60
54
  true
61
55
  end
56
+
62
57
  def skip_presence_of_lastname?
63
58
  true
64
59
  end
60
+
65
61
  def skip_presence_of_firstname?
66
62
  true
67
63
  end