pwice_grid 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (389) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +68 -0
  3. data/.circleci/run-build-locally.sh +7 -0
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
  5. data/.gitignore +22 -0
  6. data/.inch.yml +3 -0
  7. data/.rspec +3 -0
  8. data/.rubocop.yml +186 -0
  9. data/Appraisals +11 -0
  10. data/CHANGELOG.md +758 -0
  11. data/Gemfile +3 -0
  12. data/Gemfile.lock +298 -0
  13. data/MIT-LICENSE +20 -0
  14. data/README.md +1561 -0
  15. data/Rakefile +49 -0
  16. data/SAVED_QUERIES_HOWTO.md +113 -0
  17. data/app/views/kaminari/wice_grid/_gap.html.erb +1 -0
  18. data/app/views/kaminari/wice_grid/_next_page.html.erb +1 -0
  19. data/app/views/kaminari/wice_grid/_page.html.erb +1 -0
  20. data/app/views/kaminari/wice_grid/_paginator.html.erb +19 -0
  21. data/app/views/kaminari/wice_grid/_prev_page.html.erb +1 -0
  22. data/config/locales/cz.yml +40 -0
  23. data/config/locales/de.yml +42 -0
  24. data/config/locales/en.yml +42 -0
  25. data/config/locales/es.yml +42 -0
  26. data/config/locales/fr.yml +40 -0
  27. data/config/locales/is.yml +41 -0
  28. data/config/locales/it.yml +33 -0
  29. data/config/locales/ja.yml +42 -0
  30. data/config/locales/nl.yml +40 -0
  31. data/config/locales/pt-BR.yml +31 -0
  32. data/config/locales/pt.yml +40 -0
  33. data/config/locales/ru.yml +40 -0
  34. data/config/locales/sk.yml +40 -0
  35. data/config/locales/uk.yml +40 -0
  36. data/config/locales/zh.yml +40 -0
  37. data/gemfiles/rails_5.0.gemfile +7 -0
  38. data/gemfiles/rails_5.0.gemfile.lock +299 -0
  39. data/gemfiles/rails_5.1.gemfile +7 -0
  40. data/gemfiles/rails_5.1.gemfile.lock +299 -0
  41. data/gemfiles/rails_5.2.gemfile +7 -0
  42. data/gemfiles/rails_5.2.gemfile.lock +307 -0
  43. data/lib/generators/wice_grid/add_migration_for_serialized_queries_generator.rb +19 -0
  44. data/lib/generators/wice_grid/install_generator.rb +13 -0
  45. data/lib/generators/wice_grid/templates/create_wice_grid_serialized_queries.rb +13 -0
  46. data/lib/generators/wice_grid/templates/wice_grid_config.rb +191 -0
  47. data/lib/wice/active_record_column_wrapper.rb +122 -0
  48. data/lib/wice/columns.rb +282 -0
  49. data/lib/wice/columns/column_action.rb +51 -0
  50. data/lib/wice/columns/column_boolean.rb +39 -0
  51. data/lib/wice/columns/column_bootstrap_datepicker.rb +47 -0
  52. data/lib/wice/columns/column_custom_dropdown.rb +114 -0
  53. data/lib/wice/columns/column_float.rb +8 -0
  54. data/lib/wice/columns/column_html5_datepicker.rb +30 -0
  55. data/lib/wice/columns/column_integer.rb +87 -0
  56. data/lib/wice/columns/column_jquery_datepicker.rb +48 -0
  57. data/lib/wice/columns/column_processor_index.rb +22 -0
  58. data/lib/wice/columns/column_rails_date_helper.rb +40 -0
  59. data/lib/wice/columns/column_rails_datetime_helper.rb +40 -0
  60. data/lib/wice/columns/column_range.rb +73 -0
  61. data/lib/wice/columns/column_string.rb +91 -0
  62. data/lib/wice/columns/common_date_datetime_mixin.rb +19 -0
  63. data/lib/wice/columns/common_js_date_datetime_conditions_generator_mixin.rb +38 -0
  64. data/lib/wice/columns/common_js_date_datetime_mixin.rb +14 -0
  65. data/lib/wice/columns/common_rails_date_datetime_conditions_generator_mixin.rb +25 -0
  66. data/lib/wice/columns/common_standard_helper_date_datetime_mixin.rb +21 -0
  67. data/lib/wice/grid_output_buffer.rb +48 -0
  68. data/lib/wice/grid_renderer.rb +624 -0
  69. data/lib/wice/helpers/bs_calendar_helpers.rb +73 -0
  70. data/lib/wice/helpers/js_calendar_helpers.rb +82 -0
  71. data/lib/wice/helpers/wice_grid_misc_view_helpers.rb +74 -0
  72. data/lib/wice/helpers/wice_grid_serialized_queries_view_helpers.rb +94 -0
  73. data/lib/wice/helpers/wice_grid_view_helpers.rb +719 -0
  74. data/lib/wice/kaminari_monkey_patching.rb +12 -0
  75. data/lib/wice/table_column_matrix.rb +64 -0
  76. data/lib/wice/wice_grid_controller.rb +174 -0
  77. data/lib/wice/wice_grid_core_ext.rb +145 -0
  78. data/lib/wice/wice_grid_misc.rb +208 -0
  79. data/lib/wice/wice_grid_serialized_queries_controller.rb +86 -0
  80. data/lib/wice/wice_grid_serialized_query.rb +13 -0
  81. data/lib/wice/wice_grid_spreadsheet.rb +19 -0
  82. data/lib/wice_grid.rb +702 -0
  83. data/spec/acceptance_helper.rb +59 -0
  84. data/spec/features/action_column_request_spec.rb +280 -0
  85. data/spec/features/adding_rows_request_spec.rb +21 -0
  86. data/spec/features/all_records_request_spec.rb +18 -0
  87. data/spec/features/auto_reloads2_request_spec.rb +366 -0
  88. data/spec/features/auto_reloads3_request_spec.rb +130 -0
  89. data/spec/features/auto_reloads_request_spec.rb +364 -0
  90. data/spec/features/basics1_request_spec.rb +11 -0
  91. data/spec/features/basics2_request_spec.rb +10 -0
  92. data/spec/features/basics3_request_spec.rb +29 -0
  93. data/spec/features/basics4_request_spec.rb +19 -0
  94. data/spec/features/basics5_request_spec.rb +13 -0
  95. data/spec/features/basics6_request_spec.rb +22 -0
  96. data/spec/features/blockless_column_definition_spec.rb +27 -0
  97. data/spec/features/buttons_request_spec.rb +172 -0
  98. data/spec/features/csv_and_detached_filters_spec.rb +10 -0
  99. data/spec/features/csv_export_request_spec.rb +13 -0
  100. data/spec/features/custom_filter_params_request_spec.rb +29 -0
  101. data/spec/features/custom_filters1_request_spec.rb +136 -0
  102. data/spec/features/custom_filters2_request_spec.rb +31 -0
  103. data/spec/features/custom_filters3_request_spec.rb +34 -0
  104. data/spec/features/custom_filters4_request_spec.rb +13 -0
  105. data/spec/features/custom_ordering_on_calculated_request_spec.rb +30 -0
  106. data/spec/features/custom_ordering_request_spec.rb +36 -0
  107. data/spec/features/custom_ordering_with_arel_request_spec.rb +36 -0
  108. data/spec/features/custom_ordering_with_proc_request_spec.rb +44 -0
  109. data/spec/features/custom_ordering_with_ruby_request_spec.rb +30 -0
  110. data/spec/features/dates_request_spec.rb +56 -0
  111. data/spec/features/detached_filters_spec.rb +10 -0
  112. data/spec/features/detached_filters_two_grids_spec.rb +135 -0
  113. data/spec/features/disable_all_filters_spec.rb +22 -0
  114. data/spec/features/hiding_checkboxes_in_action_column_request_spec.rb +294 -0
  115. data/spec/features/integration_with_application_view_request_spec.rb +43 -0
  116. data/spec/features/integration_with_forms_request_spec.rb +141 -0
  117. data/spec/features/joining_tables_spec.rb +40 -0
  118. data/spec/features/localization_request_spec.rb +24 -0
  119. data/spec/features/many_grids_on_page_request_spec.rb +104 -0
  120. data/spec/features/negation_request_spec.rb +25 -0
  121. data/spec/features/no_records_request_spec.rb +26 -0
  122. data/spec/features/numeric_filters_request_spec.rb +10 -0
  123. data/spec/features/resultset_processings2_request_spec.rb +27 -0
  124. data/spec/features/resultset_processings_request_spec.rb +30 -0
  125. data/spec/features/saved_queries_request_spec.rb +120 -0
  126. data/spec/features/shared.rb +1005 -0
  127. data/spec/features/shared_detached_filters.rb +175 -0
  128. data/spec/features/styling_spec.rb +15 -0
  129. data/spec/features/two_associations_spec.rb +48 -0
  130. data/spec/features/upper_pagination_panel_request_spec.rb +23 -0
  131. data/spec/features/when_filtered_spec.rb +209 -0
  132. data/spec/fixtures/.gitkeep +0 -0
  133. data/spec/fixtures/companies.yml +21 -0
  134. data/spec/fixtures/priorities.yml +31 -0
  135. data/spec/fixtures/project_roles.yml +25 -0
  136. data/spec/fixtures/projects.yml +22 -0
  137. data/spec/fixtures/statuses.yml +55 -0
  138. data/spec/fixtures/tasks.yml +751 -0
  139. data/spec/fixtures/tasks_users.yml +2089 -0
  140. data/spec/fixtures/users.yml +61 -0
  141. data/spec/fixtures/versions.yml +78 -0
  142. data/spec/models/company_spec.rb +6 -0
  143. data/spec/models/priority_spec.rb +6 -0
  144. data/spec/models/project_spec.rb +11 -0
  145. data/spec/models/status_spec.rb +6 -0
  146. data/spec/models/task_spec.rb +12 -0
  147. data/spec/models/user_project_participation_spec.rb +7 -0
  148. data/spec/models/user_spec.rb +12 -0
  149. data/spec/models/version_spec.rb +5 -0
  150. data/spec/rails_helper.rb +15 -0
  151. data/spec/schema.rb +8 -0
  152. data/spec/spec_helper.rb +75 -0
  153. data/spec/support/active_record.rb +10 -0
  154. data/spec/support/test_app/Rakefile +3 -0
  155. data/spec/support/test_app/app/assets/javascripts/application.js +20 -0
  156. data/spec/support/test_app/app/assets/javascripts/common.js.coffee +6 -0
  157. data/spec/support/test_app/app/assets/javascripts/jquery.ui.datepicker.locales.js +56 -0
  158. data/spec/support/test_app/app/assets/stylesheets/adding_rows.scss +3 -0
  159. data/spec/support/test_app/app/assets/stylesheets/application.scss +46 -0
  160. data/spec/support/test_app/app/assets/stylesheets/csv_and_detached_filters.scss +3 -0
  161. data/spec/support/test_app/app/assets/stylesheets/many_grids_on_page.scss +3 -0
  162. data/spec/support/test_app/app/controllers/action_column_controller.rb +15 -0
  163. data/spec/support/test_app/app/controllers/adding_rows_controller.rb +14 -0
  164. data/spec/support/test_app/app/controllers/all_records_controller.rb +14 -0
  165. data/spec/support/test_app/app/controllers/application_controller.rb +99 -0
  166. data/spec/support/test_app/app/controllers/auto_reloads2_controller.rb +14 -0
  167. data/spec/support/test_app/app/controllers/auto_reloads3_controller.rb +20 -0
  168. data/spec/support/test_app/app/controllers/auto_reloads_controller.rb +14 -0
  169. data/spec/support/test_app/app/controllers/basics1_controller.rb +6 -0
  170. data/spec/support/test_app/app/controllers/basics2_controller.rb +6 -0
  171. data/spec/support/test_app/app/controllers/basics3_controller.rb +6 -0
  172. data/spec/support/test_app/app/controllers/basics4_controller.rb +6 -0
  173. data/spec/support/test_app/app/controllers/basics5_controller.rb +6 -0
  174. data/spec/support/test_app/app/controllers/basics6_controller.rb +11 -0
  175. data/spec/support/test_app/app/controllers/blockless_column_definition_controller.rb +6 -0
  176. data/spec/support/test_app/app/controllers/buttons_controller.rb +6 -0
  177. data/spec/support/test_app/app/controllers/csv_and_detached_filters_controller.rb +13 -0
  178. data/spec/support/test_app/app/controllers/csv_export_controller.rb +28 -0
  179. data/spec/support/test_app/app/controllers/custom_filter_params_controller.rb +6 -0
  180. data/spec/support/test_app/app/controllers/custom_filters1_controller.rb +9 -0
  181. data/spec/support/test_app/app/controllers/custom_filters2_controller.rb +14 -0
  182. data/spec/support/test_app/app/controllers/custom_filters3_controller.rb +12 -0
  183. data/spec/support/test_app/app/controllers/custom_filters4_controller.rb +12 -0
  184. data/spec/support/test_app/app/controllers/custom_ordering_controller.rb +18 -0
  185. data/spec/support/test_app/app/controllers/custom_ordering_on_calculated_controller.rb +6 -0
  186. data/spec/support/test_app/app/controllers/custom_ordering_with_arel_controller.rb +18 -0
  187. data/spec/support/test_app/app/controllers/custom_ordering_with_proc_controller.rb +11 -0
  188. data/spec/support/test_app/app/controllers/custom_ordering_with_ruby_controller.rb +6 -0
  189. data/spec/support/test_app/app/controllers/dates_controller.rb +8 -0
  190. data/spec/support/test_app/app/controllers/detached_filters_controller.rb +6 -0
  191. data/spec/support/test_app/app/controllers/detached_filters_two_grids_controller.rb +7 -0
  192. data/spec/support/test_app/app/controllers/disable_all_filters_controller.rb +6 -0
  193. data/spec/support/test_app/app/controllers/hiding_checkboxes_in_action_column_controller.rb +13 -0
  194. data/spec/support/test_app/app/controllers/home_controller.rb +3 -0
  195. data/spec/support/test_app/app/controllers/integration_with_application_view_controller.rb +16 -0
  196. data/spec/support/test_app/app/controllers/integration_with_forms_controller.rb +11 -0
  197. data/spec/support/test_app/app/controllers/joining_tables_controller.rb +11 -0
  198. data/spec/support/test_app/app/controllers/localization_controller.rb +26 -0
  199. data/spec/support/test_app/app/controllers/many_grids_on_page_controller.rb +7 -0
  200. data/spec/support/test_app/app/controllers/negation_controller.rb +14 -0
  201. data/spec/support/test_app/app/controllers/no_records_controller.rb +8 -0
  202. data/spec/support/test_app/app/controllers/null_values_controller.rb +10 -0
  203. data/spec/support/test_app/app/controllers/numeric_filters_controller.rb +6 -0
  204. data/spec/support/test_app/app/controllers/queries_controller.rb +4 -0
  205. data/spec/support/test_app/app/controllers/resultset_processings2_controller.rb +29 -0
  206. data/spec/support/test_app/app/controllers/resultset_processings_controller.rb +30 -0
  207. data/spec/support/test_app/app/controllers/saved_queries_controller.rb +14 -0
  208. data/spec/support/test_app/app/controllers/styling_controller.rb +7 -0
  209. data/spec/support/test_app/app/controllers/tasks_controller.rb +14 -0
  210. data/spec/support/test_app/app/controllers/two_associations_controller.rb +6 -0
  211. data/spec/support/test_app/app/controllers/upper_pagination_panel_controller.rb +6 -0
  212. data/spec/support/test_app/app/controllers/when_filtered_controller.rb +6 -0
  213. data/spec/support/test_app/app/helpers/application_helper.rb +82 -0
  214. data/spec/support/test_app/app/mailers/.gitkeep +0 -0
  215. data/spec/support/test_app/app/models/.gitkeep +0 -0
  216. data/spec/support/test_app/app/models/company.rb +5 -0
  217. data/spec/support/test_app/app/models/populate.rb +84 -0
  218. data/spec/support/test_app/app/models/priority.rb +10 -0
  219. data/spec/support/test_app/app/models/project.rb +14 -0
  220. data/spec/support/test_app/app/models/project_role.rb +3 -0
  221. data/spec/support/test_app/app/models/status.rb +10 -0
  222. data/spec/support/test_app/app/models/task.rb +11 -0
  223. data/spec/support/test_app/app/models/to_dropdown_mixin.rb +16 -0
  224. data/spec/support/test_app/app/models/user.rb +8 -0
  225. data/spec/support/test_app/app/models/user_project_participation.rb +6 -0
  226. data/spec/support/test_app/app/models/version.rb +6 -0
  227. data/spec/support/test_app/app/views/action_column/_grid.html.erb +35 -0
  228. data/spec/support/test_app/app/views/action_column/index.html.haml +45 -0
  229. data/spec/support/test_app/app/views/adding_rows/_grid.html.erb +58 -0
  230. data/spec/support/test_app/app/views/adding_rows/index.html.haml +37 -0
  231. data/spec/support/test_app/app/views/all_records/_grid.html.erb +30 -0
  232. data/spec/support/test_app/app/views/all_records/index.html.haml +12 -0
  233. data/spec/support/test_app/app/views/auto_reloads/_grid.html.erb +32 -0
  234. data/spec/support/test_app/app/views/auto_reloads/index.html.haml +15 -0
  235. data/spec/support/test_app/app/views/auto_reloads2/_grid.html.erb +32 -0
  236. data/spec/support/test_app/app/views/auto_reloads2/index.html.haml +65 -0
  237. data/spec/support/test_app/app/views/auto_reloads3/_grid.html.erb +25 -0
  238. data/spec/support/test_app/app/views/auto_reloads3/index.html.haml +78 -0
  239. data/spec/support/test_app/app/views/basics1/_grid.html.erb +26 -0
  240. data/spec/support/test_app/app/views/basics1/index.html.haml +13 -0
  241. data/spec/support/test_app/app/views/basics2/_grid.html.erb +27 -0
  242. data/spec/support/test_app/app/views/basics2/index.html.haml +12 -0
  243. data/spec/support/test_app/app/views/basics3/_grid.html.erb +28 -0
  244. data/spec/support/test_app/app/views/basics3/index.html.haml +13 -0
  245. data/spec/support/test_app/app/views/basics4/_grid.html.erb +21 -0
  246. data/spec/support/test_app/app/views/basics4/index.html.haml +12 -0
  247. data/spec/support/test_app/app/views/basics5/_grid.html.erb +19 -0
  248. data/spec/support/test_app/app/views/basics5/index.html.haml +12 -0
  249. data/spec/support/test_app/app/views/basics6/_grid.html.erb +19 -0
  250. data/spec/support/test_app/app/views/basics6/index.html.haml +23 -0
  251. data/spec/support/test_app/app/views/blockless_column_definition/_grid.html.erb +19 -0
  252. data/spec/support/test_app/app/views/blockless_column_definition/index.html.haml +15 -0
  253. data/spec/support/test_app/app/views/buttons/_grid.html.erb +20 -0
  254. data/spec/support/test_app/app/views/buttons/index.html.haml +30 -0
  255. data/spec/support/test_app/app/views/csv_and_detached_filters/_grid.html.erb +23 -0
  256. data/spec/support/test_app/app/views/csv_and_detached_filters/index.html.haml +58 -0
  257. data/spec/support/test_app/app/views/csv_export/_projects_grid.html.erb +17 -0
  258. data/spec/support/test_app/app/views/csv_export/_tasks_grid.html.erb +43 -0
  259. data/spec/support/test_app/app/views/csv_export/index.html.haml +90 -0
  260. data/spec/support/test_app/app/views/custom_filter_params/_grid.html.erb +12 -0
  261. data/spec/support/test_app/app/views/custom_filter_params/index.html.haml +12 -0
  262. data/spec/support/test_app/app/views/custom_filters1/_g1.html.erb +8 -0
  263. data/spec/support/test_app/app/views/custom_filters1/_g2.html.erb +9 -0
  264. data/spec/support/test_app/app/views/custom_filters1/_g3.html.erb +9 -0
  265. data/spec/support/test_app/app/views/custom_filters1/_g4.html.erb +8 -0
  266. data/spec/support/test_app/app/views/custom_filters1/index.html.haml +30 -0
  267. data/spec/support/test_app/app/views/custom_filters2/_grid.html.erb +30 -0
  268. data/spec/support/test_app/app/views/custom_filters2/index.html.haml +41 -0
  269. data/spec/support/test_app/app/views/custom_filters3/_grid.html.erb +18 -0
  270. data/spec/support/test_app/app/views/custom_filters3/index.html.haml +16 -0
  271. data/spec/support/test_app/app/views/custom_filters4/_grid.html.erb +20 -0
  272. data/spec/support/test_app/app/views/custom_filters4/index.html.haml +12 -0
  273. data/spec/support/test_app/app/views/custom_ordering/_grid.html.erb +10 -0
  274. data/spec/support/test_app/app/views/custom_ordering/index.html.haml +24 -0
  275. data/spec/support/test_app/app/views/custom_ordering_on_calculated/_grid.html.erb +14 -0
  276. data/spec/support/test_app/app/views/custom_ordering_on_calculated/index.html.haml +23 -0
  277. data/spec/support/test_app/app/views/custom_ordering_with_arel/_grid.html.erb +10 -0
  278. data/spec/support/test_app/app/views/custom_ordering_with_arel/index.html.haml +24 -0
  279. data/spec/support/test_app/app/views/custom_ordering_with_proc/_grid.html.erb +10 -0
  280. data/spec/support/test_app/app/views/custom_ordering_with_proc/index.html.haml +21 -0
  281. data/spec/support/test_app/app/views/custom_ordering_with_ruby/_grid.html.erb +10 -0
  282. data/spec/support/test_app/app/views/custom_ordering_with_ruby/index.html.haml +23 -0
  283. data/spec/support/test_app/app/views/dates/_grid.html.erb +25 -0
  284. data/spec/support/test_app/app/views/dates/index.html.haml +52 -0
  285. data/spec/support/test_app/app/views/detached_filters/_grid.html.erb +23 -0
  286. data/spec/support/test_app/app/views/detached_filters/index.html.haml +79 -0
  287. data/spec/support/test_app/app/views/detached_filters_two_grids/_grid.html.erb +23 -0
  288. data/spec/support/test_app/app/views/detached_filters_two_grids/index.html.haml +85 -0
  289. data/spec/support/test_app/app/views/disable_all_filters/_grid.html.erb +21 -0
  290. data/spec/support/test_app/app/views/disable_all_filters/index.html.haml +14 -0
  291. data/spec/support/test_app/app/views/hiding_checkboxes_in_action_column/_grid.html.erb +34 -0
  292. data/spec/support/test_app/app/views/hiding_checkboxes_in_action_column/index.html.haml +32 -0
  293. data/spec/support/test_app/app/views/integration_with_application_view/_grid.html.erb +27 -0
  294. data/spec/support/test_app/app/views/integration_with_application_view/index.html.haml +33 -0
  295. data/spec/support/test_app/app/views/integration_with_forms/_grid.html.erb +23 -0
  296. data/spec/support/test_app/app/views/integration_with_forms/index.html.haml +18 -0
  297. data/spec/support/test_app/app/views/joining_tables/_grid.html.erb +23 -0
  298. data/spec/support/test_app/app/views/joining_tables/index.html.haml +26 -0
  299. data/spec/support/test_app/app/views/layouts/application.html.haml +61 -0
  300. data/spec/support/test_app/app/views/localization/_grid.html.erb +36 -0
  301. data/spec/support/test_app/app/views/localization/index.html.haml +20 -0
  302. data/spec/support/test_app/app/views/many_grids_on_page/_tasks_grid1.html.erb +12 -0
  303. data/spec/support/test_app/app/views/many_grids_on_page/_tasks_grid2.html.erb +12 -0
  304. data/spec/support/test_app/app/views/many_grids_on_page/index.html.haml +26 -0
  305. data/spec/support/test_app/app/views/negation/_grid.html.erb +30 -0
  306. data/spec/support/test_app/app/views/negation/index.html.haml +15 -0
  307. data/spec/support/test_app/app/views/no_records/_empty_grid.html.haml +1 -0
  308. data/spec/support/test_app/app/views/no_records/_grid1.html.erb +11 -0
  309. data/spec/support/test_app/app/views/no_records/_grid2.html.erb +9 -0
  310. data/spec/support/test_app/app/views/no_records/_grid3.html.erb +9 -0
  311. data/spec/support/test_app/app/views/no_records/index.html.haml +24 -0
  312. data/spec/support/test_app/app/views/null_values/_grid.html.erb +17 -0
  313. data/spec/support/test_app/app/views/null_values/index.html.haml +21 -0
  314. data/spec/support/test_app/app/views/numeric_filters/_grid.html.erb +19 -0
  315. data/spec/support/test_app/app/views/numeric_filters/index.html.haml +12 -0
  316. data/spec/support/test_app/app/views/resultset_processings/_grid.html.erb +27 -0
  317. data/spec/support/test_app/app/views/resultset_processings/index.html.haml +50 -0
  318. data/spec/support/test_app/app/views/resultset_processings2/_grid.html.erb +27 -0
  319. data/spec/support/test_app/app/views/resultset_processings2/index.html.haml +48 -0
  320. data/spec/support/test_app/app/views/saved_queries/_grid.html.erb +30 -0
  321. data/spec/support/test_app/app/views/saved_queries/index.html.haml +15 -0
  322. data/spec/support/test_app/app/views/styling/_grid1.html.erb +12 -0
  323. data/spec/support/test_app/app/views/styling/_grid2.html.erb +31 -0
  324. data/spec/support/test_app/app/views/styling/index.html.haml +65 -0
  325. data/spec/support/test_app/app/views/tasks/_grid.html.erb +19 -0
  326. data/spec/support/test_app/app/views/tasks/index.html.haml +1 -0
  327. data/spec/support/test_app/app/views/two_associations/_grid.html.erb +13 -0
  328. data/spec/support/test_app/app/views/two_associations/index.html.haml +13 -0
  329. data/spec/support/test_app/app/views/upper_pagination_panel/_grid.html.erb +27 -0
  330. data/spec/support/test_app/app/views/upper_pagination_panel/index.html.haml +14 -0
  331. data/spec/support/test_app/app/views/when_filtered/_grid.html.erb +19 -0
  332. data/spec/support/test_app/app/views/when_filtered/index.html.haml +15 -0
  333. data/spec/support/test_app/bin/rails +4 -0
  334. data/spec/support/test_app/bin/rake +4 -0
  335. data/spec/support/test_app/config.ru +5 -0
  336. data/spec/support/test_app/config/application.rb +70 -0
  337. data/spec/support/test_app/config/boot.rb +7 -0
  338. data/spec/support/test_app/config/database.travis.yml +27 -0
  339. data/spec/support/test_app/config/database.yml +16 -0
  340. data/spec/support/test_app/config/database.yml.mysql +19 -0
  341. data/spec/support/test_app/config/database.yml.postgresql +18 -0
  342. data/spec/support/test_app/config/environment.rb +6 -0
  343. data/spec/support/test_app/config/environments/development.rb +34 -0
  344. data/spec/support/test_app/config/environments/production.rb +66 -0
  345. data/spec/support/test_app/config/environments/test.rb +34 -0
  346. data/spec/support/test_app/config/initializers/backtrace_silencers.rb +8 -0
  347. data/spec/support/test_app/config/initializers/inflections.rb +16 -0
  348. data/spec/support/test_app/config/initializers/mime_types.rb +6 -0
  349. data/spec/support/test_app/config/initializers/secret_token.rb +12 -0
  350. data/spec/support/test_app/config/initializers/session_store.rb +9 -0
  351. data/spec/support/test_app/config/initializers/wice_grid_config.rb +163 -0
  352. data/spec/support/test_app/config/initializers/wrap_parameters.rb +15 -0
  353. data/spec/support/test_app/config/locales/en.yml +5 -0
  354. data/spec/support/test_app/config/locales/wice_grid.yml +550 -0
  355. data/spec/support/test_app/config/puma.rb +15 -0
  356. data/spec/support/test_app/config/routes.rb +125 -0
  357. data/spec/support/test_app/db/migrate/20120224193505_create_tasks.rb +27 -0
  358. data/spec/support/test_app/db/migrate/20120224193517_create_users.rb +12 -0
  359. data/spec/support/test_app/db/migrate/20120224193522_create_projects.rb +14 -0
  360. data/spec/support/test_app/db/migrate/20120224193529_create_priorities.rb +13 -0
  361. data/spec/support/test_app/db/migrate/20120224193537_create_statuses.rb +13 -0
  362. data/spec/support/test_app/db/migrate/20120224193543_create_versions.rb +15 -0
  363. data/spec/support/test_app/db/migrate/20120224193550_create_project_roles.rb +12 -0
  364. data/spec/support/test_app/db/migrate/20120224193610_create_companies.rb +12 -0
  365. data/spec/support/test_app/db/migrate/20120224195351_create_user_project_participations.rb +16 -0
  366. data/spec/support/test_app/db/migrate/20120224195521_add_tasks_users.rb +11 -0
  367. data/spec/support/test_app/db/migrate/20120610091944_create_wice_grid_serialized_queries.rb +14 -0
  368. data/spec/support/test_app/db/schema.rb +139 -0
  369. data/spec/support/test_app/db/seeds.rb +10 -0
  370. data/spec/support/test_app/lib/ar_fixtures.rb +100 -0
  371. data/spec/support/test_app/lib/assets/.gitkeep +0 -0
  372. data/spec/support/test_app/lib/tasks/.gitkeep +0 -0
  373. data/spec/support/test_app/lib/tasks/ar_fixtures.rake +45 -0
  374. data/spec/support/test_app/public/404.html +26 -0
  375. data/spec/support/test_app/public/422.html +26 -0
  376. data/spec/support/test_app/public/500.html +25 -0
  377. data/spec/support/test_app/public/favicon.ico +0 -0
  378. data/spec/support/test_app/public/robots.txt +5 -0
  379. data/spec/wice/grid_output_buffer_spec.rb +39 -0
  380. data/spec/wice/table_column_matrix_spec.rb +36 -0
  381. data/spec/wice/wice_grid_misc_spec.rb +157 -0
  382. data/spec/wice/wice_grid_spreadsheet_spec.rb +12 -0
  383. data/vendor/assets/javascripts/wice_grid.js +3 -0
  384. data/vendor/assets/javascripts/wice_grid_init.js.coffee +351 -0
  385. data/vendor/assets/javascripts/wice_grid_processor.js.coffee +133 -0
  386. data/vendor/assets/javascripts/wice_grid_saved_queries_init.js.coffee +104 -0
  387. data/vendor/assets/stylesheets/wice_grid.scss +81 -0
  388. data/wice_grid.gemspec +54 -0
  389. metadata +861 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 1ab80999fb5d6abbbc0a754141fb4a4158ae5670998f18281a07622172cdff46
4
+ data.tar.gz: 0ef9ab17a35a5aea0de1250bd1ea34c831e10f83daffd566cfbdc158acab3a4b
5
+ SHA512:
6
+ metadata.gz: 4ee7b8b8f690717273e5c35c0a4e3a46af0b921438b6d494cc94b116d98b65d9058487393a579ed987dd761e510c9b9b7259a189e51eb878ff5a57a8c0d96d91
7
+ data.tar.gz: c4ad54405cd0e3e8190db50c6f46edc9281c189f9408e821d1cdbaa65cc3f90be8a80d91d781d90dc23238642699ecebe63963b7fabdc975c2edab6c0fbe30b3
@@ -0,0 +1,68 @@
1
+ build_job: &build_job
2
+ working_directory: ~/wice_grid
3
+ steps:
4
+ - checkout
5
+
6
+ # Install PhantomJS (if not found in cache)
7
+ - run:
8
+ name: Install phantomjs
9
+ command: |
10
+ if ! [ $(which phantomjs) ]; then
11
+ sudo curl --output /usr/local/bin/phantomjs https://s3.amazonaws.com/circle-downloads/phantomjs-2.1.1
12
+ fi
13
+
14
+ sudo chmod ugo+x /usr/local/bin/phantomjs
15
+
16
+ # Restore Cached Dependencies
17
+ - type: cache-restore
18
+ name: Restore bundle cache
19
+ key: wice_grid-{{ checksum "Gemfile.lock" }}
20
+
21
+ # Bundle install dependencies
22
+ - run: bundle install --path vendor/bundle
23
+
24
+ # Install Appraisal gemfiles
25
+ - run: bundle exec appraisal install
26
+
27
+ # Cache Dependencies
28
+ - type: cache-save
29
+ name: Store bundle cache
30
+ key: wice_grid-{{ checksum "Gemfile.lock" }}
31
+ paths:
32
+ - vendor/bundle
33
+
34
+ # Run the tests
35
+ - run: bundle exec appraisal rspec
36
+
37
+ - store_artifacts:
38
+ path: spec/support/test_app/tmp/capybara
39
+ destination: screenshots
40
+
41
+ version: 2
42
+ jobs:
43
+ build-ruby24:
44
+ <<: *build_job
45
+ docker:
46
+ - image: circleci/ruby:2.4
47
+ environment:
48
+ RAILS_ENV: test
49
+ build-ruby25:
50
+ <<: *build_job
51
+ docker:
52
+ - image: circleci/ruby:2.5
53
+ environment:
54
+ RAILS_ENV: test
55
+ build-ruby26:
56
+ <<: *build_job
57
+ docker:
58
+ - image: circleci/ruby:2.6
59
+ environment:
60
+ RAILS_ENV: test
61
+
62
+ workflows:
63
+ version: 2
64
+ build:
65
+ jobs:
66
+ - build-ruby24
67
+ - build-ruby25
68
+ - build-ruby26
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+ curl --user ${CIRCLE_TOKEN}: \
3
+ --request POST \
4
+ --form revision=fa279c82728d4e0d764f09f3db0f63269575fba4 \
5
+ --form config=@config.yml \
6
+ --form notify=false \
7
+ https://circleci.com/api/v1.1/project/github/patricklindsay/wice_grid/tree/master
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+
5
+ ---
6
+
7
+ ## Precheck
8
+
9
+ - For bugs, do a quick search and make sure the bug has not yet been reported
10
+ - Try to be clear and concise - the more information you provide the easier it is for us to resolve
11
+ - Things to include;
12
+ - Code samples
13
+ - Stack traces
14
+ - Screenshots
15
+ - Sample application or a test case that reproduces the error.
16
+
17
+ ## Environment
18
+
19
+ - Ruby **[version]**
20
+ - Rails **[version]**
21
+ - WiceGrid **[version]**
22
+
23
+ ## Description of issue
24
+
25
+
26
+ ## Current behaviour
27
+
28
+
29
+ ## Expected behaviour
30
+
31
+
32
+ ## Additional context
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .idea
6
+ .yardoc
7
+ .rbenv-version
8
+ InstalledFiles
9
+ _yardoc
10
+ coverage
11
+ doc/
12
+ lib/bundler/man
13
+ pkg
14
+ rdoc
15
+ spec/reports
16
+ test/tmp
17
+ test/version_tmp
18
+ tmp
19
+ .byebug_history
20
+ spec/support/test_app/log
21
+ spec/support/test_app/tmp
22
+ spec/support/test_app/db/*.sqlite3
data/.inch.yml ADDED
@@ -0,0 +1,3 @@
1
+ files:
2
+ excluded:
3
+ - lib/generators/wice_grid/add_migration_for_serialized_queries_generator.rb
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --require spec_helper
3
+ --format d
data/.rubocop.yml ADDED
@@ -0,0 +1,186 @@
1
+ AllCops:
2
+ DisabledByDefault: true
3
+
4
+ Style/MultilineTernaryOperator:
5
+ Enabled: true
6
+
7
+ # Cop supports --auto-correct.
8
+ Style/DefWithParentheses:
9
+ Enabled: true
10
+
11
+ # Cop supports --auto-correct.
12
+ Style/MethodCallParentheses:
13
+ Enabled: true
14
+
15
+ # Cop supports --auto-correct.
16
+ # Configuration parameters: EnforcedStyleInsidePipes, SupportedStyles.
17
+ Style/SpaceAroundBlockParameters:
18
+ Enabled: true
19
+
20
+ # Cop supports --auto-correct.
21
+ # Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
22
+ Style/TrailingCommaInArguments:
23
+ EnforcedStyleForMultiline: no_comma
24
+
25
+ # Cop supports --auto-correct.
26
+ # Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
27
+ Style/TrailingCommaInLiteral:
28
+ EnforcedStyleForMultiline: no_comma
29
+
30
+ # Cop supports --auto-correct.
31
+ Style/SpaceBeforeFirstArg:
32
+ Enabled: true
33
+
34
+ # Cop supports --auto-correct.
35
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
36
+ Style/FirstParameterIndentation:
37
+ Enabled: true
38
+
39
+ # Cop supports --auto-correct.
40
+ # Configuration parameters: AllowSafeAssignment.
41
+ Style/ParenthesesAroundCondition:
42
+ Enabled: true
43
+
44
+ # Cop supports --auto-correct.
45
+ Style/SpecialGlobalVars:
46
+ Enabled: true
47
+
48
+ # Cop supports --auto-correct.
49
+ # Configuration parameters: IgnoredMethods.
50
+ Style/SymbolProc:
51
+ Enabled: true
52
+
53
+ # Cop supports --auto-correct.
54
+ Style/Lambda:
55
+ Enabled: true
56
+
57
+ # Cop supports --auto-correct.
58
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
59
+ Style/MethodDefParentheses:
60
+ Enabled: true
61
+
62
+ # Cop supports --auto-correct.
63
+ Style/EmptyLiteral:
64
+ Enabled: true
65
+
66
+ # Cop supports --auto-correct.
67
+ # Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues.
68
+ Style/HashSyntax:
69
+ Enabled: true
70
+
71
+ # Cop supports --auto-correct.
72
+ Style/Not:
73
+ Enabled: true
74
+
75
+ # Cop supports --auto-correct.
76
+ # Configuration parameters: AllowMultipleReturnValues.
77
+ Style/RedundantReturn:
78
+ Enabled: true
79
+
80
+ # Cop supports --auto-correct.
81
+ Style/SpaceAfterComma:
82
+ Enabled: true
83
+
84
+ # Cop supports --auto-correct.
85
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
86
+ Style/SignalException:
87
+ Enabled: true
88
+
89
+ # Cop supports --auto-correct.
90
+ Style/LineEndConcatenation:
91
+ Enabled: true
92
+
93
+ # Cop supports --auto-correct.
94
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
95
+ Style/AndOr:
96
+ Enabled: true
97
+
98
+ # Cop supports --auto-correct.
99
+ # Configuration parameters: PreferredDelimiters.
100
+ Style/PercentLiteralDelimiters:
101
+ Enabled: true
102
+
103
+ # Cop supports --auto-correct.
104
+ # Configuration parameters: EnforcedStyle, SupportedStyles, AutoCorrectEncodingComment.
105
+ Style/Encoding:
106
+ Enabled: true
107
+
108
+ # Cop supports --auto-correct.
109
+ Lint/UnusedMethodArgument:
110
+ Enabled: true
111
+
112
+ # Cop supports --auto-correct.
113
+ Style/AlignArray:
114
+ Enabled: true
115
+
116
+ # Cop supports --auto-correct.
117
+ Style/ColonMethodCall:
118
+ Enabled: true
119
+
120
+ # Cop supports --auto-correct.
121
+ Lint/UnusedBlockArgument:
122
+ Enabled: true
123
+
124
+ # Cop supports --auto-correct.
125
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
126
+ Style/DotPosition:
127
+ Enabled: true
128
+
129
+ # Cop supports --auto-correct.
130
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
131
+ Style/EmptyElse:
132
+ Enabled: true
133
+
134
+ # Cop supports --auto-correct.
135
+ # Configuration parameters: MultiSpaceAllowedForOperators.
136
+ Style/SpaceAroundOperators:
137
+ Enabled: true
138
+
139
+ # Cop supports --auto-correct.
140
+ Style/SpaceBeforeComma:
141
+ Enabled: true
142
+
143
+ # Cop supports --auto-correct.
144
+ Style/SpaceInsideParens:
145
+ Enabled: true
146
+
147
+ # Cop supports --auto-correct.
148
+ Style/DeprecatedHashMethods:
149
+ Enabled: true
150
+
151
+ # Cop supports --auto-correct.
152
+ # Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
153
+ Style/BlockDelimiters:
154
+ Enabled: true
155
+
156
+ # Cop supports --auto-correct.
157
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
158
+ Style/BracesAroundHashParameters:
159
+ Enabled: true
160
+
161
+ Lint/AmbiguousRegexpLiteral:
162
+ Enabled: true
163
+
164
+ # Cop supports --auto-correct.
165
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
166
+ Style/StringLiterals:
167
+ Enabled: true
168
+
169
+ Lint/AmbiguousOperator:
170
+ Enabled: true
171
+
172
+ Lint/UselessAssignment:
173
+ Enabled: true
174
+
175
+ # Cop supports --auto-correct.
176
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
177
+ Style/ClassCheck:
178
+ Enabled: true
179
+
180
+ # Cop supports --auto-correct.
181
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
182
+ Style/AlignParameters:
183
+ Enabled: true
184
+
185
+ Lint/ConditionPosition:
186
+ Enabled: true
data/Appraisals ADDED
@@ -0,0 +1,11 @@
1
+ appraise "rails-5.0" do
2
+ gem "rails", "~> 5.0.0"
3
+ end
4
+
5
+ appraise "rails-5.1" do
6
+ gem "rails", "~> 5.1.0"
7
+ end
8
+
9
+ appraise "rails-5.2" do
10
+ gem "rails", "~> 5.2.0"
11
+ end
data/CHANGELOG.md ADDED
@@ -0,0 +1,758 @@
1
+ ## Unreleased
2
+
3
+ * Fix bug in "Dangerous query methods" deprecation warning fix in custom order when using Arel.sql
4
+ * Loosen lock on Kaminari
5
+ * Fix CSV export download link in combination with Turbolinks 5 (download the file instead of rendering it as text)
6
+ * Allow Rails 6 in gemspec lock
7
+ * Do not add group to WiceGrid#read relation when there is no group. Fixes wrong pagination when having including a many association.
8
+ * Fix CSV export icon for FontAwesome 5
9
+
10
+ ## 4.1.0 (28 November, 2018)
11
+
12
+ * Add option `filter_control_options` to columns. Initial use is to pass in the options `start_year`, `end_year`, and `max_year_allowed` when using `rails_datetime_helper` - [#12](https://github.com/patricklindsay/wice_grid/pull/18)
13
+ * Fix deprecation (in Rails 5.0.x) and incorrect behaviour (in Rails 5.1.x) of CSV exports - [#4](https://github.com/patricklindsay/wice_grid/pull/4)
14
+ * Fix deprecation (in Rails 5.2) regarding "Dangerous query methods" in `order` clauses. Note that when using the `custom_order` option you must pass a value acceptable for ActiveRecord's `order` method, otherwise you will receive the same warning. - [#41](https://github.com/patricklindsay/wice_grid/pull/41)
15
+ * Add support for using `Arel::Attributes::Attribute`s with the `custom_order` option. - [#41](https://github.com/patricklindsay/wice_grid/pull/41)
16
+ * Added `sort_by` option to column to allow arbitrary, Ruby-based ordering. - [#3](https://github.com/patricklindsay/wice_grid/pull/3)
17
+ * Added Rails 5.2 support
18
+ * Bump Kaminari to ~> 1.1.0
19
+
20
+ ## 4.0.1 (31 May, 2018)
21
+
22
+ * Fixed tagbuilder issue with Rails 5.0.x - [#1](https://github.com/patricklindsay/wice_grid/pull/1)
23
+ * Moved testbed into repo - [#12](https://github.com/patricklindsay/wice_grid/pull/12)
24
+ * Remove old release notes and empty /test directory
25
+ * Removed `Gemfile.lock` from `.gitignore`
26
+ * Removed `codeclimate-test-reporter` dev dependancy
27
+
28
+ ## 4.0.0 (18 Jan, 2018)
29
+
30
+ ### Rails 5.0 & 5.1 Support
31
+ Added support for Rails 5.0 & 5.1. Anything below Rails 5 is no longer supported.
32
+
33
+ ### Focused Filter Has Cursor/Caret at the End of Input
34
+
35
+ The cursor/caret used to appear at the beginning of the focused autocomplete in FF and IE.
36
+ This caused annoyances for users of those browsers who typed slowly since the page would
37
+ reload and when they started typing again the text would appear before their last entries.
38
+
39
+ For example if someone was searching for 'john' but paused after 'joh', they would end up typing 'njoh', instead of 'john'. If they weren't paying attention,
40
+ they might think there is no 'john', when they'd mistakenly searched for 'njoh'.
41
+
42
+ ### Turbolinks 5 Support
43
+ Handled by initializing WiceGrid on `turbolinks:render` as well as `page:load ready`
44
+
45
+ ## 3.6.0
46
+
47
+ ## New API For Joined Tables
48
+
49
+ Before 3.6.0 `:model_class` was used in column definitions for columns from joined tables.
50
+
51
+ In 3.6.0 the API has changed to use associations.
52
+ If, say, a `Task` `belongs_to` a `Priority`, a column definition should specify this association using `:assoc`:
53
+
54
+ ```ruby
55
+ g.column name: 'Priority', attribute: 'name', assoc: :priority do |task|
56
+ task.priority.name if task.priority
57
+ end
58
+ ```
59
+
60
+ If, say, a `Task` `belongs_to` a `Project`, and a `Project` belongs to a `Customer`,
61
+ `assoc:` should be a list of these associations:
62
+
63
+ ```ruby
64
+ g.column name: 'Customer', attribute: 'name', assoc: [:project, :customer] do |task|
65
+ task.project.customer.name if task.project && task.project.customer
66
+ end
67
+ ```
68
+
69
+
70
+ ## Blockless Columns For Joined Tables
71
+
72
+ Blockless columns used to only work for the main model.
73
+ Now they can be used for joined tables, too.
74
+
75
+ Instead of
76
+
77
+ ```ruby
78
+ g.column name: 'Priority', attribute: 'name', assoc: :priority do |task|
79
+ task.priority.name if task.priority
80
+ end
81
+ ```
82
+
83
+ you can write
84
+
85
+ ```ruby
86
+ g.column name: 'Priority', attribute: 'name', assoc: :priority
87
+ ```
88
+
89
+ Instead of
90
+
91
+ ```ruby
92
+ g.column name: 'Customer', attribute: 'name', assoc: [:project, :customer] do |task|
93
+ task.project.customer.name if task.project && task.project.customer
94
+ end
95
+ ```
96
+
97
+ you can write
98
+
99
+ ```ruby
100
+ g.column name: 'Customer', attribute: 'name', assoc: [:project, :customer]
101
+ ```
102
+
103
+
104
+ ## New Way To Choose Datepickers
105
+
106
+ Before 3.6.0 to choose a datepicker type we used `:helper_style` in column definitions and `Wice::Defaults:HELPER_STYLE` in the configuration_file.
107
+
108
+ In 3.6.0 `:helper_style` and `Wice::Defaults:HELPER_STYLE` are gone.
109
+
110
+ Now each datepicker is simply a separate filter type, and to pick a datepicker we can use `:filter_type`, just like other filter types are chosen.
111
+
112
+ Filter types for dates and datetimes are
113
+
114
+ * `:rails_datetime_helper`
115
+ * `:rails_date_helper`
116
+ * `:jquery_datepicker`
117
+ * `:bootstrap_datepicker`
118
+
119
+ Example:
120
+
121
+ ```ruby
122
+ g.column name: 'Updated', attribute: 'updated_at', filter_type: :rails_datetime_helper do |task|
123
+ task.updated_at.to_s(:db)
124
+ end
125
+ ```
126
+
127
+ Default filter types for date and datetime columns are set by `Wice::Defaults:DEFAULT_FILTER_FOR_DATE` and `Wice::Defaults:DEFAULT_FILTER_FOR_DATETIME`.
128
+
129
+
130
+ ## Icons
131
+
132
+ There are no more icons inside of the gem. Instead, [Font Awesome](https://github.com/FortAwesome/font-awesome-sass) is used.
133
+
134
+ ## CSS
135
+
136
+ CSS is no longer copied to the applications asset directory. Instead the user is supposed to add
137
+
138
+ ```sass
139
+ @import "wice_grid";
140
+ @import "font-awesome-sprockets";
141
+ @import "font-awesome";
142
+ ```
143
+
144
+ to `application.scss`.
145
+
146
+ `font-awesome-sass` is not a dependency of WiceGrid in case you decide to style WiceGrid icons differently,
147
+ so you need to add it explicitly to your Gemfile:
148
+
149
+ ```ruby
150
+ gem 'font-awesome-sass', '~> 4.3'
151
+ ```
152
+
153
+
154
+ ## CI_LIKE
155
+
156
+ Setting a configuration value in Wice::Defaults::STRING_MATCHING_OPERATORS to CI_LIKE will result in the following SQL generated for string filters:
157
+
158
+ ```sql
159
+ UPPER(table.field) LIKE UPPER(?)"
160
+ ```
161
+
162
+
163
+ ## USE_DEFAULT_SCOPE
164
+
165
+ New `USE_DEFAULT_SCOPE` configuration value from @nathanvda.
166
+ By default ActiveRecord calls are always executed inside `Model.unscoped{}`.
167
+ Setting `USE_DEFAULT_SCOPE` to `true` will use the default scope for all queries.
168
+
169
+
170
+ # 3.5.0
171
+
172
+ * In addition to two icons "SET ALL" and "UNSET ALL" in the action column, there is now
173
+ an option to use a standard HTML checkbox. This is now the default.
174
+ * Support for Bootstrap Datepicker. A suggested way to use Bootstrap Datepicker in a Rails app
175
+ is https://github.com/Nerian/bootstrap-datepicker-rails. Configuration variable HELPER_STYLE
176
+ sets the default flavor of date pickers. Can also be set per grid with helper_style: :bootstrap
177
+ * :calendar jQuery UI datepicker
178
+ * :bootstrap Bootstrap datepicker
179
+ * :standard
180
+ * Italian locale
181
+ * Spanish locale
182
+ * various fixes
183
+ * Configuration variable ALLOW_SHOWING_ALL_QUERIES renamed to ALLOW_SHOWING_ALL_RECORDS
184
+
185
+
186
+
187
+ # 3.4.14
188
+
189
+ Wice::Defaults::HIDE_ALL_LINK_FROM is nil by default
190
+
191
+ # 3.4.13
192
+
193
+ New configuration variable Wice::Defaults::HIDE_ALL_LINK_FROM! When set and the total
194
+ number of row exceeds its value, the "SHOW ALL" link disappears.
195
+
196
+ # 3.4.12
197
+
198
+ fixes
199
+
200
+ # 3.4.11
201
+
202
+ started adding HTML5 datepicker
203
+ changed how relations are detected so that it can work with relation proxies (aka octopus)
204
+
205
+ # 3.4.10
206
+
207
+ bug fixes
208
+ better support for :group
209
+
210
+ # 3.4.9
211
+
212
+ better support for Asset Pipeline
213
+
214
+ bugfixes
215
+
216
+ dropped support for Ruby 1.8
217
+
218
+ # 3.4.8
219
+
220
+ a friendlier exception message when a constant is missing in wice_grid_config.rb
221
+
222
+ bugfixes
223
+
224
+ # 3.4.6
225
+
226
+ Better support for Turbolinks
227
+
228
+ Better support for ActiveRelation #references
229
+
230
+ variable Wice::Defaults::PAGE_METHOD_NAME
231
+
232
+ # 3.4.5
233
+
234
+ Support for ActiveRelation #references
235
+
236
+ bugfixes
237
+
238
+ # 3.4.4
239
+
240
+ bugfixes
241
+
242
+ # 3.4.3
243
+
244
+ bugfixes
245
+
246
+ # 3.4.2
247
+
248
+ External columns processors
249
+
250
+ Operators '<','>','<=','>=','=' in the integer column
251
+
252
+ Bugfixes
253
+
254
+ # 3.4.1
255
+
256
+ Support for Bootstrap 3
257
+
258
+ # 3.4.0
259
+
260
+ Support for Rails 4
261
+
262
+ # 3.3.0
263
+
264
+ The with_paginated_resultset callback receives an ActiveRelation object, not a lambda
265
+
266
+ Wice::Defaults::DATEPICKER_YEAR_RANGE added to the config to define the default year range in Datepicker (https://github.com/leikind/wice_grid/issues/61)
267
+
268
+ Improvement of the javascript calendar control: if the FROM field is set to a value after TO, TO is set to the value of FROM.
269
+ Vice versa: if the TO field is set to a value before FROM, FROM is set to the value of TO
270
+
271
+ New view helpers filter_and_order_state_as_hash(grid) and filter_state_as_hash(grid)
272
+
273
+ HTML tag caption supported
274
+
275
+ Support for Ruby 2.0
276
+
277
+ 2 errors fixed in the Saved Queries UI ( https://github.com/leikind/wice_grid/issues/89 )
278
+
279
+ Bug fixed: extra_request_parameters not propagating to the pagination panel
280
+
281
+ Documentation improvements
282
+
283
+ # 3.2.2
284
+
285
+ improvement of the javascript calendar control: if the FROM field is set to a value after TO, TO is set to the value of FROM.
286
+ Vice versa: if the TO field is set to a value before FROM, FROM is set to the value of TO
287
+
288
+ Wice::Defaults::DATEPICKER_YEAR_RANGE added to the config to define the default year range in Datepicker (https://github.com/leikind/wice_grid/issues/61)
289
+
290
+ support for Ruby 2.0
291
+
292
+ <caption> supported
293
+
294
+ 2 js errors fixed in the Saved Queries UI ( https://github.com/leikind/wice_grid/issues/89
295
+
296
+ helpers filter_and_order_state_as_hash(grid) and filter_state_as_hash(grid)
297
+
298
+ the with_paginated_resultset callback receives an ActiveRelation object, not a lambda
299
+
300
+ # 3.2.1
301
+
302
+ action_column can now also take a block. If the block returns a falsy value, no checkbox will be rendered.
303
+
304
+ A fix: the css class submitted to column is also added to the <th> tags of the column.
305
+
306
+ Filter related code has been refactored: condition generators are unified together with view column processors into one module. Writing your own filters has been simplified.
307
+
308
+ The default filter for numeric columns has been replaced by a simple one field filter which checks the values for equality, not the inclusion in a range.
309
+ New column parameter :filter_type allows to load custom alternative filters.
310
+ The old numeric range filter can still be used by specifying filter_type: :range. See lib/columns/column_processor_index.rb for the list of available filters.
311
+
312
+ # 3.2.0
313
+
314
+ Fixes:
315
+ https://github.com/leikind/wice_grid/issues/83
316
+ https://github.com/leikind/wice_grid/issues/82
317
+
318
+ action_column can now also take a block. If the block returns a falsy value, no checkbox will be rendered
319
+
320
+ A fix: the css class submitted to column is also added to <th> tags of the column
321
+
322
+ Filter related code has been refactored: condition generators are unified together with view column processors into one module. Writing your own filters has been simplified.
323
+
324
+ The default filter for numeric columns has been replaced by a simple one field filter which checks the values for equality, not the inclusion in a range.
325
+ New column parameter :filter_type allows to load custom alternative filters. The old numeric range filter can still be used by specifying filter_type: :range.
326
+ See lib/columns/column_processor_index.rb</tt> for the list of available filters.
327
+
328
+
329
+ # 3.0.4
330
+
331
+ bugfixes
332
+
333
+ # 3.0.3
334
+
335
+ bugxixes
336
+
337
+ # 3.0.2
338
+
339
+ bugxixes
340
+
341
+ # 3.0.1
342
+
343
+ Fixed the "Cannot modify SafeBuffer in place" problem and thus Rails # 3.0.8 and # 3.0.9
344
+ Support for ActiveRecord::Relation
345
+
346
+ # 3.0.0
347
+
348
+ Rails 3 support
349
+
350
+ 0.6
351
+
352
+ wice_grid_custom_filter_params used to be a view helper, not it is also accessible from the controller, to be used in cases like redirect_to(my_resource_path(wice_grid_custom_filter_params(...)))
353
+
354
+ auto reloading filters
355
+
356
+ helper export_to_csv_javascript to create custom CSV buttons
357
+
358
+ option :hide_csv_button to hide the default CSV export button
359
+
360
+ Method WiceGrid#selected_records and parameter :after were a bit of a mess and have been substituted by
361
+
362
+ * WiceGrid#current_page_records returning records on the current page
363
+ * WiceGrid#all_pages_records returning records browsable throughout all pages
364
+ * :with_paginated_resultset - callback to process records on the current page
365
+ * :with_resultset - callback to process records browsable throughout all pages
366
+
367
+ Compliant with Rails 1.2.8 with or without rails_xss and erubis
368
+
369
+ Ruby 1.9.1 compliance
370
+
371
+ Dropdowns generated with :custom_filter => :auto and :custom_filter => [method chain] are now ordered by option labels
372
+
373
+ how_filters => false is the same as :show_filters => :no and :show_filters => true is the same as :show_filters => :always
374
+
375
+ action_column - Adds a column with checkboxes for each record.
376
+ Useful for actions with multiple records, for example, delete
377
+ the selected records.
378
+
379
+ using merge_conditions to merge conditions :)
380
+
381
+ WiceGrid is now compatible with the new Rails XSS behavior which
382
+ will be the default in Rails # 3.0 and can be used in Rails 2.3.5
383
+ using the rails_xss plugin.
384
+ Read http://github.com/nzkoz/rails_xss for more
385
+
386
+ wice_grid_custom_filter_params
387
+
388
+ support for with_scope and with_exclusive_scope
389
+
390
+ :total_entries parameter added to initialize_grid (will_paginate)
391
+
392
+ Localization
393
+
394
+ assert_keys wherever possible
395
+
396
+ == 0.5
397
+
398
+ Today "WiceGrid":http://leikind.org/pages/wicegrid has reached its next level of maturity and was awarded the tag of version 0.5.
399
+
400
+ This version of WiceGrid is accompanied by an application called _WiceGrid Examples_ running "online":http://grid.leikind.org/ and with source code available on "GitHub":http://github.com/leikind/wice_grid_examples.
401
+
402
+ Here's a list of changes as compared with "version 0.4":https://blog.wice.eu/2009/7/6/moving-to-github-and-wicegrid-version-0-4 :
403
+
404
+
405
+ --- RHTML
406
+ <%= grid(@tasks_grid) do |g|
407
+ ...
408
+ end -%>
409
+
410
+ <% selected = @tasks_grid.selected_records %>
411
+ <p><%= selected.size %> records selected: <%= selected.map(&:id).to_sentence %></p>
412
+ ---
413
+
414
+ "See an online example":http://grid.leikind.org/integration_with_application_view
415
+
416
+ h4. placement of filter related icons
417
+
418
+ A change in placement of filter related icons (filter icon, reset icon, show/hide icon): if the last column doesn't have any filter or a column name, icons will be placed in the header of this column, otherwise it falls back to the usual behavior when an additional table column is added. To change the behavior back to the old style, set @Wice::Defaults::REUSE_LAST_COLUMN_FOR_FILTER_ICONS@ to @false@ in the configuration file.
419
+
420
+ "See an online example":http://grid.leikind.org/custom_filters2
421
+
422
+
423
+ h4. wice_grid_assets generator
424
+
425
+ Copying asset files (images, css, js, and the configuration file) is now done by a plugin generator, not rake tasks:
426
+
427
+ ---
428
+ ./script/generate wice_grid_assets
429
+ ---
430
+
431
+ h4. blank slate
432
+
433
+ Blank slate feature: it is now possible to replace the grid with some alternative view if no filters are active and there are no records to render:
434
+
435
+ --- RHTML
436
+ <%= grid(@grid) do |g|
437
+
438
+ g.blank_slate do
439
+ "There are no records"
440
+ end
441
+
442
+ g.column do |product|
443
+ ...
444
+ end
445
+ end -%>
446
+ ---
447
+
448
+ There are also two alternative three ways to do it:
449
+
450
+ --- Ruby
451
+ g.blank_slate "some text to be rendered"
452
+ ---
453
+ and
454
+ --- Ruby
455
+ g.blank_slate :partial => "partial_name"
456
+ ---
457
+
458
+ "See an online example":http://grid.leikind.org/no_records
459
+
460
+ h4. custom filters with symbols
461
+
462
+ Improvement to custom filters, namely to
463
+ --- Ruby
464
+ :custom_filter => :symbol
465
+ ---
466
+ and
467
+ --- Ruby
468
+ :custom_filter => [:symbol1, :symbol2, :symbol3]
469
+ ---
470
+
471
+ Now, if the last method returns an array of 2 elements, the first element becomes the select option label and the second - the select option value (usually @id@).
472
+
473
+ Before this change the value returned by the method had been used for both the value and the label of the select option.
474
+
475
+ "See an online example":http://grid.leikind.org/custom_filters3
476
+
477
+ h4. custom filters and NULL
478
+
479
+ Values @null@ and @not null@ in a generated custom filter dropdown are treated specially, as SQL @null@ statement and not as strings. Value @null@ is transformed into SQL condition @IS NULL@, and @not null@ into @IS NOT NULL@ .
480
+
481
+ Thus, if in a filter defined by
482
+
483
+ --- Ruby
484
+ :custom_filter => {'No' => 'null', 'Yes' => 'not null', '1' => 1, '2' => '2', '3' => '3'}
485
+ ---
486
+ values @1@, @2@ and @'No'@ are selected (in a multi-select mode), this will result in the following SQL:
487
+
488
+ --- SQL
489
+ ( table.field IN ( '1', '2' ) OR table.field IS NULL )
490
+ ---
491
+
492
+ "See an online example":http://grid.leikind.org/null_values
493
+
494
+ h4. Wice::Defaults::STRING_MATCHING_OPERATORS
495
+
496
+ in addition to the configuration constant @Wice::Defaults::STRING_MATCHING_OPERATOR@ to define the operator for matching strings (@LIKE@ in most cases), hash @Wice::Defaults::STRING_MATCHING_OPERATORS@ was added to specify string matching operators on per-database basis:
497
+
498
+ --- Ruby
499
+ Wice::Defaults::STRING_MATCHING_OPERATORS = {
500
+ 'ActiveRecord::ConnectionAdapters::MysqlAdapter' => 'LIKE',
501
+ 'ActiveRecord::ConnectionAdapters::PostgreSQLAdapter' => 'ILIKE'
502
+ }
503
+ ---
504
+
505
+ A use-case for this is a Rails application connecting to two databases, one of which is MySQL, and the other is Postgresql. To use case-insensitive matching in Postgresql 'ILIKE' has to be used, but this operator is unknown to MySQL.
506
+
507
+ h4. td_html_attrs and table_html_attrs shortcuts
508
+
509
+ @:td_html_attrs@ in column definitions and @table_html_attrs@ in the table definitions are mostly used to add css classes, so a shorter way has been added to add css classes.
510
+
511
+ Instead of
512
+
513
+ --- RHTML
514
+ <%= grid(@grid, :table_html_attrs => {:class => 'css_class1'}) do |g|
515
+ g.column(:td_html_attrs => {:class => 'css_class2'}) do
516
+ ...
517
+ end
518
+ end -%>
519
+ ---
520
+
521
+ It's possible to just use the new @:class@ option:
522
+
523
+ --- RHTML
524
+ <%= grid(@grid, :class => 'css_class1') do |g|
525
+ g.column(:class => 'css_class2') do
526
+ end
527
+ end -%>
528
+ ---
529
+
530
+ h4. allow_multiple_selection
531
+
532
+ New options for @column@: @:allow_multiple_selection@, use @:allow_multiple_selection => false@ to disable switching between single and multiple selection modes for custom dropdown boxes.
533
+
534
+ "See an online example":http://grid.leikind.org/custom_filters4
535
+
536
+ h4. allow_ordering
537
+
538
+ New parameter for @column@: @:allow_ordering@. Use @:allow_ordering => false@ to disable the ordering of the column.
539
+
540
+ "See an online example":http://grid.leikind.org/basics6
541
+
542
+ h4. allow_showing_all_records
543
+
544
+ Parameter @:allow_showing_all_records@ moved from @initialize_grid@ to the view helper.
545
+
546
+ h4. other
547
+
548
+ * Default styles updated.
549
+ * Javascript code cleaned up and refactored.
550
+ * Quite some number of bugs fixed
551
+
552
+ == 0.4
553
+
554
+ * Detached filters: it has become possible to detach filters and place them anywhere on the page, before or after the grid.
555
+ Read section "Detached Filters" in the README.
556
+
557
+ * More control over Submit and Reset buttons.
558
+ Two new view helpers: submit_grid_javascript returns javascript which applies current filters; reset_grid_javascript returns javascript
559
+ which resets the grid, clearing the state of filters. This allows to create your own Submit and Reset buttons anywhere on the page
560
+ with the help of button_to_function:
561
+
562
+ <%= button_to_function "Submit", submit_grid_javascript(@grid) %>
563
+ <%= button_to_function "Reset", reset_grid_javascript(@grid) %>
564
+
565
+ To complement this feature there are two new parameters in the +grid+ helper :hide_submit_button and :hide_reset_button which
566
+ hide default buttons in the grid if set to true. Together with detached filter this allows to completely
567
+ get rid of the filter row with filters and icons.
568
+
569
+ * erb_mode option has been moved to the grid view helper - watch for warnings and remove the parameter from initialize_grid if you have it there.
570
+
571
+ * helper include_wice_grid_assets will require WiceGrid javascripts and stylesheets on demand, that is, only if at least one initialize_grid
572
+ has been called in the controller. Otherwise the helper returns an empty string. However, you can force the old unconditioned behavior if you
573
+ need by submitting parameter :load_on_demand set to false:
574
+ <%= include_wice_grid_assets(:load_on_demand => false) %>
575
+
576
+ * Compatibility with Rails asset caching. Helpers names_of_wice_grid_stylesheets and names_of_wice_grid_javascripts return names of stylesheet and
577
+ javascript files and can be used with stylesheet_link_tag and javascript_include_tag with :cache => true. Using this trick you have to deal with
578
+ the parameters correctly, mind that Prototype has to be loaded before WiceGrid javascripts:
579
+
580
+ <%= stylesheet_link_tag *(['core', 'modalbox'] + names_of_wice_grid_stylesheets + [ {:cache => true}]) %>
581
+ <%= javascript_include_tag *([:defaults] + names_of_wice_grid_javascripts + [ 'ui', 'swfobject', {:cache => true}]) %>
582
+
583
+ * When a page with a WiceGrid instance is loaded there is check a small chunk of javascript that checks whether Prototype is loaded and whether
584
+ the main WiceGrid javascript files is loaded and is of the correct version. Problems are reported to the user via alert() dialog boxes.
585
+ This check has now been disabled in the production mode.
586
+
587
+ * The default field separator in generated CSV (comma) can now be overridden by setting :enable_export_to_csv to a string instead of +true+.
588
+
589
+ * It is possible to add your own handcrafted HTML after and/or before each grid row. This works similar to +row_attributes+,
590
+ by adding blocks after_row and before_row:
591
+
592
+ <%= grid(@tasks_grid) do |g|
593
+ g.before_row do |task|
594
+ if task.active?
595
+ "<tr><td colspan=\"10\">Custom line for #{t.name}</td></tr>" # this would add a row
596
+ # before every active task row
597
+ else
598
+ nil
599
+ end
600
+ end
601
+ .......
602
+ end %>
603
+
604
+
605
+
606
+ * Bug fixes
607
+
608
+ * Refactoring
609
+ =============
610
+
611
+ === 03/04/2009
612
+
613
+ Possibility to add custom lines after and/or before a grid row.
614
+
615
+
616
+ === 16/03/2009
617
+
618
+ Option to override the default field separator in generated CSV (comma).
619
+
620
+
621
+ === 13/02/2009
622
+
623
+ a bug fix for incorrect generation if dom ids for javascript calendar filter. Happened only for columns belonging to joined tables
624
+
625
+ === 12/01/2009
626
+
627
+ WiceGrid 0.3 released
628
+
629
+ === 12/01/2009
630
+
631
+ All records mode
632
+
633
+ === 10/12/2008
634
+
635
+ custom_filter made Rails-compliant, a new flavor - Array of two-element arrays
636
+
637
+ === 4/12/2008
638
+ A single helper to include all assets in a page
639
+
640
+ A javascript error message if Prototype is not loaded
641
+
642
+ A javascript error message if wice_grid.js is not loaded
643
+
644
+ Added status info to the pagination line:
645
+ « Previous 1 2 3 Next » 1-20 / 50
646
+
647
+ === 3/12/2008
648
+ First implementation of saved queries
649
+
650
+
651
+ === 25/11/2008
652
+
653
+ Negation for string filters: match records where this fiels DOES NOT include the given fragment.
654
+
655
+ === 24/11/2008
656
+
657
+ The string matching operator for string filters (LIKE) has been moved to wice_grid_config.rb in order to make it easier to substitute it with
658
+ something else, for example, ILIKE of Postgresql.
659
+
660
+
661
+ === 19/11/2008
662
+
663
+ Experimental feature : :table_alias parameter to allow ordering and filtering for joining associations referring the same table.
664
+ (See "Joined associations referring to the same table" in README)
665
+
666
+ === 18/11/2008
667
+
668
+ Refactoring
669
+
670
+ === 6/11/2008
671
+
672
+ Ability to provide a callback to a Proc object or a method, the callback will be called with the objects of the current selection of
673
+ objects (throughout all pages). Can be used to use the WiceGrid filters set up by the user for further processing of the user's selection of
674
+ objects.
675
+
676
+ === 5/11/2008
677
+
678
+ Javascript calendars as Date/Datetime filters
679
+
680
+
681
+ === 4/11/2008
682
+
683
+ Ability to inject custom sql code into the ORDER BY clause, for example, ORDER BY char_length(table1.foo)
684
+
685
+ === 4/11/2008
686
+
687
+ Creates a new branch for version 2.3
688
+
689
+
690
+
691
+ === 21/10/2008
692
+
693
+ A bugfix related to custom filters influencing other columns with filters
694
+ A more informative error message if the grid can't find the underlying database column for a view column (incorrect :column_name and :model)
695
+
696
+ === 8/10/2008
697
+
698
+ New view helper parameter <tt>:sorting_dependant_row_cycling</tt> - When set to true (by default it is false) the row styles +odd+ and +even+
699
+ will be changed only when the content of the cell belonging to the sorted column changes. In other words, rows with identical values in the
700
+ ordered column will have the same style (color).
701
+
702
+ === 3/10/2008
703
+
704
+ For simple columns like
705
+
706
+ g.column :column_name => 'Username', :attribute_name => 'username' do |account|
707
+ account.username
708
+ end
709
+
710
+ the following blockless shortcut can be used:
711
+
712
+ g.column :column_name => 'Username', :attribute_name => 'username'
713
+
714
+ In this case +attribute_name+ will be used as the method name to send to the ActiveRecord instance.
715
+
716
+ === revision 27 (30/09/2008)
717
+
718
+ * CSV export
719
+ * Custom filters can switch between a dropdown list and a multiple select list, thus allowing to search for records matching
720
+ more that one value (operator OR)
721
+
722
+ === revision 17 (19/08/2008)
723
+
724
+ * A bug fixed: extra_request_parameters did not propagate to will_paginate page panel. Now it does.
725
+
726
+ === revision 13 (6/08/2008)
727
+
728
+ * File <tt>config.rb</tt> renamed.
729
+ * New parameters for +column+ :
730
+ * <tt>:boolean_filter_true_label</tt> - overrides the default value for <tt>BOOLEAN_FILTER_TRUE_LABEL</tt> ('+yes+') in the config.
731
+ Only has effect in a column with a boolean filter.
732
+ * <tt>:boolean_filter_false_label</tt> - overrides the default value for <tt>BOOLEAN_FILTER_FALSE_LABEL</tt> ('+no+') in the config.
733
+ Only has effect in a column with a boolean filter.
734
+ * <tt>:filter_all_label</tt> - overrides the default value for <tt>BOOLEAN_FILTER_FALSE_LABEL</tt> ('<tt>--</tt>') in the config.
735
+ Has effect in a column with a boolean filter _or_ a custom filter.
736
+
737
+ === revision 11
738
+
739
+ * New row_attributes method to dynamically generate HTML attributes for the <tt><tr></tt> tag:
740
+
741
+ <%= grid(@portal_applications_grid) do |g|
742
+ g.row_attributes{ |portal_application|
743
+ {:id => "#{@portal_applications_grid.name}_row_#{portal_application.id}"}
744
+ }
745
+
746
+ g.column{ |portal_application| ... }
747
+ g.column{ |portal_application| ... }
748
+ end -%>
749
+
750
+ * The column block can now optionally return an array of two values, where the first element is the cell
751
+ contents and the second is a hash of HTML attributes to be added for the <td> tag of the current cell.
752
+
753
+ === revision 10
754
+
755
+ * New parameter +grid+ parameter: <tt>:extra_request_parameters</tt>.
756
+ (Read http://redmine.wice.eu/api/wice_grid/classes/Wice/GridViewHelper.html#M000002)
757
+
758
+ === 0