active_scaffold 4.2.3 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.rdoc +19 -1
- data/README.md +115 -12
- data/app/assets/javascripts/{jquery → active_scaffold}/active_scaffold.js +759 -762
- data/app/assets/javascripts/{jquery/date_picker_bridge.js.erb → active_scaffold/date_picker_bridge.js} +0 -3
- data/app/assets/javascripts/active_scaffold/load.js +102 -0
- data/app/assets/javascripts/active_scaffold.js.erb +3 -27
- data/app/assets/stylesheets/active_scaffold/_colours.scss +330 -0
- data/app/assets/stylesheets/active_scaffold/_images.scss +65 -0
- data/app/assets/stylesheets/{active_scaffold_layout.scss → active_scaffold/_layout.scss} +14 -0
- data/app/assets/stylesheets/active_scaffold/_variables.scss +194 -0
- data/app/assets/stylesheets/active_scaffold/core.scss +15 -0
- data/app/assets/stylesheets/active_scaffold.scss.erb +16 -0
- data/app/views/active_scaffold_overrides/_field_search_columns.html.erb +8 -0
- data/app/views/active_scaffold_overrides/_form.html.erb +8 -0
- data/app/views/active_scaffold_overrides/_form_association.html.erb +3 -1
- data/app/views/active_scaffold_overrides/_form_association_record.html.erb +4 -2
- data/app/views/active_scaffold_overrides/_new_record.js.erb +2 -2
- data/app/views/active_scaffold_overrides/_refresh_list.js.erb +1 -1
- data/app/views/active_scaffold_overrides/_show_association.html.erb +2 -1
- data/app/views/active_scaffold_overrides/_show_association_horizontal.html.erb +2 -2
- data/app/views/active_scaffold_overrides/_show_association_vertical.html.erb +1 -1
- data/app/views/active_scaffold_overrides/destroy.js.erb +2 -2
- data/app/views/active_scaffold_overrides/edit_associated.js.erb +10 -8
- data/app/views/active_scaffold_overrides/on_update.js.erb +1 -1
- data/config/locales/de.yml +19 -15
- data/config/locales/en.yml +5 -4
- data/config/locales/es.yml +16 -8
- data/config/locales/fr.yml +27 -20
- data/config/locales/hu.yml +35 -31
- data/config/locales/ja.yml +39 -38
- data/config/locales/ru.yml +37 -36
- data/config/locales/ta.yml +165 -0
- data/config/locales/zh_Hans.yml +163 -0
- data/lib/active_scaffold/actions/core.rb +34 -3
- data/lib/active_scaffold/assets/css_deps_generator.rb +42 -0
- data/lib/active_scaffold/assets/jquery_ui_manifest.rb +77 -0
- data/lib/active_scaffold/assets/jquery_ui_theme_generator.rb +102 -0
- data/lib/active_scaffold/assets.rb +109 -0
- data/lib/active_scaffold/attribute_params.rb +11 -2
- data/lib/active_scaffold/bridges/active_storage/form_ui.rb +1 -1
- data/lib/active_scaffold/bridges/carrierwave/form_ui.rb +1 -1
- data/lib/active_scaffold/bridges/chosen.rb +1 -1
- data/lib/active_scaffold/bridges/date_picker/helper.rb +12 -1
- data/lib/active_scaffold/bridges/dragonfly/form_ui.rb +1 -1
- data/lib/active_scaffold/bridges/file_column/form_ui.rb +1 -1
- data/lib/active_scaffold/bridges/paperclip/form_ui.rb +1 -1
- data/lib/active_scaffold/bridges/record_select/helpers.rb +1 -1
- data/lib/active_scaffold/bridges/tiny_mce/helpers.rb +1 -0
- data/lib/active_scaffold/bridges/tiny_mce.rb +6 -1
- data/lib/active_scaffold/bridges.rb +7 -0
- data/lib/active_scaffold/config/core.rb +7 -3
- data/lib/active_scaffold/constraints.rb +1 -1
- data/lib/active_scaffold/data_structures/action_columns.rb +66 -0
- data/lib/active_scaffold/data_structures/bridge.rb +2 -0
- data/lib/active_scaffold/data_structures/column.rb +3 -0
- data/lib/active_scaffold/engine.rb +40 -0
- data/lib/active_scaffold/finder.rb +1 -1
- data/lib/active_scaffold/helpers/assets_helpers.rb +39 -0
- data/lib/active_scaffold/helpers/controller_helpers.rb +1 -1
- data/lib/active_scaffold/helpers/form_column_helpers.rb +57 -532
- data/lib/active_scaffold/helpers/form_ui_helpers.rb +530 -0
- data/lib/active_scaffold/helpers/human_condition_helpers.rb +1 -0
- data/lib/active_scaffold/helpers/list_column_helpers.rb +31 -11
- data/lib/active_scaffold/helpers/search_column_helpers.rb +5 -12
- data/lib/active_scaffold/helpers/show_column_helpers.rb +4 -2
- data/lib/active_scaffold/helpers/view_helpers.rb +12 -0
- data/lib/active_scaffold/railties/tasks.rake +10 -0
- data/lib/active_scaffold/tableless.rb +1 -1
- data/lib/active_scaffold/testing/assert_embedded_load.rb +33 -0
- data/lib/active_scaffold/version.rb +2 -2
- data/lib/active_scaffold.rb +7 -2
- data/lib/tasks/active_scaffold/assets.rake +42 -0
- data/lib/tasks/bundle.rake +25 -0
- data/vendor/assets/stylesheets/{jquery-ui-theme.css.erb → jquery-ui-theme.css} +17 -17
- metadata +28 -28
- data/app/assets/stylesheets/active_scaffold.scss +0 -424
- data/app/assets/stylesheets/active_scaffold_extensions.css.erb +0 -2
- data/app/assets/stylesheets/active_scaffold_images.scss +0 -65
- data/app/assets/stylesheets/active_scaffold_jquery_ui.css.erb +0 -13
- /data/app/assets/javascripts/{jquery → active_scaffold}/active_scaffold_chosen.js +0 -0
- /data/app/assets/javascripts/{jquery → active_scaffold}/draggable_lists.js +0 -0
- /data/app/assets/javascripts/{jquery → active_scaffold}/jquery.editinplace.js +0 -0
- /data/app/assets/javascripts/{jquery → active_scaffold}/tiny_mce_bridge.js +0 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
// ==============================================================
|
|
2
|
+
// ACTIVE SCAFFOLD VARIABLES
|
|
3
|
+
// ==============================================================
|
|
4
|
+
// These are Sass variables for legacy support.
|
|
5
|
+
// CSS variables are defined below and are the recommended way
|
|
6
|
+
// to customize ActiveScaffold going forward.
|
|
7
|
+
// ==============================================================
|
|
8
|
+
|
|
9
|
+
// Base Colors
|
|
10
|
+
$disabled_color: #999 !default;
|
|
11
|
+
$actions_disabled_color: #666 !default;
|
|
12
|
+
$link_color: #06c !default;
|
|
13
|
+
$hover_bg: #ff8 !default;
|
|
14
|
+
$header_color: #555 !default;
|
|
15
|
+
|
|
16
|
+
// Column Headers
|
|
17
|
+
$column_header_bg: $header_color !default;
|
|
18
|
+
$column_header_link_color: #fff !default;
|
|
19
|
+
$column_header_link_hover_bg: #000 !default;
|
|
20
|
+
$column_header_link_hover_color: #ff8 !default;
|
|
21
|
+
$column_header_color: #eee !default;
|
|
22
|
+
$column_header_sorted_bg: #333 !default;
|
|
23
|
+
|
|
24
|
+
// Columns
|
|
25
|
+
$column_bg: #E6F2FF !default;
|
|
26
|
+
$column_even_bg: #fff !default;
|
|
27
|
+
$column_color: #333 !default;
|
|
28
|
+
$column_empty_color: #999 !default;
|
|
29
|
+
$column_border_color: #C5DBF7 !default;
|
|
30
|
+
$column_even_border_color: #ddd !default;
|
|
31
|
+
$column_actions_border_color: #ccc !default;
|
|
32
|
+
$vertical_sub_form_border_color: $column_actions_border_color !default;
|
|
33
|
+
|
|
34
|
+
// Sorted Columns
|
|
35
|
+
$column_sorted_bg: #B9DCFF !default;
|
|
36
|
+
$column_sorted_border_color: #AFD0F5 !default;
|
|
37
|
+
$column_even_sorted_bg: #E6F2FF !default;
|
|
38
|
+
$column_even_sorted_border_color: #AFD0F5 !default;
|
|
39
|
+
|
|
40
|
+
// Calculations
|
|
41
|
+
$calculations_bg: #eee !default;
|
|
42
|
+
$calculations_border_color: #005CB8 !default;
|
|
43
|
+
|
|
44
|
+
// Action Groups
|
|
45
|
+
$action_group_color: #0066CC !default;
|
|
46
|
+
$action_group_hover_bg: #ff8 !default;
|
|
47
|
+
$action_group_border_color: #005CB8 !default;
|
|
48
|
+
$action_group_items_bg: #EEE !default;
|
|
49
|
+
$action_group_items_border_color: #222 !default;
|
|
50
|
+
$action_group_link_color: $column_color !default;
|
|
51
|
+
$active_filter: $link_color !default;
|
|
52
|
+
|
|
53
|
+
// Nested Levels
|
|
54
|
+
$nested_bg: #DAFFCD !default;
|
|
55
|
+
$nested_border_color: #7FCF00 !default;
|
|
56
|
+
$nested_footer_color: #444 !default;
|
|
57
|
+
$nested_column_bg: #ECFFE7 !default;
|
|
58
|
+
$nested_column_even_bg: #fff !default;
|
|
59
|
+
$nested_column_border_color: $column_border_color !default;
|
|
60
|
+
|
|
61
|
+
$second_nested_bg: #FFFFBB !default;
|
|
62
|
+
$second_nested_border_color: #DDDF37 !default;
|
|
63
|
+
|
|
64
|
+
$third_nested_bg: $nested_bg !default;
|
|
65
|
+
$third_nested_border_color: $nested_border_color !default;
|
|
66
|
+
|
|
67
|
+
// Pagination
|
|
68
|
+
$pagination_border_color: #ccc !default;
|
|
69
|
+
|
|
70
|
+
// Messages
|
|
71
|
+
$msg_color: #333 !default;
|
|
72
|
+
$msg_error_bg: #fbb !default;
|
|
73
|
+
$msg_error_border_color: #f66 !default;
|
|
74
|
+
$msg_warning_bg: #ffb !default;
|
|
75
|
+
$msg_warning_border_color: #ff6 !default;
|
|
76
|
+
$msg_info_bg: #bbf !default;
|
|
77
|
+
$msg_info_border_color: #66f !default;
|
|
78
|
+
$msg_filtered_bg: #e8e8e8 !default;
|
|
79
|
+
$msg_filtered_color: #666 !default;
|
|
80
|
+
|
|
81
|
+
// Forms
|
|
82
|
+
$form_title_color: #1F7F00 !default;
|
|
83
|
+
$label_color: $header_color !default;
|
|
84
|
+
$description_color: #999 !default;
|
|
85
|
+
$placeholder_color: #aaa !default;
|
|
86
|
+
$input_border_color: $form_title_color !default;
|
|
87
|
+
$input_error_border_color: #f00 !default;
|
|
88
|
+
$input_focus_bg: #ffc !default;
|
|
89
|
+
|
|
90
|
+
// Draggable Lists
|
|
91
|
+
$draggable_list_bg: #FFFF88 !default;
|
|
92
|
+
$draggable_list_selected_bg: #7FCF00 !default;
|
|
93
|
+
$draggable_list_disabled_bg: $disabled_color !default;
|
|
94
|
+
$checkbox_list_bg: #fff !default;
|
|
95
|
+
|
|
96
|
+
// Subforms
|
|
97
|
+
$subform_color: #999 !default;
|
|
98
|
+
$subform_header_color: $header_color !default;
|
|
99
|
+
$subform_footer_color: $subform_color !default;
|
|
100
|
+
|
|
101
|
+
// ==============================================================
|
|
102
|
+
// CSS VARIABLES (Recommended for customization)
|
|
103
|
+
// ==============================================================
|
|
104
|
+
:root {
|
|
105
|
+
// Base Colors
|
|
106
|
+
--as-disabled-color: #{$disabled_color};
|
|
107
|
+
--as-actions-disabled-color: #{$actions_disabled_color};
|
|
108
|
+
--as-link-color: #{$link_color};
|
|
109
|
+
--as-hover-bg: #{$hover_bg};
|
|
110
|
+
--as-header-color: #{$header_color};
|
|
111
|
+
|
|
112
|
+
// Column Headers
|
|
113
|
+
--as-column-header-bg: #{$column_header_bg};
|
|
114
|
+
--as-column-header-link-color: #{$column_header_link_color};
|
|
115
|
+
--as-column-header-link-hover-bg: #{$column_header_link_hover_bg};
|
|
116
|
+
--as-column-header-link-hover-color: #{$column_header_link_hover_color};
|
|
117
|
+
--as-column-header-color: #{$column_header_color};
|
|
118
|
+
--as-column-header-sorted-bg: #{$column_header_sorted_bg};
|
|
119
|
+
|
|
120
|
+
// Columns
|
|
121
|
+
--as-column-bg: #{$column_bg};
|
|
122
|
+
--as-column-even-bg: #{$column_even_bg};
|
|
123
|
+
--as-column-color: #{$column_color};
|
|
124
|
+
--as-column-empty-color: #{$column_empty_color};
|
|
125
|
+
--as-column-border-color: #{$column_border_color};
|
|
126
|
+
--as-column-even-border-color: #{$column_even_border_color};
|
|
127
|
+
--as-column-actions-border-color: #{$column_actions_border_color};
|
|
128
|
+
|
|
129
|
+
// Sorted Columns
|
|
130
|
+
--as-column-sorted-bg: #{$column_sorted_bg};
|
|
131
|
+
--as-column-sorted-border-color: #{$column_sorted_border_color};
|
|
132
|
+
--as-column-even-sorted-bg: #{$column_even_sorted_bg};
|
|
133
|
+
--as-column-even-sorted-border-color: #{$column_even_sorted_border_color};
|
|
134
|
+
|
|
135
|
+
// Calculations
|
|
136
|
+
--as-calculations-bg: #{$calculations_bg};
|
|
137
|
+
--as-calculations-border-color: #{$calculations_border_color};
|
|
138
|
+
|
|
139
|
+
// Action Groups
|
|
140
|
+
--as-action-group-color: #{$action_group_color};
|
|
141
|
+
--as-action-group-hover-bg: #{$action_group_hover_bg};
|
|
142
|
+
--as-action-group-border-color: #{$action_group_border_color};
|
|
143
|
+
--as-action-group-items-bg: #{$action_group_items_bg};
|
|
144
|
+
--as-action-group-items-border-color: #{$action_group_items_border_color};
|
|
145
|
+
--as-action-group-link-color: #{$action_group_link_color};
|
|
146
|
+
--as-active-filter: #{$active_filter};
|
|
147
|
+
|
|
148
|
+
// Nested Levels
|
|
149
|
+
--as-nested-bg: #{$nested_bg};
|
|
150
|
+
--as-nested-border-color: #{$nested_border_color};
|
|
151
|
+
--as-nested-footer-color: #{$nested_footer_color};
|
|
152
|
+
--as-nested-column-bg: #{$nested_column_bg};
|
|
153
|
+
--as-nested-column-even-bg: #{$nested_column_even_bg};
|
|
154
|
+
--as-nested-column-border-color: #{$nested_column_border_color};
|
|
155
|
+
--as-second-nested-bg: #{$second_nested_bg};
|
|
156
|
+
--as-second-nested-border-color: #{$second_nested_border_color};
|
|
157
|
+
--as-third-nested-bg: #{$third_nested_bg};
|
|
158
|
+
--as-third-nested-border-color: #{$third_nested_border_color};
|
|
159
|
+
|
|
160
|
+
// Pagination
|
|
161
|
+
--as-pagination-border-color: #{$pagination_border_color};
|
|
162
|
+
|
|
163
|
+
// Messages
|
|
164
|
+
--as-msg-color: #{$msg_color};
|
|
165
|
+
--as-msg-error-bg: #{$msg_error_bg};
|
|
166
|
+
--as-msg-error-border-color: #{$msg_error_border_color};
|
|
167
|
+
--as-msg-warning-bg: #{$msg_warning_bg};
|
|
168
|
+
--as-msg-warning-border-color: #{$msg_warning_border_color};
|
|
169
|
+
--as-msg-info-bg: #{$msg_info_bg};
|
|
170
|
+
--as-msg-info-border-color: #{$msg_info_border_color};
|
|
171
|
+
--as-msg-filtered-bg: #{$msg_filtered_bg};
|
|
172
|
+
--as-msg-filtered-color: #{$msg_filtered_color};
|
|
173
|
+
|
|
174
|
+
// Forms
|
|
175
|
+
--as-form-title-color: #{$form_title_color};
|
|
176
|
+
--as-label-color: #{$label_color};
|
|
177
|
+
--as-description-color: #{$description_color};
|
|
178
|
+
--as-placeholder-color: #{$placeholder_color};
|
|
179
|
+
--as-input-border-color: #{$input_border_color};
|
|
180
|
+
--as-input-error-border-color: #{$input_error_border_color};
|
|
181
|
+
--as-input-focus-bg: #{$input_focus_bg};
|
|
182
|
+
|
|
183
|
+
// Draggable Lists
|
|
184
|
+
--as-draggable-list-bg: #{$draggable_list_bg};
|
|
185
|
+
--as-draggable-list-selected-bg: #{$draggable_list_selected_bg};
|
|
186
|
+
--as-draggable-list-disabled-bg: #{$draggable_list_disabled_bg};
|
|
187
|
+
--as-checkbox-list-bg: #{$checkbox_list_bg};
|
|
188
|
+
|
|
189
|
+
// Subforms
|
|
190
|
+
--as-subform-color: #{$subform_color};
|
|
191
|
+
--as-subform-header-color: #{$subform_header_color};
|
|
192
|
+
--as-subform-footer-color: #{$subform_footer_color};
|
|
193
|
+
--as-vertical-sub-form-border-color: #{$vertical_sub_form_border_color};
|
|
194
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
ActiveScaffold
|
|
3
|
+
(c) 2007 Richard White <rrwhite@gmail.com>
|
|
4
|
+
|
|
5
|
+
ActiveScaffold is freely distributable under the terms of an MIT-style license.
|
|
6
|
+
|
|
7
|
+
For details, see the ActiveScaffold web site: https://github.com/activescaffold/active_scaffold
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
@forward 'variables';
|
|
11
|
+
@use 'layout';
|
|
12
|
+
@use 'images';
|
|
13
|
+
@use 'colours';
|
|
14
|
+
@use 'active_scaffold/deps';
|
|
15
|
+
.ui-front { z-index: 98; }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
ActiveScaffold
|
|
3
|
+
(c) 2007 Richard White <rrwhite@gmail.com>
|
|
4
|
+
|
|
5
|
+
ActiveScaffold is freely distributable under the terms of an MIT-style license.
|
|
6
|
+
|
|
7
|
+
For details, see the ActiveScaffold web site: https://github.com/activescaffold/active_scaffold
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
@use 'active_scaffold/layout';
|
|
11
|
+
@use 'active_scaffold/images';
|
|
12
|
+
@use 'active_scaffold/colours';
|
|
13
|
+
|
|
14
|
+
<%= File.read(File.join(ActiveScaffold.root, 'app/assets/stylesheets/active_scaffold/_variables.scss')) %>
|
|
15
|
+
<% ActiveScaffold::Assets.active_scaffold_stylesheets(:deps).each { |asset| require_asset asset } %>
|
|
16
|
+
.ui-front { z-index: 98; }
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
<% if columns.layout == :multiple -%>
|
|
2
|
+
<div class="form-columns"<%= " id=#{subsection_id}" if local_assigns.key? :subsection_id %><%= ' style="display: none;"'.html_safe if columns.collapsed %>>
|
|
3
|
+
<% columns.each do |group| %>
|
|
4
|
+
<%= render 'field_search_columns', local_assigns.merge(columns: group, subsection_id: nil) %>
|
|
5
|
+
<% end %>
|
|
6
|
+
</div>
|
|
7
|
+
<% else -%>
|
|
1
8
|
<ol class="form" <%= "id=#{subsection_id}" unless local_assigns[:subsection_id].nil? %> <%= 'style="display: none;"'.html_safe if columns.collapsed %>>
|
|
2
9
|
<% visibles, hiddens = visibles_and_hiddens(active_scaffold_config.field_search, columns) %>
|
|
3
10
|
<% visibles.each do |column| -%>
|
|
@@ -30,3 +37,4 @@
|
|
|
30
37
|
</li>
|
|
31
38
|
<% end -%>
|
|
32
39
|
</ol>
|
|
40
|
+
<% end -%>
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
<% if columns.layout == :multiple %>
|
|
2
|
+
<div class="form-columns"<%= " id=#{subsection_id}" if local_assigns.key? :subsection_id %><%= ' style="display: none;"'.html_safe if columns.collapsed %>>
|
|
3
|
+
<% columns.each do |group| %>
|
|
4
|
+
<%= render 'form', local_assigns.merge(columns: group, subsection_id: nil) %>
|
|
5
|
+
<% end %>
|
|
6
|
+
</div>
|
|
7
|
+
<% else %>
|
|
1
8
|
<%
|
|
2
9
|
scope ||= nil
|
|
3
10
|
subsection_id ||= nil
|
|
@@ -37,3 +44,4 @@
|
|
|
37
44
|
<% end -%>
|
|
38
45
|
<% end -%>
|
|
39
46
|
</ol>
|
|
47
|
+
<% end %>
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
parent_record: parent_record, column: column, associated: associated, scope: scope, subform_div_id: subform_div_id,
|
|
20
20
|
tabbed_by: tabbed_by, tab_value: tab_value
|
|
21
21
|
})
|
|
22
|
+
columns = (column.form_ui_options || column.options)[:subform_columns]
|
|
23
|
+
columns = active_scaffold_config_for(column.association.klass).subform.build_action_columns(columns) if columns
|
|
22
24
|
-%>
|
|
23
25
|
<h5>
|
|
24
26
|
<%= column.label -%>
|
|
@@ -28,7 +30,7 @@
|
|
|
28
30
|
<div id ="<%= subform_div_id %>" <%= 'style="display: none;"'.html_safe if column.collapsed -%>>
|
|
29
31
|
<%# HACK: to be able to delete all associated records %>
|
|
30
32
|
<%= hidden_field_tag "#{(opts = active_scaffold_input_options(column, scope, object: parent_record))[:name]}[0]", '', id: "#{opts[:id]}_0" if column.association.collection? %>
|
|
31
|
-
<%= render subform_partial_for_column(column), column: column, parent_record: parent_record, associated: associated, show_blank_record: show_blank_record, scope: scope, tab_id: tab_id %>
|
|
33
|
+
<%= render subform_partial_for_column(column), column: column, parent_record: parent_record, columns: columns, associated: associated, show_blank_record: show_blank_record, scope: scope, tab_id: tab_id %>
|
|
32
34
|
<%= footer -%>
|
|
33
35
|
</div>
|
|
34
36
|
<%
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
<%
|
|
2
2
|
record_column = column
|
|
3
|
+
ui_options = record_column.form_ui_options || record_column.options
|
|
3
4
|
readonly = record.readonly? || !record.authorized_for?(crud_type: :update)
|
|
4
5
|
crud_type = record.new_record? ? :create : (readonly ? :read : :update)
|
|
5
6
|
show_actions = false
|
|
6
7
|
locked ||= false
|
|
7
8
|
config = active_scaffold_config_for(record.class)
|
|
8
9
|
columns ||= config.subform.columns
|
|
10
|
+
column_names = columns.visible_columns_names
|
|
9
11
|
scope = column_scope(record_column, scope, record)
|
|
10
12
|
options = active_scaffold_input_options(config.columns[record.class.primary_key], scope, object: record)
|
|
11
13
|
tr_id = "association-#{options[:id]}"
|
|
12
|
-
layout ||=
|
|
14
|
+
layout ||= ui_options[:layout] || config.subform.layout
|
|
13
15
|
|
|
14
16
|
if layout == :vertical
|
|
15
17
|
record_tag ||= :div
|
|
@@ -58,7 +60,7 @@
|
|
|
58
60
|
col_class << 'hidden' if column_renders_as(column) == :hidden
|
|
59
61
|
-%>
|
|
60
62
|
<%= content_tag column_tag, class: col_class.join(' ') do %>
|
|
61
|
-
<%= active_scaffold_render_subform_column(column, scope, crud_type, readonly, false, record) %>
|
|
63
|
+
<%= active_scaffold_render_subform_column(column, scope, crud_type, readonly, false, record, form_columns: column_names) %>
|
|
62
64
|
<% end %>
|
|
63
65
|
<% end -%>
|
|
64
66
|
<% if show_actions -%>
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
<% if nested_singular_association? %>
|
|
3
3
|
if (action_link) action_link.close(true);
|
|
4
4
|
<% elsif params[:parent_sti] && render_parent_action == :row %>
|
|
5
|
-
ActiveScaffold.create_record_row_from_url(action_link, '<%= url_for(render_parent_options) %>', <%= {insert_at: insert_at}.to_json.html_safe %>);
|
|
5
|
+
ActiveScaffold.create_record_row_from_url(action_link, '<%=raw url_for(render_parent_options) %>', <%= {insert_at: insert_at}.to_json.html_safe %>);
|
|
6
6
|
<% else %>
|
|
7
|
-
ActiveScaffold.reload('<%= url_for render_parent_options %>');
|
|
7
|
+
ActiveScaffold.reload('<%=raw url_for render_parent_options %>');
|
|
8
8
|
<% end %>
|
|
9
9
|
<% elsif active_scaffold_config.create.refresh_list %>
|
|
10
10
|
<%= render 'refresh_list', no_history: true %>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
ActiveScaffold.append('<%= active_scaffold_tbody_id %>', '<%= escape_javascript(render(partial: list_record_view, collection: @page.items, locals: {hidden: false, columns: list_columns, action_links: active_scaffold_config.action_links.member})) %>');
|
|
4
4
|
|
|
5
5
|
<% if @page.pager.infinite? || @page.number < @page.pager.number_of_pages -%>
|
|
6
|
-
ActiveScaffold.auto_load_page('<%= url_for main_path_to_return %>', {auto_pagination: true, page: <%= @page.number + 1 %>});
|
|
6
|
+
ActiveScaffold.auto_load_page('<%=raw url_for main_path_to_return %>', {auto_pagination: true, page: <%= @page.number + 1 %>});
|
|
7
7
|
<% else %>
|
|
8
8
|
ActiveScaffold.hide('<%= loading_indicator_id(action: :pagination) %>');
|
|
9
9
|
<% end # @page.pager.infinite?... %>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<% columns = active_scaffold_config_for(column.association.klass).show.build_action_columns(columns) if local_assigns[:columns].is_a?(Array) %>
|
|
1
2
|
<% associated = column.association.singular? ? [parent_record.send(column.name)].compact : parent_record.send(column.name).to_a -%>
|
|
2
3
|
<% associated = associated.select { |record| record.send(tabbed_by) == tab_value } if local_assigns[:tabbed_by] %>
|
|
3
|
-
<%= render "show_association_#{show_partial}", column: column, parent_record: parent_record, associated: associated if associated.present? %>
|
|
4
|
+
<%= render "show_association_#{show_partial}", columns: columns, column: column, parent_record: parent_record, associated: associated if associated.present? %>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<%
|
|
2
2
|
columns_hash = {}
|
|
3
|
-
heading_columns = show_columns_for(associated.first, column, columns_hash)
|
|
3
|
+
heading_columns = columns || show_columns_for(associated.first, column, columns_hash)
|
|
4
4
|
%>
|
|
5
5
|
<table>
|
|
6
6
|
<thead>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</thead>
|
|
13
13
|
<tbody>
|
|
14
14
|
<% associated.each do |record| -%>
|
|
15
|
-
<%= render 'show_horizontal_record', record: record, parent_record: parent_record, columns: show_columns_for(associated.first, column, columns_hash) %>
|
|
15
|
+
<%= render 'show_horizontal_record', record: record, parent_record: parent_record, columns: columns || show_columns_for(associated.first, column, columns_hash) %>
|
|
16
16
|
<% end -%>
|
|
17
17
|
</tbody>
|
|
18
18
|
</table>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<% columns_hash = {} -%>
|
|
2
2
|
<% associated.each do |record| -%>
|
|
3
|
-
<%= render 'show_columns', columns: show_columns_for(record, column, columns_hash), record: record %>
|
|
3
|
+
<%= render 'show_columns', columns: columns || show_columns_for(record, column, columns_hash), record: record %>
|
|
4
4
|
<% end -%>
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
<% if render_parent? %>
|
|
4
4
|
<% if render_parent_action == :row %>
|
|
5
5
|
<% current_id = controller_id(params[:eid] || params[:parent_sti]) -%>
|
|
6
|
-
ActiveScaffold.delete_record_row('<%= element_row_id(controller_id: current_id, action: 'list', id: params[:id]) %>', '<%= url_for params_for(render_parent_options.merge(id: nil, page: [active_scaffold_config.list.user.page.to_i - 1, 1].max)) %>');
|
|
6
|
+
ActiveScaffold.delete_record_row('<%= element_row_id(controller_id: current_id, action: 'list', id: params[:id]) %>', '<%=raw url_for params_for(render_parent_options.merge(id: nil, page: [active_scaffold_config.list.user.page.to_i - 1, 1].max)) %>');
|
|
7
7
|
<% messages_id = active_scaffold_messages_id(controller_id: current_id) %>
|
|
8
8
|
<%= render 'update_calculations', calculations_id: active_scaffold_calculations_id(controller_id: current_id) %>
|
|
9
9
|
<% elsif render_parent_action == :index %>
|
|
10
10
|
<% if controller.respond_to?(:render_component_into_view, true) %>
|
|
11
11
|
<%= escape_javascript(controller.send(:render_component_into_view, render_parent_options)) %>
|
|
12
12
|
<% else %>
|
|
13
|
-
ActiveScaffold.reload('<%= url_for render_parent_options %>');
|
|
13
|
+
ActiveScaffold.reload('<%=raw url_for render_parent_options %>');
|
|
14
14
|
<% end %>
|
|
15
15
|
<% end %>
|
|
16
16
|
<% elsif active_scaffold_config.delete.refresh_list %>
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
<%
|
|
2
|
+
columns = (@column.form_ui_options || @column.options)[:subform_columns]
|
|
3
|
+
columns = active_scaffold_config_for(@column.association.klass).subform.build_action_columns(columns) if columns
|
|
2
4
|
subform_id = sub_form_list_id(association: @column.name, tab_id: @tab_id, id: @parent_record.id || generated_id(@parent_record) || 99_999_999_999)
|
|
3
|
-
associated_form = render 'form_association_record', scope: @scope, parent_record: @parent_record,
|
|
5
|
+
associated_form = render 'form_association_record', columns: columns, scope: @scope, parent_record: @parent_record,
|
|
6
|
+
column: @column, record: @record, locked: @record.new_record? && @column.association.singular?
|
|
4
7
|
options = {singular: false}
|
|
5
8
|
if @column.association.singular?
|
|
6
9
|
options[:singular] = true
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
ActiveScaffold.create_associated_record_form('<%= subform_id %>','<%=escape_javascript(associated_form)%>', <%= options.to_json.html_safe %>);
|
|
10
|
+
elsif @record.persisted?
|
|
11
|
+
column = active_scaffold_config_for(@record.class).columns[@record.class.primary_key]
|
|
12
|
+
options[:id] = active_scaffold_input_options(column, column_scope(@column, @scope, @record))[:id]
|
|
13
|
+
end
|
|
14
|
+
%>
|
|
15
|
+
ActiveScaffold.create_associated_record_form('<%= subform_id %>', '<%= escape_javascript(associated_form) %>', <%= options.to_json.html_safe %>);
|
|
@@ -16,7 +16,7 @@ if (action_link) action_link.update_flash_messages('<%= escape_javascript(render
|
|
|
16
16
|
<% if nested_singular_association? || render_parent_action == :row %>
|
|
17
17
|
if (action_link) action_link.close(true);
|
|
18
18
|
<% else %>
|
|
19
|
-
ActiveScaffold.reload('<%= url_for render_parent_options %>');
|
|
19
|
+
ActiveScaffold.reload('<%=raw url_for render_parent_options %>');
|
|
20
20
|
<% end %>
|
|
21
21
|
<% elsif update_refresh_list? %>
|
|
22
22
|
<%= render 'refresh_list', no_history: true %>
|
data/config/locales/de.yml
CHANGED
|
@@ -12,8 +12,8 @@ de:
|
|
|
12
12
|
add_existing: Existierenden Eintrag hinzufügen
|
|
13
13
|
add_existing_model: Existierende %{model} hinzufügen
|
|
14
14
|
add_model: "%{model} hinzufügen"
|
|
15
|
-
all_tokens:
|
|
16
|
-
any_token:
|
|
15
|
+
all_tokens: All keywords
|
|
16
|
+
any_token: Any keyword
|
|
17
17
|
apply: Akzeptieren
|
|
18
18
|
are_you_sure_to_delete: Sind Sie sicher?
|
|
19
19
|
average: Durchschnitt
|
|
@@ -22,7 +22,7 @@ de:
|
|
|
22
22
|
cancel: Abbrechen
|
|
23
23
|
cant_destroy_record: "%{record} kann nicht gelöscht werden"
|
|
24
24
|
changes: Änderungen
|
|
25
|
-
check_all:
|
|
25
|
+
check_all: Check all
|
|
26
26
|
click_to_edit: Zum Editieren anklicken
|
|
27
27
|
click_to_reset: Reset
|
|
28
28
|
close: Schließen
|
|
@@ -37,9 +37,9 @@ de:
|
|
|
37
37
|
created_model: "%{model} angelegt"
|
|
38
38
|
customize: Anpassen
|
|
39
39
|
date_picker_options:
|
|
40
|
-
firstDay: 1
|
|
41
|
-
isRTL: false
|
|
42
|
-
showMonthAfterYear: false
|
|
40
|
+
firstDay: '1'
|
|
41
|
+
isRTL: 'false'
|
|
42
|
+
showMonthAfterYear: 'false'
|
|
43
43
|
weekHeader: Wo
|
|
44
44
|
datetime_picker_options:
|
|
45
45
|
closeText: Schließen
|
|
@@ -51,9 +51,9 @@ de:
|
|
|
51
51
|
deleted_model: "%{model} gelöscht"
|
|
52
52
|
deleted_records: Gelöschte Records auflisten
|
|
53
53
|
delimiter: Trennzeichen
|
|
54
|
-
doesnt_begin_with:
|
|
55
|
-
doesnt_contain:
|
|
56
|
-
doesnt_end_with:
|
|
54
|
+
doesnt_begin_with: Doesn't begin with
|
|
55
|
+
doesnt_contain: Doesn't contain
|
|
56
|
+
doesnt_end_with: Doesn't end with
|
|
57
57
|
download: Herunterladen
|
|
58
58
|
edit: Bearbeiten
|
|
59
59
|
ends_with: Endet
|
|
@@ -80,7 +80,7 @@ de:
|
|
|
80
80
|
internal_error: Fehler bei der Verarbeitung
|
|
81
81
|
live_search: Live-Suche
|
|
82
82
|
loading: Lade…
|
|
83
|
-
logical_search:
|
|
83
|
+
logical_search: Logical Search
|
|
84
84
|
mark_all_records: Alle auswählen
|
|
85
85
|
maximum: Maximum
|
|
86
86
|
minimum: Minimum
|
|
@@ -136,12 +136,13 @@ de:
|
|
|
136
136
|
today: Heute
|
|
137
137
|
tomorrow: Morgen
|
|
138
138
|
'true': Richtig
|
|
139
|
-
uncheck_all:
|
|
139
|
+
uncheck_all: Uncheck all
|
|
140
140
|
update: Speichern
|
|
141
141
|
update_apply: Bewerben
|
|
142
142
|
update_model: Editiere %{model}
|
|
143
143
|
updated_model: "%{model} aktualisiert"
|
|
144
|
-
version_inconsistency: Inkonsistente Versionen - dieser Eintrag wurde
|
|
144
|
+
version_inconsistency: Inkonsistente Versionen - dieser Eintrag wurde
|
|
145
|
+
verändert nachdem Sie mit der Bearbeitung begonnen haben.
|
|
145
146
|
weeks: Wochen
|
|
146
147
|
years: Jahre
|
|
147
148
|
yesterday: Gestern
|
|
@@ -149,7 +150,7 @@ de:
|
|
|
149
150
|
formats:
|
|
150
151
|
month: "%B"
|
|
151
152
|
quarter: Quartal %{num}
|
|
152
|
-
week:
|
|
153
|
+
week: Week %W, %Y
|
|
153
154
|
year_month: "%b %Y"
|
|
154
155
|
year_quarter: Quartal %{quarter} %{year}
|
|
155
156
|
time:
|
|
@@ -157,6 +158,9 @@ de:
|
|
|
157
158
|
picker: "%d.%m.%Y %H:%M"
|
|
158
159
|
datetime:
|
|
159
160
|
prompts:
|
|
160
|
-
millisec:
|
|
161
|
-
microsec:
|
|
161
|
+
millisec: Millisecond
|
|
162
|
+
microsec: Microsecond
|
|
163
|
+
second: Second
|
|
164
|
+
minute: Minute
|
|
165
|
+
hour: Hour
|
|
162
166
|
|
data/config/locales/en.yml
CHANGED
|
@@ -37,9 +37,9 @@ en:
|
|
|
37
37
|
created_model: Created %{model}
|
|
38
38
|
customize: Customize
|
|
39
39
|
date_picker_options:
|
|
40
|
-
firstDay: 0
|
|
41
|
-
isRTL: false
|
|
42
|
-
showMonthAfterYear: false
|
|
40
|
+
firstDay: '0'
|
|
41
|
+
isRTL: 'false'
|
|
42
|
+
showMonthAfterYear: 'false'
|
|
43
43
|
weekHeader: Wk
|
|
44
44
|
datetime_picker_options:
|
|
45
45
|
closeText: Close
|
|
@@ -141,7 +141,8 @@ en:
|
|
|
141
141
|
update_apply: Apply
|
|
142
142
|
update_model: Update %{model}
|
|
143
143
|
updated_model: Updated %{model}
|
|
144
|
-
version_inconsistency: Version inconsistency - this record has been modified
|
|
144
|
+
version_inconsistency: Version inconsistency - this record has been modified
|
|
145
|
+
since you started editing it.
|
|
145
146
|
weeks: Weeks
|
|
146
147
|
years: Years
|
|
147
148
|
yesterday: Yesterday
|
data/config/locales/es.yml
CHANGED
|
@@ -12,8 +12,8 @@ es:
|
|
|
12
12
|
add_existing: Añadir Existente
|
|
13
13
|
add_existing_model: Añadir %{model} Existente
|
|
14
14
|
add_model: Añadir %{model}
|
|
15
|
-
all_tokens:
|
|
16
|
-
any_token:
|
|
15
|
+
all_tokens: Todas las palabras
|
|
16
|
+
any_token: Cualquier palabra
|
|
17
17
|
apply: Aplicar
|
|
18
18
|
are_you_sure_to_delete: "¿Estás seguro de que quieres borrar %{label}?"
|
|
19
19
|
average: Media
|
|
@@ -37,9 +37,9 @@ es:
|
|
|
37
37
|
created_model: "%{model} creado"
|
|
38
38
|
customize: Personalizar
|
|
39
39
|
date_picker_options:
|
|
40
|
-
firstDay: 1
|
|
41
|
-
isRTL: false
|
|
42
|
-
showMonthAfterYear: false
|
|
40
|
+
firstDay: '1'
|
|
41
|
+
isRTL: 'false'
|
|
42
|
+
showMonthAfterYear: 'false'
|
|
43
43
|
weekHeader: Sm
|
|
44
44
|
datetime_picker_options:
|
|
45
45
|
closeText: Cerrar
|
|
@@ -63,12 +63,14 @@ es:
|
|
|
63
63
|
body: 'Hubo problemas con los siguientes campos:'
|
|
64
64
|
header:
|
|
65
65
|
one: No se pudo guardar %{model} debido a un error.
|
|
66
|
+
many: No se pudo guardar %{model} debido a %{count} errores.
|
|
66
67
|
other: No se pudo guardar %{model} debido a %{count} errores.
|
|
67
68
|
export: Exportar
|
|
68
69
|
'false': 'No'
|
|
69
70
|
filtered: "(Filtrado)"
|
|
70
71
|
found:
|
|
71
72
|
one: encontrado
|
|
73
|
+
many: encontrados
|
|
72
74
|
other: encontrados
|
|
73
75
|
future: Futuro
|
|
74
76
|
group_by: Agrupar por
|
|
@@ -94,7 +96,8 @@ es:
|
|
|
94
96
|
next_month: Próximo mes
|
|
95
97
|
next_week: Próxima semana
|
|
96
98
|
next_year: Próximo año
|
|
97
|
-
no_authorization_for_action: No dispone de autorización para la acción
|
|
99
|
+
no_authorization_for_action: No dispone de autorización para la acción
|
|
100
|
+
%{action}
|
|
98
101
|
no_color: Sin color
|
|
99
102
|
no_entries: Sin entradas
|
|
100
103
|
no_group: No agrupar
|
|
@@ -115,7 +118,8 @@ es:
|
|
|
115
118
|
record_not_saved: Fallo guardando el registro debido a un error desconocido
|
|
116
119
|
records_marked:
|
|
117
120
|
one: 1 %{model} seleccionado
|
|
118
|
-
|
|
121
|
+
many: '%{count} %{model} seleccionados'
|
|
122
|
+
other: '%{count} %{model} seleccionados'
|
|
119
123
|
refresh: Recargar
|
|
120
124
|
remove: Eliminar
|
|
121
125
|
remove_file: Eliminar o Reemplazar archivo
|
|
@@ -143,7 +147,8 @@ es:
|
|
|
143
147
|
update_apply: Aplicar
|
|
144
148
|
update_model: Actualizar %{model}
|
|
145
149
|
updated_model: "%{model} actualizado"
|
|
146
|
-
version_inconsistency: Inconsistencia de versiones - este registro se ha
|
|
150
|
+
version_inconsistency: Inconsistencia de versiones - este registro se ha
|
|
151
|
+
modificado después de que empezó a editarlo.
|
|
147
152
|
weeks: Semanas
|
|
148
153
|
years: Años
|
|
149
154
|
yesterday: Ayer
|
|
@@ -161,3 +166,6 @@ es:
|
|
|
161
166
|
prompts:
|
|
162
167
|
millisec: Milisegundo
|
|
163
168
|
microsec: Microsegundo
|
|
169
|
+
hour: Hora
|
|
170
|
+
minute: Minuto
|
|
171
|
+
second: Segundo
|