six-updater-web 0.10.8 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (742) hide show
  1. data/Rakefile +8 -6
  2. data/bin/six-updater-web +1 -1
  3. data/lib/README +243 -0
  4. data/lib/Rakefile +10 -0
  5. data/lib/app/controllers/actions_controller.rb +23 -0
  6. data/lib/app/controllers/application_controller.rb +20 -0
  7. data/lib/app/controllers/appsettings_controller.rb +40 -0
  8. data/lib/app/controllers/logs_controller.rb +5 -0
  9. data/lib/app/controllers/logsessions_controller.rb +5 -0
  10. data/lib/app/controllers/logviews_controller.rb +52 -0
  11. data/lib/app/controllers/main_controller.rb +432 -0
  12. data/lib/app/controllers/mods_controller.rb +48 -0
  13. data/lib/app/controllers/queryservers_controller.rb +42 -0
  14. data/lib/app/controllers/repositories_controller.rb +16 -0
  15. data/lib/app/controllers/servers_controller.rb +34 -0
  16. data/lib/app/controllers/sixconfigs_controller.rb +33 -0
  17. data/lib/app/controllers/system_settings_controller.rb +5 -0
  18. data/lib/app/helpers/actions_helper.rb +2 -0
  19. data/lib/app/helpers/application_helper.rb +13 -0
  20. data/lib/app/helpers/appsettings_helper.rb +17 -0
  21. data/lib/app/helpers/logs_helper.rb +2 -0
  22. data/lib/app/helpers/logsessions_helper.rb +2 -0
  23. data/lib/app/helpers/logviews_helper.rb +5 -0
  24. data/lib/app/helpers/main_helper.rb +2 -0
  25. data/lib/app/helpers/mods_helper.rb +5 -0
  26. data/lib/app/helpers/queryservers_helper.rb +8 -0
  27. data/lib/app/helpers/repositories_helper.rb +2 -0
  28. data/lib/app/helpers/servers_helper.rb +13 -0
  29. data/lib/app/helpers/sixconfigs_helper.rb +5 -0
  30. data/lib/app/helpers/system_settings_helper.rb +2 -0
  31. data/lib/app/models/action.rb +5 -0
  32. data/lib/app/models/appsetting.rb +18 -0
  33. data/lib/app/models/log.rb +3 -0
  34. data/lib/app/models/log_observer.rb +23 -0
  35. data/lib/app/models/logsession.rb +3 -0
  36. data/lib/app/models/mod.rb +96 -0
  37. data/lib/app/models/queryserver.rb +167 -0
  38. data/lib/app/models/repository.rb +11 -0
  39. data/lib/app/models/server.rb +25 -0
  40. data/lib/app/models/sixconfig.rb +185 -0
  41. data/lib/app/models/system_setting.rb +77 -0
  42. data/lib/app/views/Repositories/imp.erb +1 -0
  43. data/lib/app/views/appsettings/manage.erb +4 -0
  44. data/lib/app/views/layouts/application.haml +48 -0
  45. data/lib/app/views/layouts/empty.haml +2 -0
  46. data/lib/app/views/logviews/_logs.erb +1 -0
  47. data/lib/app/views/logviews/upd.rjs +1 -0
  48. data/lib/app/views/main/_check.haml +18 -0
  49. data/lib/app/views/main/execute.haml +24 -0
  50. data/lib/app/views/main/fetch.haml +2 -0
  51. data/lib/app/views/main/index.haml +100 -0
  52. data/lib/app/views/main/logoutput.erb +6 -0
  53. data/lib/app/views/main/modlogs.erb +5 -0
  54. data/lib/app/views/main/reset.erb +40 -0
  55. data/lib/app/views/main/reset_act.haml +1 -0
  56. data/lib/app/views/mods/imp.haml +1 -0
  57. data/lib/app/views/servers/imp.erb +1 -0
  58. data/lib/config/GeoIP.dat +0 -0
  59. data/lib/config/boot.rb +110 -0
  60. data/lib/config/database.yml +34 -0
  61. data/lib/config/database.yml.sample +34 -0
  62. data/lib/config/environment.rb +59 -0
  63. data/lib/config/environments/development.rb +17 -0
  64. data/lib/config/environments/production.rb +28 -0
  65. data/lib/config/environments/test.rb +28 -0
  66. data/lib/config/gslist.cfg +3229 -0
  67. data/lib/config/initializers/backtrace_silencers.rb +7 -0
  68. data/lib/config/initializers/inflections.rb +10 -0
  69. data/lib/config/initializers/mime_types.rb +5 -0
  70. data/lib/config/initializers/new_rails_defaults.rb +19 -0
  71. data/lib/config/initializers/session_store.rb +15 -0
  72. data/lib/config/locales/en.yml +5 -0
  73. data/lib/config/routes.rb +43 -0
  74. data/lib/config/six-updater-web.rb +221 -0
  75. data/lib/db/migrate/20090826185820_create_repositories.rb +18 -0
  76. data/lib/db/migrate/20090826185836_create_mods.rb +23 -0
  77. data/lib/db/migrate/20090826185847_create_servers.rb +22 -0
  78. data/lib/db/migrate/20090826185930_create_appsettings.rb +21 -0
  79. data/lib/db/migrate/20090826190008_create_sixconfigs.rb +16 -0
  80. data/lib/db/migrate/20090829165545_create_actions.rb +18 -0
  81. data/lib/db/migrate/20090829165546_add_logpath_to_appsetting.rb +9 -0
  82. data/lib/db/migrate/20090829165547_change_columns_appsettings.rb +10 -0
  83. data/lib/db/migrate/20090916174120_create_logs.rb +14 -0
  84. data/lib/db/migrate/20090916174333_create_logsessions.rb +13 -0
  85. data/lib/db/migrate/20090921092253_create_sessions.rb +16 -0
  86. data/lib/db/migrate/20090921165547_change_columns.rb +46 -0
  87. data/lib/db/migrate/20090928163554_create_system_settings.rb +14 -0
  88. data/lib/db/migrate/20090928163555_change_columns_mods.rb +11 -0
  89. data/lib/db/migrate/20090928163556_change2_columns_mods.rb +11 -0
  90. data/lib/db/migrate/20090928163558_change_columns_repositories.rb +11 -0
  91. data/lib/db/migrate/20090928163559_change_columns_system_settings.rb +9 -0
  92. data/lib/db/migrate/20090928163560_change2_columns_system_settings.rb +9 -0
  93. data/lib/db/migrate/20090928163561_change2_columns.rb +46 -0
  94. data/lib/db/migrate/20090928163562_change3_columns_system_settings.rb +17 -0
  95. data/lib/db/migrate/20090928163563_change2_columns_appsettings.rb +9 -0
  96. data/lib/db/migrate/20100327164004_create_queryservers.rb +18 -0
  97. data/lib/db/migrate/20100404150547_add_fields_to_queryservers.rb +35 -0
  98. data/lib/db/migrate/20100404152436_create_mods_queryservers.rb +11 -0
  99. data/lib/db/migrate/20100405142958_add_saved_password_to_queryservers.rb +9 -0
  100. data/lib/db/migrate/20100405142959_change_mods_queryservers_id.rb +9 -0
  101. data/lib/db/migrate/20100405142960_add_gamespied_at_to_system_settings.rb +9 -0
  102. data/lib/db/migrate/20100409114653_add_priority_and_path_to_mods.rb +11 -0
  103. data/lib/db/schema.rb +289 -0
  104. data/lib/doc/README_FOR_APP +2 -0
  105. data/lib/init.rb +74 -0
  106. data/lib/lib/tasks/fixtures.rake +33 -0
  107. data/lib/lib/tasks/sync.rake +51 -0
  108. data/lib/log/production.log +1 -0
  109. data/lib/public/404.html +30 -0
  110. data/lib/public/422.html +30 -0
  111. data/lib/public/500.html +30 -0
  112. data/lib/public/blank.html +33 -0
  113. data/lib/public/favicon.ico +0 -0
  114. data/lib/public/goldberg/images/action.png +0 -0
  115. data/lib/public/goldberg/images/add.png +0 -0
  116. data/lib/public/goldberg/images/blockquote-bg.gif +0 -0
  117. data/lib/public/goldberg/images/body-bg.jpg +0 -0
  118. data/lib/public/goldberg/images/centerColumn-bg.jpg +0 -0
  119. data/lib/public/goldberg/images/daddy_leftarrow.gif +0 -0
  120. data/lib/public/goldberg/images/delete.png +0 -0
  121. data/lib/public/goldberg/images/down.png +0 -0
  122. data/lib/public/goldberg/images/h2-bg.gif +0 -0
  123. data/lib/public/goldberg/images/h3-bg.gif +0 -0
  124. data/lib/public/goldberg/images/header-bg.jpg +0 -0
  125. data/lib/public/goldberg/images/hr-bg.jpg +0 -0
  126. data/lib/public/goldberg/images/logo.jpg +0 -0
  127. data/lib/public/goldberg/images/page.png +0 -0
  128. data/lib/public/goldberg/images/permission.png +0 -0
  129. data/lib/public/goldberg/images/role.png +0 -0
  130. data/lib/public/goldberg/images/up.png +0 -0
  131. data/lib/public/goldberg/javascripts/suckerfish.js +12 -0
  132. data/lib/public/goldberg/stylesheets/goldberg.css +142 -0
  133. data/lib/public/goldberg/stylesheets/layout.css +433 -0
  134. data/lib/public/goldberg/stylesheets/suckerfish.css +124 -0
  135. data/lib/public/images/active_scaffold/DO_NOT_EDIT +2 -0
  136. data/lib/public/images/active_scaffold/default/add.gif +0 -0
  137. data/lib/public/images/active_scaffold/default/arrow_down.gif +0 -0
  138. data/lib/public/images/active_scaffold/default/arrow_refresh.png +0 -0
  139. data/lib/public/images/active_scaffold/default/arrow_up.gif +0 -0
  140. data/lib/public/images/active_scaffold/default/close.gif +0 -0
  141. data/lib/public/images/active_scaffold/default/cross.png +0 -0
  142. data/lib/public/images/active_scaffold/default/customize_tool.png +0 -0
  143. data/lib/public/images/active_scaffold/default/export_tool.png +0 -0
  144. data/lib/public/images/active_scaffold/default/indicator-small.gif +0 -0
  145. data/lib/public/images/active_scaffold/default/indicator.gif +0 -0
  146. data/lib/public/images/active_scaffold/default/magnifier.png +0 -0
  147. data/lib/public/images/active_scaffold/default/printer_tool.png +0 -0
  148. data/lib/public/images/rails.png +0 -0
  149. data/lib/public/images/record_select/cross.gif +0 -0
  150. data/lib/public/images/record_select/next.gif +0 -0
  151. data/lib/public/images/record_select/previous.gif +0 -0
  152. data/lib/public/images/top.png +0 -0
  153. data/lib/public/javascripts/active_scaffold/DO_NOT_EDIT +2 -0
  154. data/lib/public/javascripts/active_scaffold/default/active_scaffold.js +517 -0
  155. data/lib/public/javascripts/active_scaffold/default/advanced_search.js +54 -0
  156. data/lib/public/javascripts/active_scaffold/default/dhtml_history.js +867 -0
  157. data/lib/public/javascripts/active_scaffold/default/form_enhancements.js +117 -0
  158. data/lib/public/javascripts/active_scaffold/default/number_formats.js +167 -0
  159. data/lib/public/javascripts/active_scaffold/default/rico_corner.js +370 -0
  160. data/lib/public/javascripts/application.js +2 -0
  161. data/lib/public/javascripts/controls.js +963 -0
  162. data/lib/public/javascripts/dragdrop.js +973 -0
  163. data/lib/public/javascripts/effects.js +1128 -0
  164. data/lib/public/javascripts/prototype.js +4320 -0
  165. data/lib/public/javascripts/record_select/record_select.js +352 -0
  166. data/lib/public/robots.txt +5 -0
  167. data/lib/public/stylesheets/active_scaffold/DO_NOT_EDIT +2 -0
  168. data/lib/public/stylesheets/active_scaffold/default/advanced_search.css +11 -0
  169. data/lib/public/stylesheets/active_scaffold/default/stylesheet-ie.css +50 -0
  170. data/lib/public/stylesheets/active_scaffold/default/stylesheet.css +1059 -0
  171. data/lib/public/stylesheets/active_scaffold/default/tools-left-handed-stylesheet-ie.css +11 -0
  172. data/lib/public/stylesheets/active_scaffold/default/tools-left-handed-stylesheet.css +68 -0
  173. data/lib/public/stylesheets/record_select/record_select.css +129 -0
  174. data/lib/script/about +4 -0
  175. data/lib/script/console +3 -0
  176. data/lib/script/dbconsole +3 -0
  177. data/lib/script/destroy +3 -0
  178. data/lib/script/generate +3 -0
  179. data/lib/script/performance/benchmarker +3 -0
  180. data/lib/script/performance/profiler +3 -0
  181. data/lib/script/plugin +3 -0
  182. data/lib/script/runner +3 -0
  183. data/lib/script/server +3 -0
  184. data/lib/test/functional/actions_controller_test.rb +8 -0
  185. data/lib/test/functional/configs_controller_test.rb +8 -0
  186. data/lib/test/functional/logs_controller_test.rb +8 -0
  187. data/lib/test/functional/logsessions_controller_test.rb +8 -0
  188. data/lib/test/functional/logviews_controller_test.rb +8 -0
  189. data/lib/test/functional/main_controller_test.rb +8 -0
  190. data/lib/test/functional/mods_controller_test.rb +8 -0
  191. data/lib/test/functional/queryservers_controller_test.rb +8 -0
  192. data/lib/test/functional/repositories_controller_test.rb +8 -0
  193. data/lib/test/functional/servers_controller_test.rb +8 -0
  194. data/lib/test/functional/settings_controller_test.rb +8 -0
  195. data/lib/test/functional/system_settings_controller_test.rb +8 -0
  196. data/lib/test/performance/browsing_test.rb +9 -0
  197. data/lib/test/test_helper.rb +38 -0
  198. data/lib/test/unit/action_test.rb +8 -0
  199. data/lib/test/unit/config_test.rb +8 -0
  200. data/lib/test/unit/helpers/actions_helper_test.rb +4 -0
  201. data/lib/test/unit/helpers/configs_helper_test.rb +4 -0
  202. data/lib/test/unit/helpers/logs_helper_test.rb +4 -0
  203. data/lib/test/unit/helpers/logsessions_helper_test.rb +4 -0
  204. data/lib/test/unit/helpers/logviews_helper_test.rb +4 -0
  205. data/lib/test/unit/helpers/main_helper_test.rb +4 -0
  206. data/lib/test/unit/helpers/mods_helper_test.rb +4 -0
  207. data/lib/test/unit/helpers/queryservers_helper_test.rb +4 -0
  208. data/lib/test/unit/helpers/repositories_helper_test.rb +4 -0
  209. data/lib/test/unit/helpers/servers_helper_test.rb +4 -0
  210. data/lib/test/unit/helpers/settings_helper_test.rb +4 -0
  211. data/lib/test/unit/helpers/system_settings_helper_test.rb +4 -0
  212. data/lib/test/unit/log_test.rb +8 -0
  213. data/lib/test/unit/logsession_test.rb +8 -0
  214. data/lib/test/unit/mod_test.rb +8 -0
  215. data/lib/test/unit/queryserver_test.rb +8 -0
  216. data/lib/test/unit/repository_test.rb +8 -0
  217. data/lib/test/unit/server_test.rb +8 -0
  218. data/lib/test/unit/setting_test.rb +8 -0
  219. data/lib/test/unit/system_setting_test.rb +8 -0
  220. data/lib/vendor/plugins/active_scaffold/CHANGELOG +152 -0
  221. data/lib/vendor/plugins/active_scaffold/MIT-LICENSE +20 -0
  222. data/lib/vendor/plugins/active_scaffold/README +128 -0
  223. data/lib/vendor/plugins/active_scaffold/Rakefile +24 -0
  224. data/lib/vendor/plugins/active_scaffold/environment.rb +20 -0
  225. data/lib/vendor/plugins/active_scaffold/frontends/default/images/add.gif +0 -0
  226. data/lib/vendor/plugins/active_scaffold/frontends/default/images/arrow_down.gif +0 -0
  227. data/lib/vendor/plugins/active_scaffold/frontends/default/images/arrow_refresh.png +0 -0
  228. data/lib/vendor/plugins/active_scaffold/frontends/default/images/arrow_up.gif +0 -0
  229. data/lib/vendor/plugins/active_scaffold/frontends/default/images/close.gif +0 -0
  230. data/lib/vendor/plugins/active_scaffold/frontends/default/images/cross.png +0 -0
  231. data/lib/vendor/plugins/active_scaffold/frontends/default/images/customize_tool.png +0 -0
  232. data/lib/vendor/plugins/active_scaffold/frontends/default/images/export_tool.png +0 -0
  233. data/lib/vendor/plugins/active_scaffold/frontends/default/images/indicator-small.gif +0 -0
  234. data/lib/vendor/plugins/active_scaffold/frontends/default/images/indicator.gif +0 -0
  235. data/lib/vendor/plugins/active_scaffold/frontends/default/images/magnifier.png +0 -0
  236. data/lib/vendor/plugins/active_scaffold/frontends/default/images/printer_tool.png +0 -0
  237. data/lib/vendor/plugins/active_scaffold/frontends/default/javascripts/active_scaffold.js +517 -0
  238. data/lib/vendor/plugins/active_scaffold/frontends/default/javascripts/dhtml_history.js +867 -0
  239. data/lib/vendor/plugins/active_scaffold/frontends/default/javascripts/form_enhancements.js +117 -0
  240. data/lib/vendor/plugins/active_scaffold/frontends/default/javascripts/number_formats.js +167 -0
  241. data/lib/vendor/plugins/active_scaffold/frontends/default/javascripts/rico_corner.js +370 -0
  242. data/lib/vendor/plugins/active_scaffold/frontends/default/stylesheets/stylesheet-ie.css +50 -0
  243. data/lib/vendor/plugins/active_scaffold/frontends/default/stylesheets/stylesheet.css +1059 -0
  244. data/lib/vendor/plugins/active_scaffold/frontends/default/stylesheets/tools-left-handed-stylesheet-ie.css +11 -0
  245. data/lib/vendor/plugins/active_scaffold/frontends/default/stylesheets/tools-left-handed-stylesheet.css +68 -0
  246. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_add_existing_form.html.erb +36 -0
  247. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_create_form.html.erb +57 -0
  248. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_create_form_on_list.html.erb +45 -0
  249. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_create_form_submit.html.erb +2 -0
  250. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_export_csv.html.erb +20 -0
  251. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_field_search.html.erb +58 -0
  252. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_form.html.erb +23 -0
  253. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_form_association.html.erb +12 -0
  254. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_form_association_footer.html.erb +43 -0
  255. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_form_attribute.html.erb +24 -0
  256. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_form_hidden_attribute.html.erb +1 -0
  257. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_form_messages.html.erb +5 -0
  258. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_horizontal_subform.html.erb +19 -0
  259. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_horizontal_subform_header.html.erb +10 -0
  260. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_horizontal_subform_record.html.erb +29 -0
  261. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list.html.erb +43 -0
  262. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list_actions.html.erb +29 -0
  263. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list_calculations.html.erb +43 -0
  264. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list_column_headings.html.erb +64 -0
  265. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list_header.html.erb +29 -0
  266. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list_inline_adapter.html.erb +11 -0
  267. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list_pagination_links.html.erb +30 -0
  268. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list_record.html.erb +32 -0
  269. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list_record_actions.html.erb +5 -0
  270. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_list_record_columns.html.erb +20 -0
  271. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_live_search.html.erb +23 -0
  272. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_messages.html.erb +10 -0
  273. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_nested.html.erb +45 -0
  274. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_print_list.html.erb +22 -0
  275. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_revision.html.erb +11 -0
  276. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_revision_columns.html.erb +62 -0
  277. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_search.html.erb +21 -0
  278. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_show.html.erb +8 -0
  279. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_show_columns.html.erb +19 -0
  280. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_show_customize.html.erb +27 -0
  281. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_show_export_tool.html.erb +17 -0
  282. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_update_actions.html.erb +9 -0
  283. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_update_form.html.erb +61 -0
  284. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_update_form_submit.html.erb +2 -0
  285. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_vertical_subform.html.erb +12 -0
  286. data/lib/vendor/plugins/active_scaffold/frontends/default/views/_vertical_subform_record.html.erb +31 -0
  287. data/lib/vendor/plugins/active_scaffold/frontends/default/views/add_existing.js.rjs +16 -0
  288. data/lib/vendor/plugins/active_scaffold/frontends/default/views/add_existing_form.html.erb +5 -0
  289. data/lib/vendor/plugins/active_scaffold/frontends/default/views/copy.rjs +4 -0
  290. data/lib/vendor/plugins/active_scaffold/frontends/default/views/create.html.erb +5 -0
  291. data/lib/vendor/plugins/active_scaffold/frontends/default/views/delete.html.erb +13 -0
  292. data/lib/vendor/plugins/active_scaffold/frontends/default/views/destroy.js.rjs +10 -0
  293. data/lib/vendor/plugins/active_scaffold/frontends/default/views/edit_associated.js.rjs +14 -0
  294. data/lib/vendor/plugins/active_scaffold/frontends/default/views/field_search.html.erb +5 -0
  295. data/lib/vendor/plugins/active_scaffold/frontends/default/views/form_messages.js.rjs +1 -0
  296. data/lib/vendor/plugins/active_scaffold/frontends/default/views/form_messages_on_save.js.rjs +10 -0
  297. data/lib/vendor/plugins/active_scaffold/frontends/default/views/latest.rjs +2 -0
  298. data/lib/vendor/plugins/active_scaffold/frontends/default/views/list.html.erb +48 -0
  299. data/lib/vendor/plugins/active_scaffold/frontends/default/views/on_create.js.rjs +25 -0
  300. data/lib/vendor/plugins/active_scaffold/frontends/default/views/on_update.js.rjs +11 -0
  301. data/lib/vendor/plugins/active_scaffold/frontends/default/views/print_list.prawn +26 -0
  302. data/lib/vendor/plugins/active_scaffold/frontends/default/views/refresh_list.js.rjs +6 -0
  303. data/lib/vendor/plugins/active_scaffold/frontends/default/views/refresh_record.js.rjs +2 -0
  304. data/lib/vendor/plugins/active_scaffold/frontends/default/views/render_field.js.rjs +9 -0
  305. data/lib/vendor/plugins/active_scaffold/frontends/default/views/revision.html.erb +5 -0
  306. data/lib/vendor/plugins/active_scaffold/frontends/default/views/search.html.erb +5 -0
  307. data/lib/vendor/plugins/active_scaffold/frontends/default/views/show.html.erb +5 -0
  308. data/lib/vendor/plugins/active_scaffold/frontends/default/views/show_customize.html.erb +5 -0
  309. data/lib/vendor/plugins/active_scaffold/frontends/default/views/show_export_tool.html.erb +5 -0
  310. data/lib/vendor/plugins/active_scaffold/frontends/default/views/update.html.erb +8 -0
  311. data/lib/vendor/plugins/active_scaffold/frontends/default/views/update_column.js.rjs +12 -0
  312. data/lib/vendor/plugins/active_scaffold/init.rb +18 -0
  313. data/lib/vendor/plugins/active_scaffold/install.rb +39 -0
  314. data/lib/vendor/plugins/active_scaffold/install_assets.rb +36 -0
  315. data/lib/vendor/plugins/active_scaffold/lib/active_record_permissions.rb +136 -0
  316. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold.rb +215 -0
  317. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/core.rb +142 -0
  318. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/create.rb +160 -0
  319. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/customize.rb +59 -0
  320. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/delete.rb +72 -0
  321. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/export_tool.rb +49 -0
  322. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/field_search.rb +82 -0
  323. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/list.rb +119 -0
  324. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/live_search.rb +59 -0
  325. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/nested.rb +219 -0
  326. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/print_base.rb +23 -0
  327. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/print_list.rb +44 -0
  328. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/refresh.rb +31 -0
  329. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/revision.rb +51 -0
  330. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/search.rb +50 -0
  331. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/show.rb +54 -0
  332. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/subform.rb +17 -0
  333. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/actions/update.rb +128 -0
  334. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/attribute_params.rb +196 -0
  335. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/base.rb +45 -0
  336. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/core.rb +263 -0
  337. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/create.rb +43 -0
  338. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/customize.rb +34 -0
  339. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/delete.rb +25 -0
  340. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/export_tool.rb +52 -0
  341. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/field_search.rb +53 -0
  342. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/form.rb +49 -0
  343. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/list.rb +142 -0
  344. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/live_search.rb +52 -0
  345. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/nested.rb +34 -0
  346. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/print_base.rb +40 -0
  347. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/print_list.rb +52 -0
  348. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/refresh.rb +22 -0
  349. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/revision.rb +39 -0
  350. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/search.rb +52 -0
  351. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/show.rb +36 -0
  352. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/subform.rb +40 -0
  353. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/config/update.rb +32 -0
  354. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/configurable.rb +29 -0
  355. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/constraints.rb +181 -0
  356. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/action_columns.rb +97 -0
  357. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/action_link.rb +140 -0
  358. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/action_links.rb +47 -0
  359. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/actions.rb +45 -0
  360. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/column.rb +343 -0
  361. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/columns.rb +75 -0
  362. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/error_message.rb +24 -0
  363. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/set.rb +62 -0
  364. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/sorting.rb +159 -0
  365. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/finder.rb +331 -0
  366. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/active_scaffold_generator.rb +348 -0
  367. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/controller_methods.rb +36 -0
  368. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/controller_scaffolding.rhtml +10 -0
  369. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/fixtures.yml +5 -0
  370. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/form.rhtml +3 -0
  371. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/form_scaffolding.rhtml +1 -0
  372. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/functional_test.rb +45 -0
  373. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/helper.rb +2 -0
  374. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/model.rb +3 -0
  375. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/model_scaffolding.rhtml +90 -0
  376. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/show.rhtml +8 -0
  377. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/show_scaffolding.rhtml +1 -0
  378. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/generators/active_scaffold/templates/unit_test.rb +5 -0
  379. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/association_helpers.rb +40 -0
  380. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/controller_helpers.rb +41 -0
  381. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/country_helpers.rb +365 -0
  382. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/form_column_helpers.rb +484 -0
  383. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/id_helpers.rb +152 -0
  384. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/list_column_helpers.rb +397 -0
  385. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/number_helpers.rb +143 -0
  386. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/pagination_helpers.rb +39 -0
  387. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/search_column_helpers.rb +279 -0
  388. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/show_column_helpers.rb +46 -0
  389. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/helpers/view_helpers.rb +227 -0
  390. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/locale/en-countries.yml +247 -0
  391. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/locale/en.rb +68 -0
  392. data/lib/vendor/plugins/active_scaffold/lib/active_scaffold/search.rb +21 -0
  393. data/lib/vendor/plugins/active_scaffold/lib/bridges/bridge.rb +52 -0
  394. data/lib/vendor/plugins/active_scaffold/lib/bridges/calendar_date_select/bridge.rb +11 -0
  395. data/lib/vendor/plugins/active_scaffold/lib/bridges/calendar_date_select/lib/as_cds_bridge.rb +135 -0
  396. data/lib/vendor/plugins/active_scaffold/lib/bridges/checkbox.rb +21 -0
  397. data/lib/vendor/plugins/active_scaffold/lib/bridges/file_column/bridge.rb +12 -0
  398. data/lib/vendor/plugins/active_scaffold/lib/bridges/file_column/lib/as_file_column_bridge.rb +75 -0
  399. data/lib/vendor/plugins/active_scaffold/lib/bridges/file_column/lib/file_column_helpers.rb +51 -0
  400. data/lib/vendor/plugins/active_scaffold/lib/bridges/file_column/lib/form_ui.rb +33 -0
  401. data/lib/vendor/plugins/active_scaffold/lib/bridges/file_column/lib/list_ui.rb +42 -0
  402. data/lib/vendor/plugins/active_scaffold/lib/bridges/file_column/test/functional/file_column_keep_test.rb +43 -0
  403. data/lib/vendor/plugins/active_scaffold/lib/bridges/file_column/test/mock_model.rb +9 -0
  404. data/lib/vendor/plugins/active_scaffold/lib/bridges/file_column/test/test_helper.rb +15 -0
  405. data/lib/vendor/plugins/active_scaffold/lib/bridges/tiny_mce/bridge.rb +5 -0
  406. data/lib/vendor/plugins/active_scaffold/lib/bridges/tiny_mce/lib/tiny_mce_bridge.rb +45 -0
  407. data/lib/vendor/plugins/active_scaffold/lib/dhtml_confirm.rb +54 -0
  408. data/lib/vendor/plugins/active_scaffold/lib/extensions/action_controller_rendering.rb +20 -0
  409. data/lib/vendor/plugins/active_scaffold/lib/extensions/action_view_rendering.rb +88 -0
  410. data/lib/vendor/plugins/active_scaffold/lib/extensions/array.rb +7 -0
  411. data/lib/vendor/plugins/active_scaffold/lib/extensions/component_response_with_namespacing.rb +17 -0
  412. data/lib/vendor/plugins/active_scaffold/lib/extensions/generic_view_paths.rb +33 -0
  413. data/lib/vendor/plugins/active_scaffold/lib/extensions/java_script_macros_helper.rb +152 -0
  414. data/lib/vendor/plugins/active_scaffold/lib/extensions/localize.rb +11 -0
  415. data/lib/vendor/plugins/active_scaffold/lib/extensions/name_option_for_datetime.rb +12 -0
  416. data/lib/vendor/plugins/active_scaffold/lib/extensions/nil_id_in_url_params.rb +7 -0
  417. data/lib/vendor/plugins/active_scaffold/lib/extensions/resources.rb +27 -0
  418. data/lib/vendor/plugins/active_scaffold/lib/extensions/reverse_associations.rb +56 -0
  419. data/lib/vendor/plugins/active_scaffold/lib/extensions/schema_definitions.rb +15 -0
  420. data/lib/vendor/plugins/active_scaffold/lib/extensions/to_label.rb +8 -0
  421. data/lib/vendor/plugins/active_scaffold/lib/extensions/unsaved_associated.rb +61 -0
  422. data/lib/vendor/plugins/active_scaffold/lib/extensions/unsaved_record.rb +20 -0
  423. data/lib/vendor/plugins/active_scaffold/lib/extensions/usa_state.rb +46 -0
  424. data/lib/vendor/plugins/active_scaffold/lib/paginator.rb +136 -0
  425. data/lib/vendor/plugins/active_scaffold/lib/responds_to_parent.rb +68 -0
  426. data/lib/vendor/plugins/active_scaffold/public/blank.html +33 -0
  427. data/lib/vendor/plugins/active_scaffold/test/bridges/bridge_test.rb +47 -0
  428. data/lib/vendor/plugins/active_scaffold/test/config/create_test.rb +55 -0
  429. data/lib/vendor/plugins/active_scaffold/test/config/list_test.rb +74 -0
  430. data/lib/vendor/plugins/active_scaffold/test/config/update_test.rb +17 -0
  431. data/lib/vendor/plugins/active_scaffold/test/const_mocker.rb +36 -0
  432. data/lib/vendor/plugins/active_scaffold/test/data_structures/action_columns_test.rb +119 -0
  433. data/lib/vendor/plugins/active_scaffold/test/data_structures/action_link_test.rb +78 -0
  434. data/lib/vendor/plugins/active_scaffold/test/data_structures/action_links_test.rb +78 -0
  435. data/lib/vendor/plugins/active_scaffold/test/data_structures/actions_test.rb +25 -0
  436. data/lib/vendor/plugins/active_scaffold/test/data_structures/association_column_test.rb +41 -0
  437. data/lib/vendor/plugins/active_scaffold/test/data_structures/column_test.rb +161 -0
  438. data/lib/vendor/plugins/active_scaffold/test/data_structures/columns_test.rb +69 -0
  439. data/lib/vendor/plugins/active_scaffold/test/data_structures/error_message_test.rb +28 -0
  440. data/lib/vendor/plugins/active_scaffold/test/data_structures/set_test.rb +86 -0
  441. data/lib/vendor/plugins/active_scaffold/test/data_structures/sorting_test.rb +96 -0
  442. data/lib/vendor/plugins/active_scaffold/test/data_structures/standard_column_test.rb +34 -0
  443. data/lib/vendor/plugins/active_scaffold/test/data_structures/virtual_column_test.rb +34 -0
  444. data/lib/vendor/plugins/active_scaffold/test/extensions/active_record_test.rb +45 -0
  445. data/lib/vendor/plugins/active_scaffold/test/extensions/array.rb +12 -0
  446. data/lib/vendor/plugins/active_scaffold/test/misc/active_record_permissions.rb +154 -0
  447. data/lib/vendor/plugins/active_scaffold/test/misc/configurable_test.rb +96 -0
  448. data/lib/vendor/plugins/active_scaffold/test/misc/constraints_test.rb +175 -0
  449. data/lib/vendor/plugins/active_scaffold/test/misc/finder_test.rb +70 -0
  450. data/lib/vendor/plugins/active_scaffold/test/misc/lang_test.rb +12 -0
  451. data/lib/vendor/plugins/active_scaffold/test/model_stub.rb +39 -0
  452. data/lib/vendor/plugins/active_scaffold/test/render_component/abstract_unit.rb +8 -0
  453. data/lib/vendor/plugins/active_scaffold/test/render_component/components_test.rb +140 -0
  454. data/lib/vendor/plugins/active_scaffold/test/run_all.rb +8 -0
  455. data/lib/vendor/plugins/active_scaffold/test/test_helper.rb +13 -0
  456. data/lib/vendor/plugins/active_scaffold/things.todo +55 -0
  457. data/lib/vendor/plugins/active_scaffold/uninstall.rb +13 -0
  458. data/lib/vendor/plugins/activescaffold_advanced_search/README +1 -0
  459. data/lib/vendor/plugins/activescaffold_advanced_search/README.markdown +39 -0
  460. data/lib/vendor/plugins/activescaffold_advanced_search/app/views/active_scaffold_overrides/_advanced_search.rhtml +41 -0
  461. data/lib/vendor/plugins/activescaffold_advanced_search/frontends/default/javascripts/advanced_search.js +54 -0
  462. data/lib/vendor/plugins/activescaffold_advanced_search/frontends/default/stylesheets/advanced_search.css +11 -0
  463. data/lib/vendor/plugins/activescaffold_advanced_search/init.rb +22 -0
  464. data/lib/vendor/plugins/activescaffold_advanced_search/install.rb +50 -0
  465. data/lib/vendor/plugins/activescaffold_advanced_search/lib/actions/advanced_search.rb +62 -0
  466. data/lib/vendor/plugins/activescaffold_advanced_search/lib/advanced_finder.rb +101 -0
  467. data/lib/vendor/plugins/activescaffold_advanced_search/lib/config/advanced_search.rb +48 -0
  468. data/lib/vendor/plugins/activescaffold_advanced_search/lib/config/core.rb +23 -0
  469. data/lib/vendor/plugins/activescaffold_advanced_search/lib/helpers/advanced_search_helpers.rb +19 -0
  470. data/lib/vendor/plugins/activescaffold_advanced_search/lib/helpers/view_helpers.rb +20 -0
  471. data/lib/vendor/plugins/activescaffold_advanced_search/uninstall.rb.rb +2 -0
  472. data/lib/vendor/plugins/goldberg/README.rdoc +36 -0
  473. data/lib/vendor/plugins/goldberg/app/controllers/goldberg/auth_controller.rb +97 -0
  474. data/lib/vendor/plugins/goldberg/app/controllers/goldberg/content_pages_controller.rb +197 -0
  475. data/lib/vendor/plugins/goldberg/app/controllers/goldberg/controller_actions_controller.rb +130 -0
  476. data/lib/vendor/plugins/goldberg/app/controllers/goldberg/menu_items_controller.rb +184 -0
  477. data/lib/vendor/plugins/goldberg/app/controllers/goldberg/permissions_controller.rb +60 -0
  478. data/lib/vendor/plugins/goldberg/app/controllers/goldberg/roles_controller.rb +85 -0
  479. data/lib/vendor/plugins/goldberg/app/controllers/goldberg/roles_permissions_controller.rb +65 -0
  480. data/lib/vendor/plugins/goldberg/app/controllers/goldberg/site_controllers_controller.rb +157 -0
  481. data/lib/vendor/plugins/goldberg/app/controllers/goldberg/system_settings_controller.rb +75 -0
  482. data/lib/vendor/plugins/goldberg/app/controllers/goldberg/users_controller.rb +293 -0
  483. data/lib/vendor/plugins/goldberg/app/helpers/goldberg/auth_helper.rb +4 -0
  484. data/lib/vendor/plugins/goldberg/app/helpers/goldberg/content_pages_helper.rb +23 -0
  485. data/lib/vendor/plugins/goldberg/app/helpers/goldberg/controller_actions_helper.rb +5 -0
  486. data/lib/vendor/plugins/goldberg/app/helpers/goldberg/menu_items_helper.rb +4 -0
  487. data/lib/vendor/plugins/goldberg/app/helpers/goldberg/permissions_helper.rb +4 -0
  488. data/lib/vendor/plugins/goldberg/app/helpers/goldberg/roles_helper.rb +4 -0
  489. data/lib/vendor/plugins/goldberg/app/helpers/goldberg/roles_permissions_helper.rb +4 -0
  490. data/lib/vendor/plugins/goldberg/app/helpers/goldberg/site_controllers_helper.rb +4 -0
  491. data/lib/vendor/plugins/goldberg/app/helpers/goldberg/system_settings_helper.rb +4 -0
  492. data/lib/vendor/plugins/goldberg/app/helpers/goldberg/users_helper.rb +4 -0
  493. data/lib/vendor/plugins/goldberg/app/models/goldberg/content_page.rb +134 -0
  494. data/lib/vendor/plugins/goldberg/app/models/goldberg/controller_action.rb +86 -0
  495. data/lib/vendor/plugins/goldberg/app/models/goldberg/credentials.rb +128 -0
  496. data/lib/vendor/plugins/goldberg/app/models/goldberg/menu.rb +198 -0
  497. data/lib/vendor/plugins/goldberg/app/models/goldberg/menu_item.rb +127 -0
  498. data/lib/vendor/plugins/goldberg/app/models/goldberg/permission.rb +37 -0
  499. data/lib/vendor/plugins/goldberg/app/models/goldberg/role.rb +68 -0
  500. data/lib/vendor/plugins/goldberg/app/models/goldberg/roles_permission.rb +18 -0
  501. data/lib/vendor/plugins/goldberg/app/models/goldberg/site_controller.rb +60 -0
  502. data/lib/vendor/plugins/goldberg/app/models/goldberg/system_settings.rb +112 -0
  503. data/lib/vendor/plugins/goldberg/app/models/goldberg/user.rb +69 -0
  504. data/lib/vendor/plugins/goldberg/app/models/goldberg/user_mailer.rb +43 -0
  505. data/lib/vendor/plugins/goldberg/app/views/goldberg/auth/_login.rhtml +15 -0
  506. data/lib/vendor/plugins/goldberg/app/views/goldberg/auth/login.rhtml +22 -0
  507. data/lib/vendor/plugins/goldberg/app/views/goldberg/auth/logout.rhtml +2 -0
  508. data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/_fck_create_folder.rxml +6 -0
  509. data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/_fck_files.rxml +19 -0
  510. data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/_form.rhtml +32 -0
  511. data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/edit.rhtml +10 -0
  512. data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/fck_speller_pages.rhtml +58 -0
  513. data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/list.rhtml +22 -0
  514. data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/new.rhtml +8 -0
  515. data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/show.rhtml +57 -0
  516. data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/view.rhtml +1 -0
  517. data/lib/vendor/plugins/goldberg/app/views/goldberg/content_pages/view_default.rhtml +1 -0
  518. data/lib/vendor/plugins/goldberg/app/views/goldberg/controller_actions/_form.rhtml +53 -0
  519. data/lib/vendor/plugins/goldberg/app/views/goldberg/controller_actions/edit.rhtml +9 -0
  520. data/lib/vendor/plugins/goldberg/app/views/goldberg/controller_actions/list.rhtml +27 -0
  521. data/lib/vendor/plugins/goldberg/app/views/goldberg/controller_actions/new.rhtml +10 -0
  522. data/lib/vendor/plugins/goldberg/app/views/goldberg/controller_actions/show.rhtml +13 -0
  523. data/lib/vendor/plugins/goldberg/app/views/goldberg/layouts/_tabpanel_js.rhtml +52 -0
  524. data/lib/vendor/plugins/goldberg/app/views/goldberg/layouts/_tabpanel_list.rhtml +7 -0
  525. data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/_breadcrumbs.rhtml +5 -0
  526. data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/_form.rhtml +42 -0
  527. data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/_item_list.rhtml +52 -0
  528. data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/_item_parent_list.rhtml +15 -0
  529. data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/_menubar.rhtml +21 -0
  530. data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/_suckerfish.rhtml +14 -0
  531. data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/edit.rhtml +10 -0
  532. data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/list-original.rhtml +27 -0
  533. data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/list.rhtml +16 -0
  534. data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/new.rhtml +9 -0
  535. data/lib/vendor/plugins/goldberg/app/views/goldberg/menu_items/show.rhtml +8 -0
  536. data/lib/vendor/plugins/goldberg/app/views/goldberg/permissions/_form.rhtml +7 -0
  537. data/lib/vendor/plugins/goldberg/app/views/goldberg/permissions/edit.rhtml +9 -0
  538. data/lib/vendor/plugins/goldberg/app/views/goldberg/permissions/list.rhtml +14 -0
  539. data/lib/vendor/plugins/goldberg/app/views/goldberg/permissions/new.rhtml +8 -0
  540. data/lib/vendor/plugins/goldberg/app/views/goldberg/permissions/show.rhtml +38 -0
  541. data/lib/vendor/plugins/goldberg/app/views/goldberg/roles/_form.rhtml +18 -0
  542. data/lib/vendor/plugins/goldberg/app/views/goldberg/roles/edit.rhtml +9 -0
  543. data/lib/vendor/plugins/goldberg/app/views/goldberg/roles/list.rhtml +21 -0
  544. data/lib/vendor/plugins/goldberg/app/views/goldberg/roles/new.rhtml +8 -0
  545. data/lib/vendor/plugins/goldberg/app/views/goldberg/roles/show.rhtml +79 -0
  546. data/lib/vendor/plugins/goldberg/app/views/goldberg/roles_permissions/_form.rhtml +13 -0
  547. data/lib/vendor/plugins/goldberg/app/views/goldberg/roles_permissions/edit.rhtml +9 -0
  548. data/lib/vendor/plugins/goldberg/app/views/goldberg/roles_permissions/list.rhtml +24 -0
  549. data/lib/vendor/plugins/goldberg/app/views/goldberg/roles_permissions/new.rhtml +8 -0
  550. data/lib/vendor/plugins/goldberg/app/views/goldberg/roles_permissions/new_permission_for_role.rhtml +8 -0
  551. data/lib/vendor/plugins/goldberg/app/views/goldberg/roles_permissions/show.rhtml +8 -0
  552. data/lib/vendor/plugins/goldberg/app/views/goldberg/site_controllers/_form.rhtml +15 -0
  553. data/lib/vendor/plugins/goldberg/app/views/goldberg/site_controllers/_list.rhtml +26 -0
  554. data/lib/vendor/plugins/goldberg/app/views/goldberg/site_controllers/edit.rhtml +9 -0
  555. data/lib/vendor/plugins/goldberg/app/views/goldberg/site_controllers/list.rhtml +107 -0
  556. data/lib/vendor/plugins/goldberg/app/views/goldberg/site_controllers/new.rhtml +8 -0
  557. data/lib/vendor/plugins/goldberg/app/views/goldberg/site_controllers/show.rhtml +38 -0
  558. data/lib/vendor/plugins/goldberg/app/views/goldberg/system_settings/_form.rhtml +71 -0
  559. data/lib/vendor/plugins/goldberg/app/views/goldberg/system_settings/edit.rhtml +9 -0
  560. data/lib/vendor/plugins/goldberg/app/views/goldberg/system_settings/list.rhtml +27 -0
  561. data/lib/vendor/plugins/goldberg/app/views/goldberg/system_settings/new.rhtml +8 -0
  562. data/lib/vendor/plugins/goldberg/app/views/goldberg/system_settings/show.rhtml +189 -0
  563. data/lib/vendor/plugins/goldberg/app/views/goldberg/user_mailer/confirmation_request.rhtml +19 -0
  564. data/lib/vendor/plugins/goldberg/app/views/goldberg/user_mailer/reset_password.rhtml +17 -0
  565. data/lib/vendor/plugins/goldberg/app/views/goldberg/user_mailer/reset_password_request.rhtml +23 -0
  566. data/lib/vendor/plugins/goldberg/app/views/goldberg/users/_form.rhtml +53 -0
  567. data/lib/vendor/plugins/goldberg/app/views/goldberg/users/confirm_registration.rhtml +26 -0
  568. data/lib/vendor/plugins/goldberg/app/views/goldberg/users/confirm_registration_submit.rhtml +4 -0
  569. data/lib/vendor/plugins/goldberg/app/views/goldberg/users/create.rhtml +19 -0
  570. data/lib/vendor/plugins/goldberg/app/views/goldberg/users/edit.rhtml +11 -0
  571. data/lib/vendor/plugins/goldberg/app/views/goldberg/users/forgot_password.rhtml +27 -0
  572. data/lib/vendor/plugins/goldberg/app/views/goldberg/users/forgot_password_submit.rhtml +4 -0
  573. data/lib/vendor/plugins/goldberg/app/views/goldberg/users/list.rhtml +18 -0
  574. data/lib/vendor/plugins/goldberg/app/views/goldberg/users/new.rhtml +19 -0
  575. data/lib/vendor/plugins/goldberg/app/views/goldberg/users/reset_password.rhtml +11 -0
  576. data/lib/vendor/plugins/goldberg/app/views/goldberg/users/reset_password_submit.rhtml +3 -0
  577. data/lib/vendor/plugins/goldberg/app/views/goldberg/users/show.rhtml +33 -0
  578. data/lib/vendor/plugins/goldberg/db/ContentPage.yml +466 -0
  579. data/lib/vendor/plugins/goldberg/db/ControllerAction.yml +162 -0
  580. data/lib/vendor/plugins/goldberg/db/MenuItem.yml +109 -0
  581. data/lib/vendor/plugins/goldberg/db/Permission.yml +21 -0
  582. data/lib/vendor/plugins/goldberg/db/Role.yml +493 -0
  583. data/lib/vendor/plugins/goldberg/db/RolesPermission.yml +26 -0
  584. data/lib/vendor/plugins/goldberg/db/SiteController.yml +61 -0
  585. data/lib/vendor/plugins/goldberg/db/SystemSettings.yml +21 -0
  586. data/lib/vendor/plugins/goldberg/db/User.yml +15 -0
  587. data/lib/vendor/plugins/goldberg/db/migrate/001_initial_setup.rb +128 -0
  588. data/lib/vendor/plugins/goldberg/db/migrate/002_menu_rest_items_users_cached_content_pages.rb +26 -0
  589. data/lib/vendor/plugins/goldberg/db/migrate/003_self_registration.rb +54 -0
  590. data/lib/vendor/plugins/goldberg/db/migrate/004_column_fixes.rb +119 -0
  591. data/lib/vendor/plugins/goldberg/goldberg.txt +1 -0
  592. data/lib/vendor/plugins/goldberg/init.rb +15 -0
  593. data/lib/vendor/plugins/goldberg/lib/goldberg.rb +37 -0
  594. data/lib/vendor/plugins/goldberg/lib/goldberg/controller.rb +10 -0
  595. data/lib/vendor/plugins/goldberg/lib/goldberg/filters.rb +197 -0
  596. data/lib/vendor/plugins/goldberg/lib/goldberg/helper.rb +66 -0
  597. data/lib/vendor/plugins/goldberg/lib/goldberg/migration.rb +113 -0
  598. data/lib/vendor/plugins/goldberg/lib/goldberg/migrator.rb +133 -0
  599. data/lib/vendor/plugins/goldberg/lib/goldberg/model.rb +127 -0
  600. data/lib/vendor/plugins/goldberg/lib/goldberg/routes.rb +49 -0
  601. data/lib/vendor/plugins/goldberg/lib/goldberg/test_helper.rb +82 -0
  602. data/lib/vendor/plugins/goldberg/tasks/goldberg_tasks.rake +81 -0
  603. data/lib/vendor/plugins/goldberg/test/functional/content_pages_controller_test.rb +31 -0
  604. data/lib/vendor/plugins/goldberg/test/integration/security_test.rb +95 -0
  605. data/lib/vendor/plugins/goldberg/test/test_helper.rb +40 -0
  606. data/lib/vendor/plugins/goldberg/test/unit/content_page_test.rb +87 -0
  607. data/lib/vendor/plugins/goldberg/test/unit/controller_action_test.rb +85 -0
  608. data/lib/vendor/plugins/goldberg/test/unit/menu_item_test.rb +46 -0
  609. data/lib/vendor/plugins/goldberg/test/unit/permission_test.rb +35 -0
  610. data/lib/vendor/plugins/goldberg/test/unit/site_controller_test.rb +53 -0
  611. data/lib/vendor/plugins/goldberg/test/unit/system_settings_test.rb +71 -0
  612. data/lib/vendor/plugins/goldberg/test/unit/user_test.rb +104 -0
  613. data/lib/vendor/plugins/goldberg/themes/common/public/images/action.png +0 -0
  614. data/lib/vendor/plugins/goldberg/themes/common/public/images/add.png +0 -0
  615. data/lib/vendor/plugins/goldberg/themes/common/public/images/delete.png +0 -0
  616. data/lib/vendor/plugins/goldberg/themes/common/public/images/down.png +0 -0
  617. data/lib/vendor/plugins/goldberg/themes/common/public/images/page.png +0 -0
  618. data/lib/vendor/plugins/goldberg/themes/common/public/images/permission.png +0 -0
  619. data/lib/vendor/plugins/goldberg/themes/common/public/images/role.png +0 -0
  620. data/lib/vendor/plugins/goldberg/themes/common/public/images/up.png +0 -0
  621. data/lib/vendor/plugins/goldberg/themes/common/public/javascripts/suckerfish.js +12 -0
  622. data/lib/vendor/plugins/goldberg/themes/common/public/stylesheets/goldberg.css +142 -0
  623. data/lib/vendor/plugins/goldberg/themes/common/public/stylesheets/suckerfish.css +124 -0
  624. data/lib/vendor/plugins/goldberg/themes/ewnf/app/views/layouts/application.html.erb +74 -0
  625. data/lib/vendor/plugins/goldberg/themes/ewnf/public/images/bg.gif +0 -0
  626. data/lib/vendor/plugins/goldberg/themes/ewnf/public/images/daddy_rightarrow.gif +0 -0
  627. data/lib/vendor/plugins/goldberg/themes/ewnf/public/images/sample.jpg +0 -0
  628. data/lib/vendor/plugins/goldberg/themes/ewnf/public/images/title_img.jpg +0 -0
  629. data/lib/vendor/plugins/goldberg/themes/ewnf/public/stylesheets/layout.css +223 -0
  630. data/lib/vendor/plugins/goldberg/themes/goldberg/app/views/layouts/application.html.erb +80 -0
  631. data/lib/vendor/plugins/goldberg/themes/goldberg/public/images/bodybg.jpg +0 -0
  632. data/lib/vendor/plugins/goldberg/themes/goldberg/public/images/footerbg.jpg +0 -0
  633. data/lib/vendor/plugins/goldberg/themes/goldberg/public/images/logo_right.jpg +0 -0
  634. data/lib/vendor/plugins/goldberg/themes/goldberg/public/images/menuhover.jpg +0 -0
  635. data/lib/vendor/plugins/goldberg/themes/goldberg/public/stylesheets/layout.css +321 -0
  636. data/lib/vendor/plugins/goldberg/themes/snooker/app/views/layouts/application.html.erb +74 -0
  637. data/lib/vendor/plugins/goldberg/themes/snooker/public/images/column_200.png +0 -0
  638. data/lib/vendor/plugins/goldberg/themes/snooker/public/images/daddy_rightarrow.gif +0 -0
  639. data/lib/vendor/plugins/goldberg/themes/snooker/public/images/footer_bg.png +0 -0
  640. data/lib/vendor/plugins/goldberg/themes/snooker/public/images/logo.jpg +0 -0
  641. data/lib/vendor/plugins/goldberg/themes/snooker/public/stylesheets/layout.css +183 -0
  642. data/lib/vendor/plugins/goldberg/themes/spoiled_brat/app/views/layouts/application.html.erb +71 -0
  643. data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/images/blockquote-bg.gif +0 -0
  644. data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/images/body-bg.jpg +0 -0
  645. data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/images/centerColumn-bg.jpg +0 -0
  646. data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/images/daddy_leftarrow.gif +0 -0
  647. data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/images/h2-bg.gif +0 -0
  648. data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/images/h3-bg.gif +0 -0
  649. data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/images/header-bg.jpg +0 -0
  650. data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/images/hr-bg.jpg +0 -0
  651. data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/images/logo.jpg +0 -0
  652. data/lib/vendor/plugins/goldberg/themes/spoiled_brat/public/stylesheets/layout.css +379 -0
  653. data/lib/vendor/plugins/in_place_editing/README +14 -0
  654. data/lib/vendor/plugins/in_place_editing/Rakefile +22 -0
  655. data/lib/vendor/plugins/in_place_editing/init.rb +2 -0
  656. data/lib/vendor/plugins/in_place_editing/lib/in_place_editing.rb +29 -0
  657. data/lib/vendor/plugins/in_place_editing/lib/in_place_macros_helper.rb +81 -0
  658. data/lib/vendor/plugins/in_place_editing/test/in_place_editing_test.rb +89 -0
  659. data/lib/vendor/plugins/in_place_editing/test/test_helper.rb +8 -0
  660. data/lib/vendor/plugins/recordselect/CHANGELOG +25 -0
  661. data/lib/vendor/plugins/recordselect/MIT-LICENSE +20 -0
  662. data/lib/vendor/plugins/recordselect/README +11 -0
  663. data/lib/vendor/plugins/recordselect/Rakefile +23 -0
  664. data/lib/vendor/plugins/recordselect/app/helpers/record_select_helper.rb +187 -0
  665. data/lib/vendor/plugins/recordselect/app/views/record_select/_browse.html.erb +8 -0
  666. data/lib/vendor/plugins/recordselect/app/views/record_select/_list.html.erb +31 -0
  667. data/lib/vendor/plugins/recordselect/app/views/record_select/_search.html.erb +14 -0
  668. data/lib/vendor/plugins/recordselect/app/views/record_select/browse.js.rjs +4 -0
  669. data/lib/vendor/plugins/recordselect/assets/images/cross.gif +0 -0
  670. data/lib/vendor/plugins/recordselect/assets/images/next.gif +0 -0
  671. data/lib/vendor/plugins/recordselect/assets/images/previous.gif +0 -0
  672. data/lib/vendor/plugins/recordselect/assets/javascripts/record_select.js +352 -0
  673. data/lib/vendor/plugins/recordselect/assets/stylesheets/record_select.css +129 -0
  674. data/lib/vendor/plugins/recordselect/init.rb +16 -0
  675. data/lib/vendor/plugins/recordselect/install.rb +1 -0
  676. data/lib/vendor/plugins/recordselect/lib/extensions/active_record.rb +9 -0
  677. data/lib/vendor/plugins/recordselect/lib/localization.rb +8 -0
  678. data/lib/vendor/plugins/recordselect/lib/record_select.rb +36 -0
  679. data/lib/vendor/plugins/recordselect/lib/record_select/actions.rb +67 -0
  680. data/lib/vendor/plugins/recordselect/lib/record_select/conditions.rb +86 -0
  681. data/lib/vendor/plugins/recordselect/lib/record_select/config.rb +91 -0
  682. data/lib/vendor/plugins/recordselect/lib/record_select/form_builder.rb +25 -0
  683. data/lib/vendor/plugins/recordselect/test/recordselect_test.rb +8 -0
  684. data/lib/vendor/plugins/recordselect/uninstall.rb +4 -0
  685. data/lib/vendor/plugins/render_component/README +37 -0
  686. data/lib/vendor/plugins/render_component/Rakefile +22 -0
  687. data/lib/vendor/plugins/render_component/init.rb +2 -0
  688. data/lib/vendor/plugins/render_component/lib/components.rb +142 -0
  689. data/lib/vendor/plugins/render_component/test/abstract_unit.rb +8 -0
  690. data/lib/vendor/plugins/render_component/test/components_test.rb +140 -0
  691. data/lib/vendor/plugins/six-app_manager/Rakefile +26 -0
  692. data/lib/vendor/plugins/six-app_manager/environment.rb +30 -0
  693. data/lib/vendor/plugins/six-app_manager/init.rb +18 -0
  694. data/lib/vendor/plugins/six-app_manager/lib/six/appmanager.rb +247 -0
  695. data/lib/vendor/plugins/six-db_manager/Rakefile +26 -0
  696. data/lib/vendor/plugins/six-db_manager/db/actions.yml +1 -0
  697. data/lib/vendor/plugins/six-db_manager/db/actions_sixconfigs.yml +1 -0
  698. data/lib/vendor/plugins/six-db_manager/db/appsettings.yml +1 -0
  699. data/lib/vendor/plugins/six-db_manager/db/appsettings_sixconfigs.yml +1 -0
  700. data/lib/vendor/plugins/six-db_manager/db/goldberg_content_pages.yml +360 -0
  701. data/lib/vendor/plugins/six-db_manager/db/goldberg_controller_actions.yml +211 -0
  702. data/lib/vendor/plugins/six-db_manager/db/goldberg_menu_items.yml +169 -0
  703. data/lib/vendor/plugins/six-db_manager/db/goldberg_permissions.yml +16 -0
  704. data/lib/vendor/plugins/six-db_manager/db/goldberg_roles.yml +683 -0
  705. data/lib/vendor/plugins/six-db_manager/db/goldberg_roles_permissions.yml +21 -0
  706. data/lib/vendor/plugins/six-db_manager/db/goldberg_site_controllers.yml +106 -0
  707. data/lib/vendor/plugins/six-db_manager/db/goldberg_system_settings.yml +20 -0
  708. data/lib/vendor/plugins/six-db_manager/db/goldberg_users.yml +27 -0
  709. data/lib/vendor/plugins/six-db_manager/db/mods.yml +1 -0
  710. data/lib/vendor/plugins/six-db_manager/db/mods_servers.yml +2 -0
  711. data/lib/vendor/plugins/six-db_manager/db/mods_sixconfigs.yml +1 -0
  712. data/lib/vendor/plugins/six-db_manager/db/queryservers.yml +1 -0
  713. data/lib/vendor/plugins/six-db_manager/db/repositories.yml +1 -0
  714. data/lib/vendor/plugins/six-db_manager/db/servers.yml +2 -0
  715. data/lib/vendor/plugins/six-db_manager/db/servers_sixconfigs.yml +2 -0
  716. data/lib/vendor/plugins/six-db_manager/db/sixconfigs.yml +1 -0
  717. data/lib/vendor/plugins/six-db_manager/db/system_settings.yml +1 -0
  718. data/lib/vendor/plugins/six-db_manager/environment.rb +24 -0
  719. data/lib/vendor/plugins/six-db_manager/init.rb +18 -0
  720. data/lib/vendor/plugins/six-db_manager/lib/six/dbmanager.rb +204 -0
  721. data/lib/vendor/plugins/six-guid/Rakefile +26 -0
  722. data/lib/vendor/plugins/six-guid/environment.rb +24 -0
  723. data/lib/vendor/plugins/six-guid/init.rb +18 -0
  724. data/lib/vendor/plugins/six-guid/lib/six/guid.rb +32 -0
  725. data/lib/vendor/plugins/six-import/Rakefile +26 -0
  726. data/lib/vendor/plugins/six-import/environment.rb +24 -0
  727. data/lib/vendor/plugins/six-import/init.rb +18 -0
  728. data/lib/vendor/plugins/six-import/lib/six/import.rb +133 -0
  729. data/lib/vendor/plugins/six-network/Rakefile +26 -0
  730. data/lib/vendor/plugins/six-network/environment.rb +2 -0
  731. data/lib/vendor/plugins/six-network/init.rb +18 -0
  732. data/lib/vendor/plugins/six-network/lib/six/network.rb +72 -0
  733. data/lib/vendor/plugins/six-query/Rakefile +26 -0
  734. data/lib/vendor/plugins/six-query/app/controllers/sixsense/auth_controller.rb +165 -0
  735. data/lib/vendor/plugins/six-query/environment.rb +33 -0
  736. data/lib/vendor/plugins/six-query/init.rb +18 -0
  737. data/lib/vendor/plugins/six-query/lib/six/query.rb +4 -0
  738. data/lib/vendor/plugins/six-query/lib/six/query/base.rb +37 -0
  739. data/lib/vendor/plugins/six-query/lib/six/query/gamespy.rb +107 -0
  740. data/lib/vendor/plugins/six-query/lib/six/query/gamespy_master.rb +61 -0
  741. metadata +743 -7
  742. data/lib/six/updater-web-app.rb +0 -80722
@@ -0,0 +1,152 @@
1
+ module ActiveScaffold
2
+ module Helpers
3
+ # A bunch of helper methods to produce the common view ids
4
+ module IdHelpers
5
+ def id_from_controller(controller)
6
+ controller.gsub("/", "__")
7
+ end
8
+
9
+ def controller_id
10
+ @controller_id ||= 'as_' + id_from_controller(params[:eid] || params[:parent_controller] || params[:controller])
11
+ end
12
+
13
+ def active_scaffold_id
14
+ "#{controller_id}-active-scaffold"
15
+ end
16
+
17
+ def active_scaffold_content_id
18
+ "#{controller_id}-content"
19
+ end
20
+
21
+ def active_scaffold_tbody_id
22
+ "#{controller_id}-tbody"
23
+ end
24
+
25
+ def active_scaffold_messages_id
26
+ "#{controller_id}-messages"
27
+ end
28
+
29
+ def active_scaffold_calculations_id
30
+ "#{controller_id}-calculations"
31
+ end
32
+
33
+ def empty_message_id
34
+ "#{controller_id}-empty-message"
35
+ end
36
+
37
+ def before_header_id
38
+ "#{controller_id}-search-container"
39
+ end
40
+
41
+ def search_form_id
42
+ "#{controller_id}-search-form"
43
+ end
44
+
45
+ def search_input_id
46
+ "#{controller_id}-search-input"
47
+ end
48
+
49
+ def table_action_id(name)
50
+ "#{controller_id}-action-table-#{name}"
51
+ end
52
+
53
+ def action_link_id(link_action,link_id)
54
+ "#{controller_id}-#{link_action}-#{link_id}-link"
55
+ end
56
+
57
+ def active_scaffold_column_header_id(column)
58
+ name = column.respond_to?(:name) ? column.name : column.to_s
59
+ clean_id "#{controller_id}-#{name}-column"
60
+ end
61
+
62
+ def element_row_id(options = {})
63
+ options[:action] ||= params[:action]
64
+ options[:id] ||= params[:id]
65
+ options[:id] ||= params[:parent_id]
66
+ clean_id "#{controller_id}-#{options[:action]}-#{options[:id]}-row"
67
+ end
68
+
69
+ def element_cell_id(options = {})
70
+ options[:action] ||= params[:action]
71
+ options[:id] ||= params[:id]
72
+ options[:id] ||= params[:parent_id]
73
+ options[:name] ||= params[:name]
74
+ clean_id "#{controller_id}-#{options[:action]}-#{options[:id]}-#{options[:name]}-cell"
75
+ end
76
+
77
+ def element_form_id(options = {})
78
+ options[:action] ||= params[:action]
79
+ options[:id] ||= params[:id]
80
+ options[:id] ||= params[:parent_id]
81
+ clean_id "#{controller_id}-#{options[:action]}-#{options[:id]}-form"
82
+ end
83
+
84
+ def association_subform_id(column)
85
+ klass = column.association.klass.to_s.underscore
86
+ clean_id "#{controller_id}-associated-#{klass}"
87
+ end
88
+
89
+ def loading_indicator_id(options = {})
90
+ options[:action] ||= params[:action]
91
+ unless options[:id]
92
+ clean_id "#{controller_id}-#{options[:action]}-loading-indicator"
93
+ else
94
+ clean_id "#{controller_id}-#{options[:action]}-#{options[:id]}-loading-indicator"
95
+ end
96
+ end
97
+
98
+ def sub_form_id(options = {})
99
+ options[:id] ||= params[:id]
100
+ options[:id] ||= params[:parent_id]
101
+ clean_id "#{controller_id}-#{options[:id]}-#{options[:association]}-subform"
102
+ end
103
+
104
+ def sub_form_list_id(options = {})
105
+ options[:id] ||= params[:id]
106
+ options[:id] ||= params[:parent_id]
107
+ clean_id "#{controller_id}-#{options[:id]}-#{options[:association]}-subform-list"
108
+ end
109
+
110
+ def element_messages_id(options = {})
111
+ options[:action] ||= params[:action]
112
+ options[:id] ||= params[:id]
113
+ options[:id] ||= params[:parent_id]
114
+ clean_id "#{controller_id}-#{options[:action]}-#{options[:id]}-messages"
115
+ end
116
+
117
+ def action_iframe_id(options)
118
+ "#{controller_id}-#{options[:action]}-#{options[:id]}-iframe"
119
+ end
120
+
121
+ # AST Begin
122
+ def customize_form_id
123
+ "#{controller_id}-customize-form"
124
+ end
125
+
126
+ def nested_id(options = {})
127
+ options[:action] = :nested
128
+ element_row_id(options)
129
+ end
130
+
131
+ def active_scaffold_tools_list_columns
132
+ @list_columns || active_scaffold_config.list.columns.collect
133
+ end
134
+
135
+ def active_scaffold_tools_form_columns_to_ignore(column)
136
+ @form_column_names.nil? ? false : !@form_column_names.include?(column.name)
137
+ end
138
+
139
+ def field_error_id(column)
140
+ "field_error_#{column.name}_#{params[:eid] || params[:id]}"
141
+ end
142
+ # AST End
143
+
144
+ private
145
+
146
+ # whitelists id-safe characters
147
+ def clean_id(val)
148
+ val.gsub /[^-_0-9a-zA-Z]/, '-'
149
+ end
150
+ end
151
+ end
152
+ end
@@ -0,0 +1,397 @@
1
+ # coding: utf-8
2
+ module ActiveScaffold
3
+ module Helpers
4
+ # Helpers that assist with the rendering of a List Column
5
+ module ListColumnHelpers
6
+ def get_column_value(record, column)
7
+ begin
8
+ # check for an override helper
9
+ value = if column_override? column
10
+ # we only pass the record as the argument. we previously also passed the formatted_value,
11
+ # but mike perham pointed out that prohibited the usage of overrides to improve on the
12
+ # performance of our default formatting. see issue #138.
13
+ send(column_override(column), record, column)
14
+ # second, check if the dev has specified a valid list_ui for this column
15
+ elsif column.list_ui and override_column_ui?(column.list_ui)
16
+ send(override_column_ui(column.list_ui), column, record)
17
+
18
+ elsif inplace_edit?(record, column)
19
+ active_scaffold_inplace_edit(record, column)
20
+ elsif column.column and override_column_ui?(column.column.type)
21
+ send(override_column_ui(column.column.type), column, record)
22
+ else
23
+ format_column_value(record, column)
24
+ end
25
+
26
+ value = ' ' if value.nil? or (value.respond_to?(:empty?) and value.empty?) # fix for IE 6
27
+ return value
28
+ rescue Exception => e
29
+ logger.error Time.now.to_s + "#{e.inspect} -- on the ActiveScaffold column = :#{column.name} in #{@controller.class}"
30
+ raise e
31
+ end
32
+ end
33
+
34
+ # TODO: move empty_field_text and   logic in here?
35
+ # TODO: move active_scaffold_inplace_edit in here?
36
+ # TODO: we need to distinguish between the automatic links *we* create and the ones that the dev specified. some logic may not apply if the dev specified the link.
37
+ def render_list_column(text, column, record)
38
+ # AST Begin
39
+ make_available_method = "#{column.name}_make_available?"
40
+ return active_scaffold_config.list.empty_field_text if record.respond_to?(make_available_method) and !record.send(make_available_method)
41
+ # AST End
42
+ if column.link
43
+ link = column.link
44
+ associated = record.send(column.association.name) if column.association
45
+ url_options = params_for(:action => nil, :id => record.id, :link => text)
46
+ url_options[:parent_controller] = params[:controller] if link.controller and link.controller.to_s != params[:controller]
47
+ url_options[:id] = associated.id if associated and link.controller and link.controller.to_s != params[:controller]
48
+
49
+ # setup automatic link
50
+ if column.autolink? # link to nested scaffold or inline form
51
+ link = action_link_to_inline_form(column, associated) if link.crud_type.nil? # automatic link to inline form (singular association)
52
+ return text if link.crud_type.nil?
53
+ if link.crud_type == :create
54
+ url_options[:link] = as_(:create_new)
55
+ url_options[:parent_id] = record.id
56
+ url_options[:parent_column] = column.association.reverse
57
+ url_options[:parent_model] = record.class.name # needed for polymorphic associations
58
+ url_options.delete :id
59
+ end
60
+ end
61
+
62
+ # check authorization
63
+ if column.association
64
+ associated_for_authorized = if associated.nil? || (associated.respond_to?(:empty?) && associated.empty?)
65
+ column.association.klass
66
+ elsif column.plural_association?
67
+ associated.first
68
+ else
69
+ associated
70
+ end
71
+ authorized = associated_for_authorized.authorized_for?(:action => link.crud_type)
72
+ authorized = authorized and record.authorized_for?(:action => :update, :column => column.name) if link.crud_type == :create
73
+ else
74
+ authorized = record.authorized_for?(:action => link.crud_type)
75
+ end
76
+ return "<a class='disabled'>#{text}</a>" unless authorized
77
+
78
+ render_action_link(link, url_options)
79
+ else
80
+ text
81
+ end
82
+ end
83
+
84
+ # setup the action link to inline form
85
+ def action_link_to_inline_form(column, associated)
86
+ link = column.link.clone
87
+ if column_empty?(associated) # if association is empty, we only can link to create form
88
+ if column.actions_for_association_links.include?(:new)
89
+ link.action = 'new'
90
+ link.crud_type = :create
91
+ end
92
+ elsif column.actions_for_association_links.include?(:edit)
93
+ link.action = 'edit'
94
+ link.crud_type = :update
95
+ elsif column.actions_for_association_links.include?(:show)
96
+ link.action = 'show'
97
+ link.crud_type = :read
98
+ end
99
+ link
100
+ end
101
+
102
+ # There are two basic ways to clean a column's value: h() and sanitize(). The latter is useful
103
+ # when the column contains *valid* html data, and you want to just disable any scripting. People
104
+ # can always use field overrides to clean data one way or the other, but having this override
105
+ # lets people decide which way it should happen by default.
106
+ #
107
+ # Why is it not a configuration option? Because it seems like a somewhat rare request. But it
108
+ # could eventually be an option in config.list (and config.show, I guess).
109
+ def clean_column_value(v)
110
+ h(v)
111
+ end
112
+
113
+ ##
114
+ ## Overrides
115
+ ##
116
+ def active_scaffold_column_text(column, record)
117
+ truncate(clean_column_value(record.send(column.name)), :length => column.options[:truncate] || 50)
118
+ end
119
+
120
+ def active_scaffold_column_checkbox(column, record)
121
+ column_value = record.send(column.name)
122
+ checked = column_value.class.to_s.include?('Class') ? column_value : column_value == 1
123
+ if column.inplace_edit and record.authorized_for?(:action => :update, :column => column.name)
124
+ id_options = {:id => record.id.to_s, :action => 'update_column', :name => column.name.to_s}
125
+ tag_options = {:tag => "span", :id => element_cell_id(id_options), :class => "in_place_editor_field"}
126
+ script = remote_function(:method => 'POST', :url => {:controller => params_for[:controller], :action => "update_column", :column => column.name, :id => record.id.to_s, :value => !column_value, :eid => params[:eid]})
127
+ content_tag(:span, check_box_tag(tag_options[:id], 1, checked, {:onclick => script}) , tag_options)
128
+ else
129
+ check_box_tag(nil, 1, checked, :disabled => true)
130
+ end
131
+ end
132
+
133
+ def column_override(column)
134
+ "#{column.name.to_s.gsub('?', '')}_column" # parse out any question marks (see issue 227)
135
+ end
136
+
137
+ def column_override?(column)
138
+ respond_to?(column_override(column))
139
+ end
140
+
141
+ def override_column_ui?(list_ui)
142
+ respond_to?(override_column_ui(list_ui))
143
+ end
144
+
145
+ # the naming convention for overriding column types with helpers
146
+ def override_column_ui(list_ui)
147
+ "active_scaffold_column_#{list_ui}"
148
+ end
149
+
150
+ ##
151
+ ## Formatting
152
+ ##
153
+
154
+ def format_column_value(record, column)
155
+ value = record.send(column.name)
156
+ if value && column.association # cache association size before calling column_empty?
157
+ # AST - Had problems with has_many through when the relationship was empty - AR is creating WHERE ((`trade_days`.id = )). Tried value.empty? but that caused the same problem so we are using (value.length > 0)
158
+ associated_size = value.size if column.plural_association? and (value.length > 0) and column.associated_number? # get count before cache association
159
+ cache_association(value, column)
160
+ end
161
+ if column.association.nil? or column_empty?(value)
162
+ if value.is_a? Numeric
163
+ format_number_value(value, column.options)
164
+ else
165
+ format_value(value, column.options)
166
+ end
167
+ else
168
+ format_association_value(value, column, associated_size)
169
+ end
170
+ end
171
+
172
+ def format_number_value(value, options = {})
173
+ value = case options[:format]
174
+ when :size
175
+ number_to_human_size(value, options[:i18n_options] || {})
176
+ when :percentage
177
+ number_to_percentage(value, options[:i18n_options] || {})
178
+ when :currency
179
+ number_to_currency(value, options[:i18n_options] || {})
180
+ when :i18n_number
181
+ send("number_with_#{value.is_a?(Integer) ? 'delimiter' : 'precision'}", value, options[:i18n_options] || {})
182
+ else
183
+ value
184
+ end
185
+ clean_column_value(value)
186
+ end
187
+
188
+ def format_association_value(value, column, size)
189
+ case column.association.macro
190
+ when :has_one, :belongs_to
191
+ format_value(value.to_label)
192
+ when :has_many, :has_and_belongs_to_many
193
+ if column.associated_limit.nil?
194
+ firsts = value.collect { |v| v.to_label }
195
+ else
196
+ firsts = value.first(column.associated_limit)
197
+ firsts.collect! { |v| v.to_label }
198
+ firsts[column.associated_limit] = '…' if value.size > column.associated_limit
199
+ end
200
+ if column.associated_limit == 0
201
+ size if column.associated_number?
202
+ else
203
+ joined_associated = format_value(firsts.join(', '))
204
+ joined_associated << " (#{size})" if column.associated_number? and column.associated_limit and value.size > column.associated_limit
205
+ joined_associated
206
+ end
207
+ end
208
+ end
209
+
210
+ def format_value(column_value, options = {})
211
+ value = if column_empty?(column_value)
212
+ active_scaffold_config.list.empty_field_text
213
+ elsif column_value.is_a?(Time) || column_value.is_a?(Date)
214
+ l(column_value, :format => options[:format] || :default)
215
+ elsif [FalseClass, TrueClass].include?(column_value.class)
216
+ as_(column_value.to_s.to_sym)
217
+ else
218
+ column_value.to_s
219
+ end
220
+ clean_column_value(value)
221
+ end
222
+
223
+ def cache_association(value, column)
224
+ # we are not using eager loading, cache firsts records in order not to query the database in a future
225
+ unless value.loaded?
226
+ # load at least one record, is needed for column_empty? and checking permissions
227
+ if column.associated_limit.nil?
228
+ Rails.logger.warn "ActiveScaffold: Enable eager loading for #{column.name} association to reduce SQL queries"
229
+ else
230
+ value.target = value.find(:all, :limit => column.associated_limit + 1, :select => column.select_columns)
231
+ end
232
+ end
233
+ end
234
+
235
+ # ==========
236
+ # = Inline Edit =
237
+ # ==========
238
+
239
+ def inplace_edit?(record, column)
240
+ column.inplace_edit and record.authorized_for?(:action => :update, :column => column.name)
241
+ end
242
+
243
+ def inplace_edit_cloning?(column)
244
+ column.inplace_edit != :ajax and (override_form_field?(column) or column.form_ui or (column.column and override_input?(column.column.type)))
245
+ end
246
+
247
+ def format_inplace_edit_column(record,column)
248
+ value = record.send(column.name)
249
+ if column.list_ui == :checkbox
250
+ active_scaffold_column_checkbox(column, record)
251
+ else
252
+ format_column_value(record, column)
253
+ end
254
+ end
255
+
256
+ # AST - options param
257
+ def active_scaffold_inplace_edit(record, column, options = {})
258
+ formatted_column = options[:formatted_column] || format_inplace_edit_column(record, column)
259
+ # AST End
260
+ id_options = {:id => record.id.to_s, :action => 'update_column', :name => column.name.to_s}
261
+ tag_options = {:tag => "span", :id => element_cell_id(id_options), :class => "in_place_editor_field"}
262
+ in_place_editor_options = {
263
+ :url => {:controller => params_for[:controller], :action => "update_column", :column => column.name, :id => record.id.to_s},
264
+ :with => params[:eid] ? "Form.serialize(form) + '&eid=#{params[:eid]}'" : nil,
265
+ :click_to_edit_text => as_(:click_to_edit),
266
+ :cancel_text => as_(:cancel),
267
+ :loading_text => as_(:loading),
268
+ :save_text => as_(:update),
269
+ :saving_text => as_(:saving),
270
+ :ajax_options => "{method: 'post'}",
271
+ :script => true
272
+ }
273
+
274
+ if inplace_edit_cloning?(column)
275
+ in_place_editor_options.merge!(
276
+ :inplace_pattern_selector => "##{active_scaffold_column_header_id(column)} .#{inplace_edit_control_css_class}",
277
+ :node_id_suffix => record.id.to_s,
278
+ :form_customization => 'element.clonePatternField();'
279
+ )
280
+ elsif column.inplace_edit == :ajax
281
+ url = url_for(:action => 'render_field', :id => record.id, :column => column.name, :update_column => column.name, :in_place_editing => true, :escape => false)
282
+ in_place_editor_options[:form_customization] = "element.setFieldFromAjax('#{escape_javascript(url)}');"
283
+ elsif column.column.try(:type) == :text
284
+ in_place_editor_options[:rows] = column.options[:rows] || 5
285
+ end
286
+
287
+ in_place_editor_options.merge!(column.options)
288
+ content_tag(:span, formatted_column, tag_options) + active_scaffold_in_place_editor(tag_options[:id], in_place_editor_options)
289
+ end
290
+
291
+ def inplace_edit_control(column)
292
+ if inplace_edit?(active_scaffold_config.model, column) and inplace_edit_cloning?(column)
293
+ @record = active_scaffold_config.model.new
294
+ column = column.clone
295
+ column.options = column.options.clone
296
+ column.options.delete(:update_column)
297
+ column.form_ui = :select if (column.association && column.form_ui.nil?)
298
+ content_tag(:div, active_scaffold_input_for(column), {:style => "display:none;", :class => inplace_edit_control_css_class})
299
+ end
300
+ end
301
+
302
+ def inplace_edit_control_css_class
303
+ "as_inplace_pattern"
304
+ end
305
+
306
+ def active_scaffold_in_place_editor(field_id, options = {})
307
+ function = "new ActiveScaffold.InPlaceEditor("
308
+ function << "'#{field_id}', "
309
+ function << "'#{url_for(options[:url])}'"
310
+
311
+ js_options = {}
312
+
313
+ if protect_against_forgery?
314
+ options[:with] ||= "Form.serialize(form)"
315
+ options[:with] += " + '&authenticity_token=' + encodeURIComponent('#{form_authenticity_token}')"
316
+ end
317
+
318
+ js_options['cancelText'] = %('#{options[:cancel_text]}') if options[:cancel_text]
319
+ js_options['okText'] = %('#{options[:save_text]}') if options[:save_text]
320
+ js_options['okControl'] = %('#{options[:save_control_type]}') if options[:save_control_type]
321
+ js_options['cancelControl'] = %('#{options[:cancel_control_type]}') if options[:cancel_control_type]
322
+ js_options['loadingText'] = %('#{options[:loading_text]}') if options[:loading_text]
323
+ js_options['savingText'] = %('#{options[:saving_text]}') if options[:saving_text]
324
+ js_options['rows'] = options[:rows] if options[:rows]
325
+ js_options['cols'] = options[:cols] if options[:cols]
326
+ js_options['size'] = options[:size] if options[:size]
327
+ js_options['externalControl'] = "'#{options[:external_control]}'" if options[:external_control]
328
+ js_options['externalControlOnly'] = "true" if options[:external_control_only]
329
+ js_options['submitOnBlur'] = "'#{options[:submit_on_blur]}'" if options[:submit_on_blur]
330
+ js_options['loadTextURL'] = "'#{url_for(options[:load_text_url])}'" if options[:load_text_url]
331
+ js_options['ajaxOptions'] = options[:ajax_options] if options[:ajax_options]
332
+ js_options['htmlResponse'] = !options[:script] if options[:script]
333
+ js_options['callback'] = "function(form) { return #{options[:with]} }" if options[:with]
334
+ js_options['clickToEditText'] = %('#{options[:click_to_edit_text]}') if options[:click_to_edit_text]
335
+ js_options['textBetweenControls'] = %('#{options[:text_between_controls]}') if options[:text_between_controls]
336
+ js_options['highlightcolor'] = %('#{options[:highlight_color]}') if options[:highlight_color]
337
+ js_options['highlightendcolor'] = %('#{options[:highlight_end_color]}') if options[:highlight_end_color]
338
+ js_options['onFailure'] = "function(element, transport) { #{options[:failure]} }" if options[:failure]
339
+ js_options['onComplete'] = "function(transport, element) { #{options[:complete]} }" if options[:complete]
340
+ js_options['onEnterEditMode'] = "function(element) { #{options[:enter_editing]} }" if options[:enter_editing]
341
+ js_options['onLeaveEditMode'] = "function(element) { #{options[:exit_editing]} }" if options[:exit_editing]
342
+ js_options['onFormCustomization'] = "function(element, form) { #{options[:form_customization]} }" if options[:form_customization]
343
+ js_options['inplacePatternSelector'] = %('#{options[:inplace_pattern_selector]}') if options[:inplace_pattern_selector]
344
+ js_options['nodeIdSuffix'] = %('#{options[:node_id_suffix]}') if options[:node_id_suffix]
345
+ function << (', ' + options_for_javascript(js_options)) unless js_options.empty?
346
+
347
+ function << ')'
348
+
349
+ javascript_tag(function)
350
+ end
351
+
352
+ # AST Begin
353
+ def nested_label(association)
354
+ as_(:nested_for_model, :nested_model => active_scaffold_config_for(association.klass).label(:count => 2), :parent_model => format_value(@record.to_label))
355
+ end
356
+
357
+ def active_scaffold_column_percentage(column, record)
358
+ number_to_percentage(record.send(column.name).to_s, :precision => 1)
359
+ end
360
+
361
+ def active_scaffold_column_ssn(column, record)
362
+ if record.respond_to?("#{column.name}_for_human")
363
+ record.send("#{column.name}_for_human")
364
+ else
365
+ usa_number_to_ssn(record.send(column.name).to_s)
366
+ end
367
+ end
368
+
369
+ def active_scaffold_column_usa_money(column, record)
370
+ value = record.send(column.name)
371
+ formatted_value = number_to_currency(value.abs.to_s) if value
372
+ if value and value < 0.0
373
+ "(#{formatted_value})"
374
+ else
375
+ formatted_value
376
+ end
377
+ end
378
+
379
+ def active_scaffold_column_phone_number(column, record)
380
+ if record.respond_to?("#{column.name}_for_human")
381
+ record.send("#{column.name}_for_human")
382
+ else
383
+ usa_number_to_phone(record.send(column.name).to_s)
384
+ end
385
+ end
386
+
387
+ def active_scaffold_column_usa_zip_code(column, record)
388
+ if record.respond_to?("#{column.name}_for_human")
389
+ record.send("#{column.name}_for_human")
390
+ else
391
+ usa_number_to_zip(record.send(column.name).to_s)
392
+ end
393
+ end
394
+ # AST End
395
+ end
396
+ end
397
+ end