active_scaffold 3.1.20 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. data/app/assets/javascripts/jquery/active_scaffold.js +4 -1
  2. data/app/assets/javascripts/prototype/active_scaffold.js +4 -1
  3. data/app/assets/stylesheets/{active_scaffold.scss~ → active_scaffold.css.scss} +5 -2
  4. data/app/assets/stylesheets/{active_scaffold_colors.scss → active_scaffold_colors.css.scss} +4 -0
  5. data/app/assets/stylesheets/active_scaffold_extensions.css.erb +2 -0
  6. data/app/assets/stylesheets/active_scaffold_images.css.scss +43 -0
  7. data/lib/active_scaffold/actions/core.rb +1 -0
  8. data/lib/active_scaffold/actions/nested.rb +0 -1
  9. data/lib/active_scaffold/extensions/action_view_rendering.rb +1 -1
  10. data/lib/active_scaffold/helpers/form_column_helpers.rb +1 -0
  11. data/lib/active_scaffold/version.rb +2 -2
  12. data/test/mock_app/.gitignore +2 -0
  13. metadata +86 -164
  14. data/app/assets/javascripts/active_scaffold.js.erb~ +0 -16
  15. data/app/assets/javascripts/jquery/active_scaffold.js~ +0 -1053
  16. data/app/assets/javascripts/jquery/draggable_lists.js~ +0 -27
  17. data/app/assets/javascripts/prototype/active_scaffold.js~ +0 -1037
  18. data/app/assets/stylesheets/active_scaffold.css.erb +0 -11
  19. data/app/assets/stylesheets/active_scaffold.css.erb~ +0 -11
  20. data/app/assets/stylesheets/active_scaffold.css.scss.erb~ +0 -1120
  21. data/app/assets/stylesheets/active_scaffold.css.scss~ +0 -11
  22. data/app/assets/stylesheets/active_scaffold.css~ +0 -11
  23. data/app/assets/stylesheets/active_scaffold_colors.css +0 -244
  24. data/app/assets/stylesheets/active_scaffold_colors.css.scss~ +0 -481
  25. data/app/assets/stylesheets/active_scaffold_default.css.erb +0 -47
  26. data/app/assets/stylesheets/active_scaffold_default.css.erb~ +0 -57
  27. data/app/assets/stylesheets/active_scaffold_default.css.scss~ +0 -1092
  28. data/app/assets/stylesheets/active_scaffold_default.css~ +0 -923
  29. data/app/assets/stylesheets/active_scaffold_layout.css~ +0 -922
  30. data/app/assets/stylesheets/blue-theme.css~ +0 -1150
  31. data/config/locales/es.yml~ +0 -120
  32. data/frontends/default/views/_action_group.html.erb~ +0 -24
  33. data/frontends/default/views/_base_form.html.erb~ +0 -42
  34. data/frontends/default/views/_form.html.erb~ +0 -26
  35. data/frontends/default/views/_form_association.html.erb~ +0 -19
  36. data/frontends/default/views/_form_association_footer.html.erb~ +0 -48
  37. data/frontends/default/views/_horizontal_subform.html.erb~ +0 -32
  38. data/frontends/default/views/_horizontal_subform_header.html.erb~ +0 -11
  39. data/frontends/default/views/_horizontal_subform_record.html.erb~ +0 -38
  40. data/frontends/default/views/_list_actions.html.erb~ +0 -15
  41. data/frontends/default/views/_list_inline_adapter.html.erb~ +0 -10
  42. data/frontends/default/views/_list_messages.html.erb~ +0 -30
  43. data/frontends/default/views/_list_pagination.html.erb~ +0 -11
  44. data/frontends/default/views/_list_pagination_links.html.erb~ +0 -0
  45. data/frontends/default/views/_list_with_header.html.erb~ +0 -36
  46. data/frontends/default/views/_render_field.js.erb~ +0 -23
  47. data/frontends/default/views/_row.html.erb~ +0 -6
  48. data/frontends/default/views/_show.html.erb~ +0 -8
  49. data/frontends/default/views/_update_form.html.erb~ +0 -6
  50. data/frontends/default/views/_vertical_subform.html.erb~ +0 -12
  51. data/frontends/default/views/add_existing.js.erb~ +0 -18
  52. data/frontends/default/views/add_existing_form.html.erb~ +0 -5
  53. data/frontends/default/views/create.html.erb~ +0 -5
  54. data/frontends/default/views/edit_associated.js.erb~ +0 -13
  55. data/frontends/default/views/on_create.js.erb~ +0 -45
  56. data/frontends/default/views/on_update.js.erb~ +0 -31
  57. data/frontends/default/views/render_field.js.erb~ +0 -1
  58. data/frontends/default/views/search.html.erb~ +0 -5
  59. data/frontends/default/views/show.html.erb~ +0 -5
  60. data/frontends/default/views/update.html.erb~ +0 -8
  61. data/frontends/default/views/update_column.js.erb~ +0 -16
  62. data/lib/active_scaffold.rb~ +0 -373
  63. data/lib/active_scaffold/actions/core.rb~ +0 -203
  64. data/lib/active_scaffold/actions/create.rb~ +0 -148
  65. data/lib/active_scaffold/actions/list.rb~ +0 -196
  66. data/lib/active_scaffold/actions/nested.rb~ +0 -247
  67. data/lib/active_scaffold/actions/search.rb~ +0 -49
  68. data/lib/active_scaffold/actions/subform.rb~ +0 -27
  69. data/lib/active_scaffold/actions/update.rb~ +0 -150
  70. data/lib/active_scaffold/attribute_params.rb~ +0 -203
  71. data/lib/active_scaffold/bridges/date_picker/helper.rb~ +0 -180
  72. data/lib/active_scaffold/bridges/record_select/helpers.rb~ +0 -86
  73. data/lib/active_scaffold/bridges/shared/date_bridge.rb~ +0 -209
  74. data/lib/active_scaffold/config/base.rb~ +0 -72
  75. data/lib/active_scaffold/config/list.rb~ +0 -195
  76. data/lib/active_scaffold/config/nested.rb~ +0 -41
  77. data/lib/active_scaffold/config/search.rb~ +0 -74
  78. data/lib/active_scaffold/constraints.rb~ +0 -186
  79. data/lib/active_scaffold/data_structures/action_columns.rb~ +0 -140
  80. data/lib/active_scaffold/data_structures/action_link.rb~ +0 -179
  81. data/lib/active_scaffold/data_structures/nested_info.rb~ +0 -147
  82. data/lib/active_scaffold/extensions/action_controller_rendering.rb~ +0 -22
  83. data/lib/active_scaffold/extensions/action_view_rendering.rb~ +0 -120
  84. data/lib/active_scaffold/extensions/active_association_reflection.rb~ +0 -22
  85. data/lib/active_scaffold/extensions/cache_association.rb~ +0 -12
  86. data/lib/active_scaffold/extensions/reverse_associations.rb~ +0 -64
  87. data/lib/active_scaffold/extensions/routing_mapper.rb~ +0 -48
  88. data/lib/active_scaffold/extensions/unsaved_associated.rb~ +0 -62
  89. data/lib/active_scaffold/finder.rb~ +0 -370
  90. data/lib/active_scaffold/helpers/controller_helpers.rb~ +0 -92
  91. data/lib/active_scaffold/helpers/form_column_helpers.rb~ +0 -320
  92. data/lib/active_scaffold/helpers/id_helpers.rb~ +0 -123
  93. data/lib/active_scaffold/helpers/list_column_helpers.rb~ +0 -370
  94. data/lib/active_scaffold/helpers/search_column_helpers.rb~ +0 -263
  95. data/lib/active_scaffold/helpers/view_helpers.rb~ +0 -350
@@ -1,120 +0,0 @@
1
- es:
2
- time:
3
- formats:
4
- picker: "%a, %d %b %Y %H:%M:%S"
5
- active_scaffold:
6
- add: 'Añadir'
7
- add_existing: 'Añadir Existente'
8
- add_existing_model: 'Añadir %{model} Existente'
9
- are_you_sure_to_delete: '¿Estás seguro de que quieres borrar %{label}?'
10
- cancel: 'Cancelar'
11
- click_to_edit: 'Pulsa para editar'
12
- click_to_reset: 'Pulsa para restaurar'
13
- close: 'Cerrar'
14
- config_list: 'Configurar'
15
- config_list_model: 'Configurar columnas de %{model}'
16
- create: 'Crear'
17
- create_model: 'Crear %{model}'
18
- create_another: 'Crear Otro %{model}'
19
- created_model: '%{model} creado'
20
- create_new: 'Crear Nuevo'
21
- customize: 'Personalizar'
22
- delete: 'Borrar'
23
- deleted_model: '%{model} borrado'
24
- delimiter: 'Delimitador'
25
- download: 'Descargar'
26
- edit: 'Editar'
27
- export: 'Exportar'
28
- 'false': 'No'
29
- filtered: '(Filtrado)'
30
- found:
31
- one: 'encontrado'
32
- other: 'encontrados'
33
- hide: 'Ocultar'
34
- live_search: 'Buscar en Vivo'
35
- loading: 'Cargando…'
36
- nested_for_model: '%{nested_model} de %{parent_model}'
37
- nested_of_model: '%{nested_model} de %{parent_model}'
38
- next: 'Siguiente'
39
- no_entries: 'Sin entradas'
40
- no_options: 'sin opciones'
41
- omit_header: 'Omitir Cabecera'
42
- options: 'Opciones'
43
- pdf: 'PDF'
44
- previous: 'Anterior'
45
- print: 'Imprimir'
46
- refresh: 'Recargar'
47
- remove: 'Eliminar'
48
- remove_file: 'Eliminar o Reemplazar archivo'
49
- replace_with_new: 'Reemplazar con Nuevo'
50
- revisions_for_model: 'Revisiones de %{model}'
51
- reset: 'Restaurar'
52
- saving: 'Guardando…'
53
- search: 'Buscar'
54
- search_terms: 'Términos a buscar'
55
- _select_: '- seleccionar -'
56
- show: 'Ver'
57
- show_model: 'Ver %{model}'
58
- _to_ : ' a '
59
- 'true': 'Sí'
60
- update: 'Actualizar'
61
- update_model: 'Actualizar %{model}'
62
- updated_model: '%{model} actualizado'
63
- '=': 'Igual a'
64
- '>=': 'Mayor o igual a'
65
- '<=': 'Menor o igual a'
66
- '>': 'Mayor a'
67
- '<': 'Menor a'
68
- '!=': 'Distinto de'
69
- between: 'Entre'
70
- is_null: 'Es nulo'
71
- is_not_null: 'No es nulo'
72
- contains: 'Contiene'
73
- begins_with: 'Empieza con'
74
- ends_with: 'Termina con'
75
- today: 'Hoy'
76
- yesterday: 'Ayer'
77
- tomorrow: 'Mañana'
78
- this_week: 'Esta semana'
79
- prev_week: 'Semana pasada'
80
- next_week: 'Próxima semana'
81
- this_month: 'Este mes'
82
- prev_month: 'Mes pasado'
83
- next_month: 'Próximo mes'
84
- this_year: 'Este año'
85
- prev_year: 'Año pasado'
86
- next_year: 'Próximo año'
87
- past: 'Pasado'
88
- future: 'Futuro'
89
- range: 'Rango'
90
- seconds: 'Segundos'
91
- minutes: 'Minutos'
92
- hours: 'Horas'
93
- days: 'Días'
94
- weeks: 'Semanas'
95
- months: 'Meses'
96
- years: 'Años'
97
- optional_attributes: 'Más opciones'
98
- null: 'Nulo'
99
- not_null: 'No Nulo'
100
- date_picker_options:
101
- weekHeader: 'Sm'
102
- firstDay: 1
103
- isRTL: false
104
- showMonthAfterYear: false
105
- datetime_picker_options:
106
- timeText: 'Hora'
107
- currentText: 'Ahora'
108
- closeText: 'Cerrar'
109
- errors:
110
- template:
111
- header:
112
- one: "No se pudo guardar debido a un error."
113
- other: "No se pudo guardar debido a %{count} errores."
114
- body: "Hubo problemas con los siguientes campos:"
115
-
116
- # error_messages
117
- cant_destroy_record: "No se pudo borrar %{record}"
118
- internal_error: 'Petición fallida (código 500, error interno)'
119
- version_inconsistency: 'Inconsistencia de versiones - este registro se ha modificado después de que empezó a editarlo.'
120
- no_authorization_for_action: "No dispone de autorización para la acción %{action}"
@@ -1,24 +0,0 @@
1
- <% record ||= nil
2
- start_level_0_tag ||= ''
3
- end_level_0_tag ||= ''%>
4
- <% action_links.traverse(controller, traverse_options) do |parent, link, options| -%>
5
- <% if (options[:node] == :finished_traversing) -%>
6
- <%= "</ul>#{(options[:level] == 0 ? "</div>#{end_level_0_tag}": '</li>')}".html_safe %>
7
- <% elsif (options[:node] == :start_traversing) -%>
8
- <% html_classes = []
9
- html_classes << 'hover_click' if hover_via_click? %>
10
- <% if options[:level] == 0 %>
11
- <% html_classes << 'action_group' %>
12
- <%= "#{start_level_0_tag}<div class=\"#{html_classes.join(' ')}\" #{"onclick=\"\"" if hover_via_click?}> #{content_tag(:div, as_(parent.name), :class => (parent.name.to_s).downcase)}<ul>".html_safe %>
13
- <% else %>
14
- <% html_classes << 'top' if options[:first_action] %>
15
- <%= "<li #{"class=\"#{html_classes.join(' ')}\"" unless html_classes.empty?} #{"onclick=\"\"" if hover_via_click?}>#{content_tag(:div, as_(parent.name), :class => (parent.name.to_s).downcase)}<ul>".html_safe %>
16
- <% end %>
17
- <% else debugger-%>
18
- <% if options[:level] == 0 %>
19
- <%= "#{start_level_0_tag}#{render_group_action_link(link, url_options, options, record)}#{end_level_0_tag}".html_safe %>
20
- <% else %>
21
- <%= content_tag('li', render_group_action_link(link, url_options, options, record), options[:first_action] ? {:class => 'top'}: {}) %>
22
- <% end %>
23
- <% end -%>
24
- <% end -%>
@@ -1,42 +0,0 @@
1
- <% url_options ||= params_for(:action => :update)
2
- xhr = request.xhr?
3
- multipart ||= false
4
- columns ||= nil
5
- %>
6
- <%=
7
- options = {:id => element_form_id(:action => :update),
8
- :multipart => multipart,
9
- :class => "as_form #{form_action.to_s}",
10
- :method => :put,
11
- 'data-loading' => true}
12
-
13
- if xhr && multipart # file_uploads
14
- form_remote_upload_tag url_options.merge({:iframe => true}), options
15
- else
16
- options[:remote] = true if xhr && !multipart
17
- form_tag url_options, options
18
- end
19
- -%>
20
-
21
- <h4><%= Setting.model_name.human(:count => 2) -%></h4>
22
-
23
- <div id="<%= element_messages_id(:action => :update) %>" class="messages-container">
24
- <% if request.xhr? -%>
25
- <% records = @error_records || Array(@record)
26
- records.each do |record| %>
27
- <%= active_scaffold_error_messages_for record, :object_name => "#{record.class.model_name.human.downcase}#{record.new_record? ? '' : ": #{record.to_label}"}" %>
28
- <% end %>
29
- <% else -%>
30
- <%= render :partial => 'form_messages' %>
31
- <% end -%>
32
- </div>
33
-
34
- <%= render :partial => 'form', :locals => { :columns => columns, :form_action => :update } %>
35
-
36
- <p class="form-footer">
37
- <%= submit_tag as_(form_action), :class => "submit" %>
38
- <%= loading_indicator_tag(:action => :update, :id => params[:id]) %>
39
- </p>
40
-
41
- </form>
42
- <%= javascript_tag("ActiveScaffold.focus_first_element_of_form('#{element_form_id(:action => :update)}');") %>
@@ -1,26 +0,0 @@
1
- <% subsection_id ||= nil %>
2
- <% show_unauthorized_columns = active_scaffold_config.send(form_action).show_unauthorized_columns %>
3
- <ol class="form" <%= "id=#{subsection_id}" unless subsection_id.nil? %> <%= "style=\"display: none;\"" if columns.collapsed %>>
4
- <% columns.each :for => @record, :crud_type => (:read if show_unauthorized_columns) do |column| %>
5
- <% authorized = show_unauthorized_columns ? @record.authorized_for?(:crud_type => form_action, :column => column.name) : true %>
6
- <% renders_as = column_renders_as(column) %>
7
- <% if renders_as == :subsection -%>
8
- <% subsection_id = sub_section_id(:sub_section => column.label) %>
9
- <li class="sub-section">
10
- <h5><%= column.label %></h5>
11
- <%= render :partial => 'form', :locals => { :columns => column, :subsection_id => subsection_id, :form_action => form_action } %>
12
- <%= link_to_visibility_toggle(subsection_id, {:default_visible => !column.collapsed}) -%>
13
- </li>
14
- <% elsif column.readonly_association?
15
- next %>
16
- <% elsif renders_as == :subform and !override_form_field?(column) and authorized -%>
17
- <li class="sub-form <%= active_scaffold_config_for(column.association.klass).subform.layout %>-sub-form <%= column.css_class unless column.css_class.nil? || column.css_class.is_a?(Proc) %> <%=column.name%>-sub-form" id="<%= sub_form_id(:association => column.name) %>">
18
- <%=raw render :partial => form_partial_for_column(column, renders_as), :locals => { :column => column } -%>
19
- </li>
20
- <% else -%>
21
- <li class="form-element <%= 'required' if column.required? %> <%= column.css_class unless column.css_class.nil? || column.css_class.is_a?(Proc) %>">
22
- <%=raw render :partial => form_partial_for_column(column, renders_as), :locals => { :column => column, :only_value => !authorized } -%>
23
- </li>
24
- <% end -%>
25
- <% end -%>
26
- </ol>
@@ -1,19 +0,0 @@
1
- <%
2
- parent_record = @record
3
- associated = column.singular_association? ? [parent_record.send(column.name)].compact : parent_record.send(column.name).to_a
4
- associated = associated.sort_by {|r| r.new_record? ? 99999999999 : r.id} unless column.association.options.has_key?(:order)
5
- if show_blank_record = column.show_blank_record?(associated)
6
- associated << if column.singular_association?
7
- parent_record.send("build_#{column.name}".to_sym)
8
- else
9
- parent_record.send(column.name).buildbuild_associated(column, parent_record)
10
- end
11
- end
12
- subform_div_id = "#{sub_form_id({:association => column.name, :id => parent_record.id || 99999999999})}-div"
13
- -%>
14
- <h5><%= column.label -%></h5>
15
- <div id ="<%= subform_div_id %>" <%= 'style="display: none;"'.html_safe if column.collapsed -%>>
16
- <%= render :partial => subform_partial_for_column(column), :locals => {:column => column, :parent_record => parent_record, :associated => associated, :show_blank_record => show_blank_record} %>
17
- </div>
18
- <%= link_to_visibility_toggle(subform_div_id, {:default_visible => !column.collapsed}) -%>
19
- <% @record = parent_record -%>
@@ -1,48 +0,0 @@
1
- <%
2
- debugger
3
- begin
4
- remote_controller = active_scaffold_controller_for(column.association.klass)
5
- rescue ActiveScaffold::ControllerNotFound
6
- remote_controller = nil
7
- end
8
- @record = parent_record
9
-
10
- show_add_existing = column_show_add_existing(column)
11
- show_add_new = column_show_add_new(column, associated, @record)
12
-
13
- return unless show_add_new or show_add_existing
14
-
15
- edit_associated_url = url_for(:action => 'edit_associated', :id => parent_record.id, :association => column.name, :associated_id => '--ID--', :escape => false, :eid => params[:eid], :parent_controller => params[:parent_controller], :parent_id => params[:parent_id]) if show_add_existing
16
- add_new_url = url_for(:action => 'edit_associated', :id => parent_record.id, :association => column.name, :escape => false, :eid => params[:eid], :parent_controller => params[:parent_controller], :parent_id => params[:parent_id]) if show_add_new
17
-
18
- -%>
19
- <div class="footer-wrapper">
20
- <div class="footer">
21
- <% if show_add_new -%>
22
- <% if column.plural_association?
23
- add_label = as_(:create_another, :model => column.association.klass.model_name.human)
24
- add_class = 'as_create_another'
25
- else
26
- add_label = as_(:replace_with_new)
27
- add_class = 'as_replace_with_new'
28
- end
29
- create_another_id = "#{sub_form_id(:association => column.name)}-create-another" %>
30
- <%= link_to add_label, add_new_url, :id => create_another_id, :remote => true, :class => add_class, :style=> "display: none;" %>
31
- <%= javascript_tag("ActiveScaffold.show('#{create_another_id}');") %>
32
- <% end -%>
33
-
34
- <%= '|' if show_add_new and show_add_existing %>
35
-
36
- <% if show_add_existing -%>
37
- <% if remote_controller and remote_controller.respond_to? :uses_record_select? and remote_controller.uses_record_select? -%>
38
- <%= link_to_record_select as_(:add_existing), remote_controller.controller_path, :onselect => "ActiveScaffold.record_select_onselect(#{edit_associated_url.to_json}, #{active_scaffold_id.to_json}, id);" -%>
39
- <% else -%>
40
- <% select_options = options_for_select(options_for_association(column.association))
41
- add_existing_id = "#{sub_form_id(:association => column.name)}-add-existing" %>
42
- <%= select_tag 'associated_id', '<option value="">'.html_safe + as_(:_select_) + '</option>'.html_safe + select_options %>
43
- <%= link_to as_(:add_existing), edit_associated_url, :id => add_existing_id, :remote => true, :class=> column.plural_association? ? 'as_add_existing' : 'as_replace_existing', :style => "display: none;" %>
44
- <%= javascript_tag("ActiveScaffold.show('#{add_existing_id}');") %>
45
- <% end -%>
46
- <% end -%>
47
- </div>
48
- </div>
@@ -1,32 +0,0 @@
1
- <table cellpadding="0" cellspacing="0">
2
- <%
3
- @record = if associated.empty?
4
- if column.singular_association?
5
- parent_record.send("build_#{column.name}".to_sym)
6
- else
7
- parent_record.send(column.name).build
8
- end
9
- else
10
- associated.last
11
- end
12
- -%>
13
- <%= render :partial => 'horizontal_subform_header', :locals => {:parent_record => parent_record, :record => @record} %>
14
-
15
- <tbody id="<%= sub_form_list_id(:association => column.name) %>">
16
- <% associated.each_index do |index| %>
17
- <% @record = associated[index] -%>
18
- <% if @record.errors.count -%>
19
- <tr class="association-record-errors">
20
- <td colspan="<%= active_scaffold_config_for(@record.class).subform.columns.length + 1 %>" id="<%= element_messages_id :action => @record.class.name.underscore, :id => "#{parent_record.id}-#{index}" %>">
21
- <%= active_scaffold_error_messages_for :record, :object_name => @record.class.model_name.human.downcase %>
22
- </td>
23
- </tr>
24
- <% end %>
25
- <%= render :partial => 'horizontal_subform_record', :locals => {:scope => column_scope(column), :parent_record => parent_record, :column => column, :locked => show_blank_record && @record.new_record? && @record == associated.last} %>
26
- <% end -%>
27
- </tbody>
28
- <tfooter>
29
- <%= render :partial => 'horizontal_subform_footer', :locals => {:scope => column_scope(column), :parent_record => parent_record, :column => column} %>
30
- </tfooter>
31
- </table>
32
- <%= render :partial => 'form_association_footer', :locals => {:parent_record => parent_record, :column => column, :associated => associated} -%>
@@ -1,11 +0,0 @@
1
- <thead>
2
- <tr>
3
- <%
4
- active_scaffold_config_for(record.class).subform.columns.each :for => record.class, :flatten => true do |column|
5
- hidden = column_renders_as(column) == :hidden
6
- next unless in_subform?(column, parent_record)
7
- -%>
8
- <th class="<%= "#{'required' if column.required?} #{'hidden' if hidden}" %>"><label><%= column.label unless hidden %></label></th>
9
- <% end -%>
10
- </tr>
11
- </thead>
@@ -1,38 +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
- <tr 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 => crud_type, :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
- <td<%= ' class="hidden"'.html_safe if column_renders_as(column) == :hidden %>>
19
- <% unless readonly and not @record.new_record? or not @record.authorized_for?(:crud_type => crud_type, :column => column.name) -%>
20
- <%= render :partial => form_partial_for_column(column), :locals => { :column => column, :scope => scope } -%>
21
- <% else -%>
22
- <p><%= get_column_value(@record, column) -%></p>
23
- <% end -%>
24
- </td>
25
- <% end -%>
26
- <% if show_actions -%>
27
- <td class="actions">
28
- <% if record_column.plural_association? and (@record.authorized_for?(:crud_type => :delete) or not [:destroy, :delete_all].include?(record_column.association.options[:dependent])) %>
29
- <% destroy_id = "#{options[:id]}-destroy" %>
30
- <%= link_to as_(:remove), '#', :class => 'destroy', :id => destroy_id , :onclick => "ActiveScaffold.delete_subform_record(\"#{tr_id}\"); return false;", :style=> "display: none;" %>
31
- <%= javascript_tag("ActiveScaffold.show('#{destroy_id}');") if !locked %>
32
- <% end %>
33
- <% unless @record.new_record? %>
34
- <input type="hidden" name="<%= options[:name] -%>" id="<%= options[:id] -%>" value="<%= @record.id -%>" />
35
- <% end -%>
36
- </td>
37
- <% end -%>
38
- </tr>
@@ -1,15 +0,0 @@
1
- <td class="actions"><table cellpadding="0" cellspacing="0">
2
- <tr>
3
- <td class="indicator-container">
4
- <%= loading_indicator_tag(:action => :record, :id => record.id) %>
5
- </td>
6
- <%= render :partial => 'action_group', :locals => {:action_links => action_links || active_scaffold_config.action_links.member,
7
- :url_options => url_options,
8
- :record => record,
9
- :traverse_options => {:for => record},
10
- :start_level_0_tag => '<td>',
11
- :end_level_0_tag => '</td>'} %>
12
- </tr>
13
- </table>
14
- </td>
15
-
@@ -1,10 +0,0 @@
1
- <%# nested_id, allows us to remove a nested scaffold programmatically %>
2
- <tr class="inline-adapter" id="<%= element_row_id :action => :nested %>">
3
- <td colspan="99" class="inline-adapter-cell">
4
- <div class="<%= "#{params[:action]}-view" if params[:action] %> <%= "#{params[:association] ? params[:association] : id_from_controller(params[:controller])}-view" %> view">
5
- <%= link_to(as_(:close), '', :class => 'inline-adapter-close as_cancel', :remote => true, :title => as_(:close), 'data-refresh' => (action_name == 'index' ? true : false)) -%>
6
- <%= payload -%>
7
- </div>
8
- </td>
9
- </tr>
10
- <%= 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,30 +0,0 @@
1
- <tbody class="messages">
2
- <tr class="record even-record">
3
- <td colspan="<%= columns.length -%>" class="messages-container">
4
- <p class="error-message message server-error" style="display:none;">
5
- <%= as_(:internal_error).html_safe %>
6
- <a href="#" onclick="ActiveScaffold.hide(this.parentNode); return false;" title="<%= as_(:close).html_safe %>"><%= as_(:close).html_safe %></a>
7
- </p>
8
- <div id="<%= active_scaffold_messages_id -%>">
9
- <%= render :partial => 'messages' %>
10
- </div>
11
- <p class="filtered-message" <%= ' style="display:none;" '.html_safe unless @filtered %>>
12
- <%= @filtered.is_a?(Array) ? render(:partial => 'human_conditions', :locals => {:columns => @filtered}) : as_(active_scaffold_config.list.filtered_message) %>
13
- </p>
14
- <p id="<%= empty_message_id %>" class="empty-message" <%= ' style="display:none;" '.html_safe unless @page.items.empty? %>>
15
- <%= as_(active_scaffold_config.list.no_entries_message) %>
16
- </p>
17
- </td>
18
- <% if active_scaffold_config.list.show_search_reset && @filtered -%>
19
- <% search_link = ActiveScaffold::DataStructures::ActionLink.new('index', :label => :click_to_reset, :type => :member, :position => false)
20
- action_links = ActiveScaffold::DataStructures::ActionLinks.new
21
- action_links.add(search_link) -%>
22
- <%= render :partial => 'list_actions', :locals => {:record => active_scaffold_config.model, :url_options => params_for(:escape => false, :search => ''), :action_links => action_links.member} %>
23
- <% else %>
24
- <td class='actions'><%= '<p class="empty-message">&nbsp;</p>'.html_safe if @page.items.empty? %></td>
25
- <% end -%>
26
-
27
- </tr>
28
- </tbody>
29
-
30
-
@@ -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 true || @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 -%>