active_scaffold 3.2.17 → 3.2.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (246) hide show
  1. data/CHANGELOG +5 -1
  2. metadata +17 -261
  3. data/app/assets/images/active_scaffold/add.png +0 -0
  4. data/app/assets/images/active_scaffold/arrow_down.png +0 -0
  5. data/app/assets/images/active_scaffold/arrow_up.png +0 -0
  6. data/app/assets/images/active_scaffold/close.png +0 -0
  7. data/app/assets/images/active_scaffold/close_touch.png +0 -0
  8. data/app/assets/images/active_scaffold/config.png +0 -0
  9. data/app/assets/images/active_scaffold/cross.png +0 -0
  10. data/app/assets/images/active_scaffold/gears.png +0 -0
  11. data/app/assets/images/active_scaffold/indicator-small.gif +0 -0
  12. data/app/assets/images/active_scaffold/indicator.gif +0 -0
  13. data/app/assets/images/active_scaffold/magnifier.png +0 -0
  14. data/app/assets/javascripts/active_scaffold.js.erb +0 -19
  15. data/app/assets/javascripts/jquery/active_scaffold.js +0 -1113
  16. data/app/assets/javascripts/jquery/date_picker_bridge.js.erb +0 -24
  17. data/app/assets/javascripts/jquery/draggable_lists.js +0 -27
  18. data/app/assets/javascripts/jquery/jquery.editinplace.js +0 -743
  19. data/app/assets/javascripts/jquery/tiny_mce_bridge.js +0 -7
  20. data/app/assets/javascripts/prototype/active_scaffold.js +0 -1107
  21. data/app/assets/javascripts/prototype/dhtml_history.js +0 -870
  22. data/app/assets/javascripts/prototype/form_enhancements.js +0 -117
  23. data/app/assets/javascripts/prototype/rico_corner.js +0 -370
  24. data/app/assets/javascripts/prototype/tiny_mce_bridge.js +0 -7
  25. data/app/assets/stylesheets/active_scaffold-ie.css.scss +0 -54
  26. data/app/assets/stylesheets/active_scaffold.css.scss +0 -14
  27. data/app/assets/stylesheets/active_scaffold_colors.css.scss +0 -395
  28. data/app/assets/stylesheets/active_scaffold_extensions.css.erb +0 -2
  29. data/app/assets/stylesheets/active_scaffold_images.css.scss +0 -40
  30. data/app/assets/stylesheets/active_scaffold_layout.css +0 -936
  31. data/app/assets/stylesheets/blue-theme.css +0 -74
  32. data/config/locales/de.yml +0 -125
  33. data/config/locales/en.yml +0 -127
  34. data/config/locales/es.yml +0 -128
  35. data/config/locales/fr.yml +0 -131
  36. data/config/locales/hu.yml +0 -126
  37. data/config/locales/ja.yml +0 -126
  38. data/config/locales/ru.yml +0 -135
  39. data/frontends/default/views/_action_group.html.erb +0 -24
  40. data/frontends/default/views/_add_existing_form.html.erb +0 -30
  41. data/frontends/default/views/_base_form.html.erb +0 -53
  42. data/frontends/default/views/_create_form.html.erb +0 -8
  43. data/frontends/default/views/_create_form_on_list.html.erb +0 -6
  44. data/frontends/default/views/_field_search.html.erb +0 -32
  45. data/frontends/default/views/_form.html.erb +0 -28
  46. data/frontends/default/views/_form_association.html.erb +0 -17
  47. data/frontends/default/views/_form_association_footer.html.erb +0 -47
  48. data/frontends/default/views/_form_attribute.html.erb +0 -23
  49. data/frontends/default/views/_form_hidden_attribute.html.erb +0 -7
  50. data/frontends/default/views/_form_messages.html.erb +0 -5
  51. data/frontends/default/views/_horizontal_subform.html.erb +0 -22
  52. data/frontends/default/views/_horizontal_subform_footer.html.erb +0 -0
  53. data/frontends/default/views/_horizontal_subform_header.html.erb +0 -11
  54. data/frontends/default/views/_horizontal_subform_record.html.erb +0 -43
  55. data/frontends/default/views/_human_conditions.html.erb +0 -1
  56. data/frontends/default/views/_list.html.erb +0 -18
  57. data/frontends/default/views/_list_actions.html.erb +0 -15
  58. data/frontends/default/views/_list_calculations.html.erb +0 -16
  59. data/frontends/default/views/_list_column_headings.html.erb +0 -12
  60. data/frontends/default/views/_list_header.html.erb +0 -10
  61. data/frontends/default/views/_list_inline_adapter.html.erb +0 -21
  62. data/frontends/default/views/_list_messages.html.erb +0 -28
  63. data/frontends/default/views/_list_pagination.html.erb +0 -11
  64. data/frontends/default/views/_list_pagination_links.html.erb +0 -9
  65. data/frontends/default/views/_list_record.html.erb +0 -13
  66. data/frontends/default/views/_list_record_columns.html.erb +0 -8
  67. data/frontends/default/views/_list_with_header.html.erb +0 -36
  68. data/frontends/default/views/_messages.html.erb +0 -10
  69. data/frontends/default/views/_refresh_list.js.erb +0 -1
  70. data/frontends/default/views/_render_field.js.erb +0 -20
  71. data/frontends/default/views/_row.html.erb +0 -1
  72. data/frontends/default/views/_search.html.erb +0 -34
  73. data/frontends/default/views/_search_attribute.html.erb +0 -10
  74. data/frontends/default/views/_show.html.erb +0 -8
  75. data/frontends/default/views/_show_columns.html.erb +0 -15
  76. data/frontends/default/views/_update_actions.html.erb +0 -9
  77. data/frontends/default/views/_update_calculations.js.erb +0 -4
  78. data/frontends/default/views/_update_form.html.erb +0 -6
  79. data/frontends/default/views/_update_messages.js.erb +0 -2
  80. data/frontends/default/views/_vertical_subform.html.erb +0 -12
  81. data/frontends/default/views/_vertical_subform_record.html.erb +0 -43
  82. data/frontends/default/views/action_confirmation.html.erb +0 -13
  83. data/frontends/default/views/add_existing.js.erb +0 -14
  84. data/frontends/default/views/add_existing_form.html.erb +0 -5
  85. data/frontends/default/views/create.html.erb +0 -5
  86. data/frontends/default/views/delete.html.erb +0 -13
  87. data/frontends/default/views/destroy.js.erb +0 -26
  88. data/frontends/default/views/edit_associated.js.erb +0 -12
  89. data/frontends/default/views/field_search.html.erb +0 -5
  90. data/frontends/default/views/form_messages.js.erb +0 -1
  91. data/frontends/default/views/list.html.erb +0 -1
  92. data/frontends/default/views/on_action_update.js.erb +0 -22
  93. data/frontends/default/views/on_create.js.erb +0 -38
  94. data/frontends/default/views/on_mark.js.erb +0 -6
  95. data/frontends/default/views/on_update.js.erb +0 -29
  96. data/frontends/default/views/refresh_list.js.erb +0 -2
  97. data/frontends/default/views/render_field.js.erb +0 -1
  98. data/frontends/default/views/row.js.erb +0 -2
  99. data/frontends/default/views/search.html.erb +0 -5
  100. data/frontends/default/views/show.html.erb +0 -5
  101. data/frontends/default/views/update.html.erb +0 -8
  102. data/frontends/default/views/update_column.js.erb +0 -15
  103. data/frontends/default/views/update_row.js.erb +0 -1
  104. data/lib/active_scaffold.rb +0 -373
  105. data/lib/active_scaffold/actions/common_search.rb +0 -22
  106. data/lib/active_scaffold/actions/core.rb +0 -203
  107. data/lib/active_scaffold/actions/create.rb +0 -139
  108. data/lib/active_scaffold/actions/delete.rb +0 -74
  109. data/lib/active_scaffold/actions/field_search.rb +0 -78
  110. data/lib/active_scaffold/actions/list.rb +0 -208
  111. data/lib/active_scaffold/actions/mark.rb +0 -89
  112. data/lib/active_scaffold/actions/nested.rb +0 -244
  113. data/lib/active_scaffold/actions/search.rb +0 -48
  114. data/lib/active_scaffold/actions/show.rb +0 -61
  115. data/lib/active_scaffold/actions/subform.rb +0 -23
  116. data/lib/active_scaffold/actions/update.rb +0 -156
  117. data/lib/active_scaffold/active_record_permissions.rb +0 -135
  118. data/lib/active_scaffold/attribute_params.rb +0 -200
  119. data/lib/active_scaffold/bridges.rb +0 -61
  120. data/lib/active_scaffold/bridges/ancestry.rb +0 -5
  121. data/lib/active_scaffold/bridges/ancestry/ancestry_bridge.rb +0 -39
  122. data/lib/active_scaffold/bridges/bitfields.rb +0 -6
  123. data/lib/active_scaffold/bridges/bitfields/bitfields_bridge.rb +0 -37
  124. data/lib/active_scaffold/bridges/calendar_date_select.rb +0 -24
  125. data/lib/active_scaffold/bridges/calendar_date_select/as_cds_bridge.rb +0 -66
  126. data/lib/active_scaffold/bridges/cancan.rb +0 -15
  127. data/lib/active_scaffold/bridges/cancan/cancan_bridge.rb +0 -127
  128. data/lib/active_scaffold/bridges/carrierwave.rb +0 -12
  129. data/lib/active_scaffold/bridges/carrierwave/carrierwave_bridge.rb +0 -31
  130. data/lib/active_scaffold/bridges/carrierwave/carrierwave_bridge_helpers.rb +0 -10
  131. data/lib/active_scaffold/bridges/carrierwave/form_ui.rb +0 -45
  132. data/lib/active_scaffold/bridges/carrierwave/list_ui.rb +0 -17
  133. data/lib/active_scaffold/bridges/country_helper.rb +0 -9
  134. data/lib/active_scaffold/bridges/country_helper/country_helper_bridge.rb +0 -358
  135. data/lib/active_scaffold/bridges/date_picker.rb +0 -23
  136. data/lib/active_scaffold/bridges/date_picker/ext.rb +0 -63
  137. data/lib/active_scaffold/bridges/date_picker/helper.rb +0 -180
  138. data/lib/active_scaffold/bridges/dragonfly.rb +0 -9
  139. data/lib/active_scaffold/bridges/dragonfly/dragonfly_bridge.rb +0 -34
  140. data/lib/active_scaffold/bridges/dragonfly/dragonfly_bridge_helpers.rb +0 -10
  141. data/lib/active_scaffold/bridges/dragonfly/form_ui.rb +0 -27
  142. data/lib/active_scaffold/bridges/dragonfly/list_ui.rb +0 -16
  143. data/lib/active_scaffold/bridges/file_column.rb +0 -11
  144. data/lib/active_scaffold/bridges/file_column/as_file_column_bridge.rb +0 -46
  145. data/lib/active_scaffold/bridges/file_column/file_column_helpers.rb +0 -57
  146. data/lib/active_scaffold/bridges/file_column/form_ui.rb +0 -34
  147. data/lib/active_scaffold/bridges/file_column/list_ui.rb +0 -26
  148. data/lib/active_scaffold/bridges/file_column/test/functional/file_column_keep_test.rb +0 -43
  149. data/lib/active_scaffold/bridges/file_column/test/mock_model.rb +0 -9
  150. data/lib/active_scaffold/bridges/file_column/test/test_helper.rb +0 -15
  151. data/lib/active_scaffold/bridges/paperclip.rb +0 -12
  152. data/lib/active_scaffold/bridges/paperclip/form_ui.rb +0 -27
  153. data/lib/active_scaffold/bridges/paperclip/list_ui.rb +0 -16
  154. data/lib/active_scaffold/bridges/paperclip/paperclip_bridge.rb +0 -36
  155. data/lib/active_scaffold/bridges/paperclip/paperclip_bridge_helpers.rb +0 -24
  156. data/lib/active_scaffold/bridges/record_select.rb +0 -11
  157. data/lib/active_scaffold/bridges/record_select/helpers.rb +0 -92
  158. data/lib/active_scaffold/bridges/semantic_attributes.rb +0 -5
  159. data/lib/active_scaffold/bridges/semantic_attributes/column.rb +0 -20
  160. data/lib/active_scaffold/bridges/shared/date_bridge.rb +0 -209
  161. data/lib/active_scaffold/bridges/tiny_mce.rb +0 -17
  162. data/lib/active_scaffold/bridges/tiny_mce/helpers.rb +0 -46
  163. data/lib/active_scaffold/config/base.rb +0 -75
  164. data/lib/active_scaffold/config/core.rb +0 -236
  165. data/lib/active_scaffold/config/create.rb +0 -32
  166. data/lib/active_scaffold/config/delete.rb +0 -32
  167. data/lib/active_scaffold/config/field_search.rb +0 -79
  168. data/lib/active_scaffold/config/form.rb +0 -64
  169. data/lib/active_scaffold/config/list.rb +0 -247
  170. data/lib/active_scaffold/config/mark.rb +0 -30
  171. data/lib/active_scaffold/config/nested.rb +0 -42
  172. data/lib/active_scaffold/config/search.rb +0 -73
  173. data/lib/active_scaffold/config/show.rb +0 -31
  174. data/lib/active_scaffold/config/subform.rb +0 -35
  175. data/lib/active_scaffold/config/update.rb +0 -33
  176. data/lib/active_scaffold/configurable.rb +0 -29
  177. data/lib/active_scaffold/constraints.rb +0 -171
  178. data/lib/active_scaffold/data_structures/action_columns.rb +0 -142
  179. data/lib/active_scaffold/data_structures/action_link.rb +0 -185
  180. data/lib/active_scaffold/data_structures/action_links.rb +0 -191
  181. data/lib/active_scaffold/data_structures/actions.rb +0 -45
  182. data/lib/active_scaffold/data_structures/bridge.rb +0 -22
  183. data/lib/active_scaffold/data_structures/column.rb +0 -401
  184. data/lib/active_scaffold/data_structures/columns.rb +0 -75
  185. data/lib/active_scaffold/data_structures/error_message.rb +0 -24
  186. data/lib/active_scaffold/data_structures/nested_info.rb +0 -171
  187. data/lib/active_scaffold/data_structures/set.rb +0 -61
  188. data/lib/active_scaffold/data_structures/sorting.rb +0 -167
  189. data/lib/active_scaffold/engine.rb +0 -4
  190. data/lib/active_scaffold/extensions/action_controller_rendering.rb +0 -20
  191. data/lib/active_scaffold/extensions/action_controller_rescueing.rb +0 -7
  192. data/lib/active_scaffold/extensions/action_view_rendering.rb +0 -115
  193. data/lib/active_scaffold/extensions/active_record_offset.rb +0 -12
  194. data/lib/active_scaffold/extensions/array.rb +0 -7
  195. data/lib/active_scaffold/extensions/cache_association.rb +0 -16
  196. data/lib/active_scaffold/extensions/localize.rb +0 -10
  197. data/lib/active_scaffold/extensions/name_option_for_datetime.rb +0 -12
  198. data/lib/active_scaffold/extensions/nil_id_in_url_params.rb +0 -7
  199. data/lib/active_scaffold/extensions/paginator_extensions.rb +0 -26
  200. data/lib/active_scaffold/extensions/reverse_associations.rb +0 -64
  201. data/lib/active_scaffold/extensions/routing_mapper.rb +0 -48
  202. data/lib/active_scaffold/extensions/to_label.rb +0 -8
  203. data/lib/active_scaffold/extensions/unsaved_associated.rb +0 -61
  204. data/lib/active_scaffold/extensions/unsaved_record.rb +0 -20
  205. data/lib/active_scaffold/extensions/usa_state.rb +0 -46
  206. data/lib/active_scaffold/finder.rb +0 -399
  207. data/lib/active_scaffold/helpers/association_helpers.rb +0 -42
  208. data/lib/active_scaffold/helpers/controller_helpers.rb +0 -94
  209. data/lib/active_scaffold/helpers/form_column_helpers.rb +0 -322
  210. data/lib/active_scaffold/helpers/human_condition_helpers.rb +0 -64
  211. data/lib/active_scaffold/helpers/id_helpers.rb +0 -131
  212. data/lib/active_scaffold/helpers/list_column_helpers.rb +0 -374
  213. data/lib/active_scaffold/helpers/pagination_helpers.rb +0 -62
  214. data/lib/active_scaffold/helpers/search_column_helpers.rb +0 -257
  215. data/lib/active_scaffold/helpers/show_column_helpers.rb +0 -44
  216. data/lib/active_scaffold/helpers/view_helpers.rb +0 -398
  217. data/lib/active_scaffold/marked_model.rb +0 -38
  218. data/lib/active_scaffold/paginator.rb +0 -136
  219. data/lib/active_scaffold/responds_to_parent.rb +0 -70
  220. data/lib/active_scaffold/tableless.rb +0 -83
  221. data/lib/active_scaffold/version.rb +0 -9
  222. data/lib/active_scaffold_env.rb +0 -13
  223. data/lib/generators/active_scaffold/USAGE +0 -29
  224. data/lib/generators/active_scaffold/active_scaffold_generator.rb +0 -21
  225. data/lib/generators/active_scaffold_controller/USAGE +0 -19
  226. data/lib/generators/active_scaffold_controller/active_scaffold_controller_generator.rb +0 -29
  227. data/lib/generators/active_scaffold_controller/templates/controller.rb +0 -4
  228. data/lib/generators/active_scaffold_controller/templates/helper.rb +0 -2
  229. data/public/blank.html +0 -33
  230. data/shoulda_macros/macros.rb +0 -136
  231. data/vendor/assets/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  232. data/vendor/assets/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  233. data/vendor/assets/images/ui-bg_flat_10_000000_40x100.png +0 -0
  234. data/vendor/assets/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  235. data/vendor/assets/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  236. data/vendor/assets/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  237. data/vendor/assets/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  238. data/vendor/assets/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  239. data/vendor/assets/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  240. data/vendor/assets/images/ui-icons_222222_256x240.png +0 -0
  241. data/vendor/assets/images/ui-icons_228ef1_256x240.png +0 -0
  242. data/vendor/assets/images/ui-icons_ef8c08_256x240.png +0 -0
  243. data/vendor/assets/images/ui-icons_ffd27a_256x240.png +0 -0
  244. data/vendor/assets/images/ui-icons_ffffff_256x240.png +0 -0
  245. data/vendor/assets/javascripts/jquery-ui-timepicker-addon.js +0 -1276
  246. data/vendor/assets/stylesheets/jquery-ui.css +0 -568
@@ -1,12 +0,0 @@
1
- <%
2
- sorting = active_scaffold_config.list.user.sorting
3
- sorting_stages = ['reset', 'ASC', 'DESC']
4
- default_sorting = active_scaffold_config.list.user.default_sorting
5
- default_sorting_stages = ['ASC', 'DESC']
6
- -%>
7
- <% columns.each do |column| -%>
8
- <% stages = default_sorting.sorts_on?(column) ? default_sorting_stages : sorting_stages -%>
9
- <%= render_column_heading(column, sorting, stages.after(sorting.direction_of(column)) || 'ASC') %>
10
- <% end -%>
11
- <th class="actions">
12
- </th>
@@ -1,10 +0,0 @@
1
- <% action_links = active_scaffold_config.action_links.collection
2
- unless action_links.empty? -%>
3
- <div class="actions">
4
- <%= render :partial => 'action_group', :locals => {:action_links => action_links,
5
- :url_options => params_for,
6
- :traverse_options => nested? ? {:reverse => true} : {}} %>
7
- <%= loading_indicator_tag(:action => :table) %>
8
- </div>
9
- <% end %>
10
- <h2><%= active_scaffold_config.list.user.label %></h2>
@@ -1,21 +0,0 @@
1
- <%
2
- column_count ||= begin
3
- config = if nested? and (nested.singular_association? || action_name == 'index')
4
- active_scaffold_config_for(nested.parent_model)
5
- else
6
- active_scaffold_config
7
- end
8
- # increment in 1 for self-associations, parent_model config will have constraints too
9
- config.list.columns.count + 1 + (config == active_scaffold_config && action_name == 'index' ? 1 : 0)
10
- end
11
- %>
12
- <%# nested_id, allows us to remove a nested scaffold programmatically %>
13
- <tr class="inline-adapter" id="<%= element_row_id :action => :nested %>">
14
- <td colspan="<%= column_count %>" class="inline-adapter-cell">
15
- <div class="<%= "#{params[:action]}-view" if params[:action] %> <%= "#{nested? ? nested.name : id_from_controller(params[:controller])}-view" %> view">
16
- <%= link_to(as_(:close), '', :class => 'inline-adapter-close as_cancel', :remote => true, :title => as_(:close)) -%>
17
- <%= payload -%>
18
- </div>
19
- </td>
20
- </tr>
21
- <%= javascript_tag("var action_link = ActiveScaffold.ActionLink.get('#{element_row_id(:action => :nested)}'); if (action_link) action_link.update_flash_messages('#{escape_javascript(render(:partial => 'messages').strip)}');") %>
@@ -1,28 +0,0 @@
1
- <% column_count ||= columns.length + 1 -%>
2
- <tbody class="messages">
3
- <tr class="record even-record">
4
- <td colspan="<%= column_count -%>" class="messages-container">
5
- <p class="error-message message server-error" style="display:none;">
6
- <%= as_(:internal_error).html_safe %>
7
- <a href="#" class="close" title="<%= as_(:close).html_safe %>"><%= as_(:close).html_safe %></a>
8
- </p>
9
- <div id="<%= active_scaffold_messages_id -%>">
10
- <%= render :partial => 'messages' %>
11
- </div>
12
- <div class="filtered-message" <%= ' style="display:none;" '.html_safe unless @filtered %>>
13
- <%= @filtered.is_a?(Array) ? render(:partial => 'human_conditions', :locals => {:columns => @filtered}) : as_(active_scaffold_config.list.filtered_message) %>
14
- <% if active_scaffold_config.list.show_search_reset && @filtered -%>
15
- <div class="reset">
16
- <%= loading_indicator_tag(:action => :record, :id => nil) %>
17
- <%= render_action_link(active_scaffold_config.list.reset_link, params_for(:search => '')) %>
18
- </div>
19
- <% end -%>
20
- </div>
21
- <p id="<%= empty_message_id %>" class="empty-message" <%= ' style="display:none;" '.html_safe unless @page.items.empty? %>>
22
- <%= as_(active_scaffold_config.list.no_entries_message) %>
23
- </p>
24
- </td>
25
- </tr>
26
- </tbody>
27
-
28
-
@@ -1,11 +0,0 @@
1
- <% if active_scaffold_config.list.pagination -%>
2
- <div class="active-scaffold-footer">
3
- <% unless @page.pager.infinite? -%>
4
- <div class="active-scaffold-found"><span class="active-scaffold-records"><%= @page.pager.count -%></span> <%=as_(:found, :count => @page.pager.count) %></div>
5
- <% end -%>
6
- <div class="active-scaffold-pagination">
7
- <%= render :partial => 'list_pagination_links', :locals => { :current_page => @page } if @page.pager.infinite? || @page.pager.number_of_pages > 1 %>
8
- </div>
9
- <br clear="both" /><%# a hack for the Rico Corner problem %>
10
- </div>
11
- <% end -%>
@@ -1,9 +0,0 @@
1
- <% unless current_page.nil? -%>
2
- <% url_options = params_for(:action => :index) -%>
3
- <% options = {'data-page-history' => controller_id, :remote => true, :method => :get} -%>
4
-
5
- <%= loading_indicator_tag :action => :pagination %>
6
- <%= link_to as_(:previous), url_options.merge(:page => current_page.number - 1), options.merge(:class => "as_paginate previous") if current_page.prev? %>
7
- <%= pagination_ajax_links current_page, url_options, options, active_scaffold_config.list.page_links_inner_window, active_scaffold_config.list.page_links_outer_window %>
8
- <%= link_to as_(:next), url_options.merge(:page => current_page.number + 1), options.merge(:class => "as_paginate next") if current_page.next? %>
9
- <% end -%>
@@ -1,13 +0,0 @@
1
- <%
2
- record = list_record if list_record # compat with render :partial :collection
3
- columns ||= list_columns
4
- tr_class = cycle("", "even-record") + ' ' + list_row_class(record)
5
- url_options = params_for(:action => :list, :id => record.id)
6
- action_links ||= active_scaffold_config.action_links.member
7
- -%>
8
-
9
- <tr class="record <%= tr_class %>" id="<%= element_row_id(:action => :list, :id => record.id) %>" data-refresh="<%= url_for(params_for(:action => :row, :id => record.id, :_method => :get)).html_safe %>">
10
- <%= render :partial => 'list_record_columns', :locals => {:record => record, :columns => columns} %>
11
- <%= render :partial => 'list_actions', :locals => {:record => record, :url_options => url_options, :action_links => action_links} unless action_links.empty? %>
12
- <%= render_nested_view(action_links, url_options, record) unless @nested_auto_open.nil? %>
13
- </tr>
@@ -1,8 +0,0 @@
1
- <% columns.each do |column| %>
2
- <% authorized = record.authorized_for?(:crud_type => :read, :column => column.name) -%>
3
- <% column_value = authorized ? get_column_value(record, column) : active_scaffold_config.list.empty_field_text -%>
4
-
5
- <%= content_tag :td, column_attributes(column, record).merge(:class => column_class(column, column_value, record)) do %>
6
- <%= authorized ? render_list_column(column_value, column, record) : column_value %>
7
- <% end %>
8
- <% end -%>
@@ -1,36 +0,0 @@
1
- <div id="<%= active_scaffold_id -%>" class="<%= as_main_div_class %>" <%= "data-eid=#{id_from_controller(params[:eid])}" if params[:eid]%>>
2
- <div class="active-scaffold-header">
3
- <%= render :partial => 'list_header' %>
4
- </div>
5
- <table cellpadding="0" cellspacing="0">
6
- <tbody class="before-header" id="<%= before_header_id -%>">
7
- <% if active_scaffold_config.list.always_show_search %>
8
- <% old_record, @record = @record, new_model %>
9
- <tr>
10
- <td>
11
- <div class="active-scaffold show_search-view <%= "#{id_from_controller params[:controller]}-view" %> view">
12
- <%= render :partial => active_scaffold_config.list.search_partial %>
13
- </div>
14
- </td>
15
- </tr>
16
- <% @record = old_record %>
17
- <% else %>
18
- <tr><td></td></tr>
19
- <% end %>
20
- <% if !nested? && active_scaffold_config.list.always_show_create %>
21
- <% old_record, @record = @record, new_model %>
22
- <tr>
23
- <td>
24
- <div class="active-scaffold create-view <%= "#{id_from_controller params[:controller]}-view" %> view">
25
- <%= render :partial => 'create_form_on_list' %>
26
- </div>
27
- </td>
28
- </tr>
29
- <% @record = old_record %>
30
- <% end %>
31
- </tbody>
32
- </table>
33
- <div id="<%= active_scaffold_content_id-%>" class="as_content">
34
- <%= render :partial => 'list' %>
35
- </div>
36
- </div>
@@ -1,10 +0,0 @@
1
- <% for name in [:info, :warning, :error] %>
2
- <% if flash[name] %>
3
- <div class="<%= "#{name}-message message" %>">
4
- <%= display_message flash[name] %>
5
- <% if request.xhr? %>
6
- <a href="#" class="close" title="<%= as_(:close) %>"><%= as_(:close) %></a>
7
- <% end %>
8
- </div>
9
- <% end %>
10
- <% end %>
@@ -1 +0,0 @@
1
- ActiveScaffold.replace_html('<%= active_scaffold_content_id %>', '<%= escape_javascript(render(:partial => 'list', :layout => false)) %>');
@@ -1,20 +0,0 @@
1
- <%
2
- column = if render_field.is_a? ActiveScaffold::DataStructures::Column
3
- render_field
4
- else
5
- active_scaffold_config.columns[render_field.to_sym]
6
- end
7
- @rendered ||= Set.new
8
- return if @rendered.include? column.name
9
- @rendered << column.name
10
- if column_renders_as(column) == :subform
11
- options = {:is_subform => true, :field_class => "#{column.name}-sub-form"}
12
- else
13
- options = {:is_subform => false, :field_class => "#{column.name}-input"}
14
- end
15
- -%>
16
-
17
- ActiveScaffold.render_form_field('<%= source_id %>','<%= escape_javascript(render(:partial => form_partial_for_column(column), :locals => { :column => column, :scope => scope })) %>', <%= options.to_json.html_safe %>);
18
- <%if column.update_columns && !column.update_columns.empty?%>
19
- <%= render(:partial => "render_field", :collection => column.update_columns, :locals => {:source_id => source_id, :scope => scope})%>
20
- <%end%>
@@ -1 +0,0 @@
1
- <%= render :partial => 'list_record', :locals => {:record => record} %>
@@ -1,34 +0,0 @@
1
- <% live_search = active_scaffold_config.search.live? -%>
2
- <% url_options = params_for(:action => :index).delete_if{|k,v| k == 'search'} -%>
3
- <%=
4
- options = {:id => element_form_id(:action => 'search'),
5
- :class => "as_form search",
6
- :remote => true,
7
- :method => :get}
8
- options['data-loading'] = true unless live_search
9
- form_tag url_options, options %>
10
- <%= text_field_tag :search, search_params, :class => 'text-input', :id => search_input_id, :size => 50, :autocomplete => :off %>
11
- <%= submit_tag as_(:search), :class => "submit" %>
12
- <%= link_to as_(:reset), url_for(url_options.merge(:search => '')), :class => 'as_cancel', :remote => true, :data => {:refresh => true} %>
13
- <%= loading_indicator_tag(:action => :search) %>
14
- </form>
15
-
16
- <script type="text/javascript">
17
- //<![CDATA[
18
- <% if ActiveScaffold.js_framework == :prototype %>
19
- new TextFieldWithExample('<%= search_input_id %>', '<%= as_(live_search ? :live_search : :search_terms) %>', {focus: true});
20
- <% if live_search -%>
21
- $(<%= search_input_id.to_json.html_safe %>).next().hide();
22
- new Form.Element.DelayedObserver('<%= search_input_id %>', 0.5, function(element, value) {
23
- if (!$(element.id)) return false; // because the element may have been destroyed
24
- $(element).next().click();
25
- });
26
- <% end -%>
27
- <% elsif live_search && ActiveScaffold.js_framework == :jquery %>
28
- jQuery(<%= "##{search_input_id}".to_json.html_safe %>).next().hide();
29
- jQuery(<%= "##{search_input_id}".to_json.html_safe %>).delayedObserver(0.5, function() {
30
- jQuery(<%= "##{search_input_id}".to_json.html_safe %>).parent().trigger("submit");});
31
- <% end -%>
32
- ActiveScaffold.focus_first_element_of_form('<%= element_form_id(:action => 'search') %>');
33
- //]]>
34
- </script>
@@ -1,10 +0,0 @@
1
- <li class="form-element">
2
- <dl>
3
- <dt>
4
- <label for="<%= "search_#{column.name}" %>"><%= column.label %></label>
5
- </dt>
6
- <dd>
7
- <%= active_scaffold_search_for(column) %>
8
- </dd>
9
- </dl>
10
- </li>
@@ -1,8 +0,0 @@
1
- <h4><%= active_scaffold_config.show.label(@record.to_label.nil? ? nil : @record.to_label) %></h4>
2
-
3
- <%= render :partial => 'show_columns', :locals => {:columns => active_scaffold_config.show.columns} -%>
4
-
5
- <p class="form-footer">
6
- <%= link_to as_(:close), main_path_to_return, :class => 'as_cancel', :remote => request.xhr? %>
7
- <%= loading_indicator_tag(:action => :create, :id => params[:id]) %>
8
- </p>
@@ -1,15 +0,0 @@
1
- <dl>
2
- <% columns.each :for => @record do |column| %>
3
- <dt><%= column.label -%></dt>
4
- <% if column.is_a? ActiveScaffold::DataStructures::ActionColumns -%>
5
- <dd>
6
- <%= render :partial => 'show_columns', :locals => {:columns => column} %>
7
- <% else -%>
8
- <% css_class = "#{column.name}-view"
9
- css_class.concat(" #{column.css_class}") unless column.css_class.nil? %>
10
- <dd class="<%= css_class.strip %>">
11
- <%= show_column_value(@record, column) -%> &nbsp;
12
- <% end -%>
13
- </dd>
14
- <% end -%>
15
- </dl>
@@ -1,9 +0,0 @@
1
- <div class="active-scaffold-header">
2
- <div class="actions">
3
- <% active_scaffold_config.action_links.member.each do |link| -%>
4
- <% next unless link.action == 'index' -%>
5
- <% next if skip_action_link(link) -%>
6
- <%= record.authorized_for?(:crud_type => link.crud_type, :action => link.action) ? render_action_link(link, url_options, record) : "<a class='disabled'>#{link.label}</a>" -%>
7
- <% end -%>
8
- </div>
9
- </div>
@@ -1,4 +0,0 @@
1
- <% calculations_id ||= active_scaffold_calculations_id -%>
2
- <% if active_scaffold_config.list.columns.any? {|c| c.calculation?} %>
3
- ActiveScaffold.replace('<%= calculations_id %>', '<%= escape_javascript(render(:partial => 'list_calculations')) %>');
4
- <% end %>
@@ -1,6 +0,0 @@
1
- <% cancel_link = true if cancel_link.nil? %>
2
- <%= render :partial => "base_form", :locals => {:xhr => xhr ||= nil,
3
- :form_action => form_action ||= :update,
4
- :method => method ||= :put,
5
- :cancel_link => cancel_link,
6
- :headline => headline ||= @record.to_label.nil? ? active_scaffold_config.update.label : as_(:update_model, :model => @record.to_label)} %>
@@ -1,2 +0,0 @@
1
- <% messages_id ||= active_scaffold_messages_id -%>
2
- ActiveScaffold.replace_html('<%= messages_id %>', '<%= escape_javascript(render(:partial => 'messages')) %>');
@@ -1,12 +0,0 @@
1
- <div id="<%= sub_form_list_id(:association => column.name) %>">
2
- <% associated.each_index do |index| %>
3
- <% @record = associated[index] -%>
4
- <% if @record.errors.count -%>
5
- <div class="association-record-errors" id="<%= element_messages_id :action => @record.class.name.underscore, :id => "#{parent_record.id}-#{index}" %>">
6
- <%= active_scaffold_error_messages_for :record, :object_name => @record.class.model_name.human.downcase %>
7
- </div>
8
- <% end %>
9
- <%= render :partial => 'vertical_subform_record', :locals => {:scope => column_scope(column, scope), :parent_record => parent_record, :column => column, :locked => show_blank_record && @record.new_record? && @record == associated.last} %>
10
- <% end -%>
11
- </div>
12
- <%= render :partial => 'form_association_footer', :locals => {:parent_record => parent_record, :column => column, :associated => associated, :scope => scope} -%>
@@ -1,43 +0,0 @@
1
- <%
2
- record_column = column
3
- readonly = (@record.readonly? or not @record.authorized_for?(:crud_type => :update))
4
- crud_type = @record.new_record? ? :create : (readonly ? :read : :update)
5
- show_actions = false
6
- config = active_scaffold_config_for(@record.class)
7
- options = active_scaffold_input_options(config.columns[@record.class.primary_key], scope)
8
- tr_id = "association-#{options[:id]}"
9
- -%>
10
- <ol id="<%= tr_id %>" class="association-record <%= 'association-record-new' if @record.new_record? -%> <%= 'locked' if locked -%>">
11
- <% config.subform.columns.each :for => @record.class, :crud_type => :read, :flatten => true do |column| %>
12
- <%
13
- next unless in_subform?(column, parent_record)
14
- show_actions = true
15
- column = column.clone
16
- column.form_ui ||= :select if column.association
17
-
18
- col_class = ['form-element']
19
- col_class << 'required' if column.required?
20
- col_class << column.css_class unless column.css_class.nil?
21
- col_class << 'hidden' if column_renders_as(column) == :hidden
22
- -%>
23
- <li class="<%= col_class.join(' ') %>">
24
- <% unless readonly and not @record.new_record? or not @record.authorized_for?(:crud_type => crud_type, :column => column.name) -%>
25
- <%= render :partial => form_partial_for_column(column), :locals => { :column => column, :scope => scope } -%>
26
- <% else -%>
27
- <%= content_tag :span, get_column_value(@record, column), active_scaffold_input_options(column, scope).except(:name) -%>
28
- <% end -%>
29
- </li>
30
- <% end -%>
31
- <% if show_actions -%>
32
- <li class="actions">
33
- <% if record_column.plural_association? and (@record.authorized_for?(:crud_type => :delete) or not [:destroy, :delete_all].include?(record_column.association.options[:dependent])) %>
34
- <% destroy_id = "#{options[:id]}-destroy" %>
35
- <%= link_to as_(:remove), '#', :class => 'destroy', :id => destroy_id , :onclick => "ActiveScaffold.delete_subform_record(\"#{tr_id}\"); return false;", :style=> "display: none;" %>
36
- <%= javascript_tag("ActiveScaffold.show('#{destroy_id}');") if !locked %>
37
- <% end %>
38
- <% unless @record.new_record? %>
39
- <input type="hidden" name="<%= options[:name] -%>" id="<%= options[:id] -%>" value="<%= @record.id -%>" />
40
- <% end -%>
41
- </li>
42
- <% end -%>
43
- </ol>
@@ -1,13 +0,0 @@
1
- <div class="active-scaffold">
2
- <div class="delete-view view">
3
- <%= form_tag params_for(:action => link.action, :id => params[:id]), { :method => link.method } %>
4
- <h4><%= link.confirm(record.try(:to_label)) -%></h4>
5
-
6
- <p class="form-footer">
7
- <%= submit_tag as_(link.label), :class => 'submit' %>
8
- <%= link_to as_(:cancel), main_path_to_return, :class => 'cancel' %>
9
- </p>
10
-
11
- </form>
12
- </div>
13
- </div>
@@ -1,14 +0,0 @@
1
- <% new_row = render :partial => 'list_record', :locals => {:record => @record} %>
2
- ActiveScaffold.create_record_row('<%= active_scaffold_id %>', '<%= escape_javascript(new_row) %>', <%= {:insert_at => :top}.to_json.html_safe %>);
3
-
4
- <%= render :partial => 'update_calculations', :formats => [:js] %>
5
-
6
- <% if form_stays_open ||= true %>
7
- <%# why not just re-render the form? that wouldn't utilize a possible do_new override which sets default values.%>
8
- ActiveScaffold.reset_form('<%= element_form_id %>');
9
- ActiveScaffold.replace_html('<%= element_messages_id(:action => :add_existing) %>', '<%= escape_javascript(render(:partial => 'form_messages')) %>');
10
- <%# have to delay the focus, because there's no "firstElement" in prototype until at least one element is not disabled%>
11
- ActiveScaffold.focus_first_element_of_form<%= '.defer' if ActiveScaffold.js_framework == :prototype %>('<%= element_form_id %>');
12
- <% else %>
13
- ActiveScaffold.find_action_link('<%= element_form_id(:action => :new_existing) %>').close();
14
- <% end %>
@@ -1,5 +0,0 @@
1
- <div class="active-scaffold">
2
- <div class="create-view <%= "#{id_from_controller params[:controller]}-view" %> view">
3
- <%= render :partial => 'add_existing_form' -%>
4
- </div>
5
- </div>
@@ -1,5 +0,0 @@
1
- <div class="active-scaffold">
2
- <div class="create-view <%= "#{id_from_controller params[:controller]}-view" %> view">
3
- <%= render :partial => 'create_form' -%>
4
- </div>
5
- </div>
@@ -1,13 +0,0 @@
1
- <div class="active-scaffold">
2
- <div class="delete-view view">
3
- <%= form_tag params_for(:action => :destroy, :id => params[:id]), { :method => :delete } %>
4
- <h4><%= as_(:are_you_sure_to_delete, :label => @record.try(:to_label)) -%></h4>
5
-
6
- <p class="form-footer">
7
- <%= submit_tag as_(:delete), :class => 'submit' %>
8
- <%= link_to as_(:cancel), main_path_to_return, :class => 'cancel' %>
9
- </p>
10
-
11
- </form>
12
- </div>
13
- </div>
@@ -1,26 +0,0 @@
1
- <% messages_id = active_scaffold_messages_id %>
2
- <% if controller.send(:successful?) %>
3
- <% if render_parent? %>
4
- <% if render_parent_action == :row %>
5
- <%# TODO: That s not working with delete.... %>
6
- <% current_id = controller_id(params[:eid] || params[:parent_sti]) -%>
7
- ActiveScaffold.delete_record_row('<%= element_row_id(:controller_id => current_id, :action => 'list', :id => params[:id]) %>', '<%= url_for(params_for(:action => :index, :id => nil, :page => [active_scaffold_config.list.user.page.to_i - 1, 1].max)) %>');
8
- <% messages_id = active_scaffold_messages_id(:controller_id => current_id) %>
9
- <%= render :partial => 'update_calculations', :locals => {:calculations_id => active_scaffold_calculations_id(:controller_id => current_id)}, :formats => [:js] %>
10
- <% elsif render_parent_action == :index %>
11
- <% if controller.respond_to?(:render_component_into_view) %>
12
- <%= escape_javascript(controller.send(:render_component_into_view, render_parent_options)) %>
13
- <% else %>
14
- ActiveScaffold.reload('<%= url_for render_parent_options %>');
15
- <% end %>
16
- <% end %>
17
- <% elsif (active_scaffold_config.delete.refresh_list) %>
18
- <%= render :partial => 'refresh_list' %>
19
- <% else %>
20
- ActiveScaffold.delete_record_row('<%= element_row_id(:action => 'list', :id => params[:id]) %>', '<%= url_for(params_for(:action => :index, :id => nil, :page => [active_scaffold_config.list.user.page.to_i - 1, 1].max)) %>');
21
- <%= render :partial => 'update_calculations', :formats => [:js] %>
22
- <% end %>
23
- <% else %>
24
- <% flash[:error] = active_scaffold_error_messages_for(@record, :object_name => "#{@record.class.model_name.human.downcase}#{@record.new_record? ? '' : ": #{@record.to_label}"}", :header_message => '', :message => "#{@record.class.model_name.human.downcase}#{@record.new_record? ? '' : ": #{@record.to_label}"}", :container_tag => nil, :list_type => :br) %>
25
- <% end %>
26
- <%= render :partial => 'update_messages', :locals => {:messages_id => messages_id} %>