active_scaffold 3.0.12 → 3.0.21
Sign up to get free protection for your applications and to get access to all the features.
- data/README +21 -11
- data/frontends/default/images/close_touch.png +0 -0
- data/frontends/default/javascripts/jquery/active_scaffold.js +187 -99
- data/frontends/default/javascripts/prototype/active_scaffold.js +105 -33
- data/frontends/default/javascripts/prototype/dhtml_history.js +80 -77
- data/frontends/default/stylesheets/stylesheet.css +121 -2
- data/frontends/default/views/_action_group.html.erb +6 -2
- data/frontends/default/views/_base_form.html.erb +11 -5
- data/frontends/default/views/_base_form.html.erb~ +42 -0
- data/frontends/default/views/_field_search.html.erb +1 -1
- data/frontends/default/views/_form.html.erb +9 -7
- data/frontends/default/views/_form_association.html.erb +8 -3
- data/frontends/default/views/_form_association_footer.html.erb +10 -3
- data/frontends/default/views/_form_attribute.html.erb +8 -3
- data/frontends/default/views/_horizontal_subform.html.erb +12 -2
- data/frontends/default/views/_horizontal_subform_header.html.erb +1 -1
- data/frontends/default/views/_horizontal_subform_record.html.erb +5 -4
- data/frontends/default/views/_list_messages.html.erb +1 -1
- data/frontends/default/views/_list_with_header.html.erb +1 -1
- data/frontends/default/views/_render_field.js.rjs +4 -6
- data/frontends/default/views/_vertical_subform.html.erb +1 -1
- data/frontends/default/views/_vertical_subform_record.html.erb +2 -2
- data/frontends/default/views/on_action_update.js.rjs +3 -1
- data/frontends/default/views/on_mark_all.js.rjs +12 -0
- data/frontends/default/views/on_update.js.rjs +1 -1
- data/frontends/default/views/render_field.js.rjs +1 -0
- data/frontends/default/views/update_column.js.rjs +1 -1
- data/lib/active_scaffold.rb +60 -21
- data/lib/active_scaffold/actions/common_search.rb +2 -2
- data/lib/active_scaffold/actions/core.rb +30 -9
- data/lib/active_scaffold/actions/create.rb +14 -10
- data/lib/active_scaffold/actions/field_search.rb +6 -6
- data/lib/active_scaffold/actions/list.rb +22 -12
- data/lib/active_scaffold/actions/mark.rb +34 -9
- data/lib/active_scaffold/actions/nested.rb +12 -16
- data/lib/active_scaffold/actions/show.rb +2 -2
- data/lib/active_scaffold/actions/subform.rb +15 -8
- data/lib/active_scaffold/actions/update.rb +14 -4
- data/lib/active_scaffold/attribute_params.rb +15 -10
- data/lib/active_scaffold/bridges/bridge.rb +21 -12
- data/lib/active_scaffold/bridges/calendar_date_select/bridge.rb +3 -3
- data/lib/active_scaffold/bridges/cancan/bridge.rb +12 -0
- data/lib/active_scaffold/bridges/cancan/lib/cancan_bridge.rb +107 -0
- data/lib/active_scaffold/bridges/carrierwave/bridge.rb +1 -1
- data/lib/active_scaffold/bridges/carrierwave/lib/carrierwave_bridge.rb +3 -8
- data/lib/active_scaffold/bridges/carrierwave/lib/carrierwave_bridge_helpers.rb +1 -15
- data/lib/active_scaffold/bridges/carrierwave/lib/form_ui.rb +23 -13
- data/lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb +1 -1
- data/lib/active_scaffold/bridges/country_helper/bridge.rb +9 -0
- data/lib/active_scaffold/bridges/country_helper/lib/country_helper_bridge.rb +358 -0
- data/lib/active_scaffold/bridges/date_picker/bridge.rb +5 -3
- data/lib/active_scaffold/bridges/date_picker/lib/datepicker_bridge.rb +9 -0
- data/lib/active_scaffold/bridges/dragonfly/bridge.rb +9 -0
- data/lib/active_scaffold/bridges/dragonfly/bridge.rb~ +12 -0
- data/lib/active_scaffold/bridges/dragonfly/lib/dragonfly_bridge.rb +36 -0
- data/lib/active_scaffold/bridges/dragonfly/lib/dragonfly_bridge.rb~ +36 -0
- data/lib/active_scaffold/bridges/dragonfly/lib/dragonfly_bridge_helpers.rb +12 -0
- data/lib/active_scaffold/bridges/dragonfly/lib/dragonfly_bridge_helpers.rb~ +12 -0
- data/lib/active_scaffold/bridges/dragonfly/lib/form_ui.rb +27 -0
- data/lib/active_scaffold/bridges/dragonfly/lib/form_ui.rb~ +27 -0
- data/lib/active_scaffold/bridges/dragonfly/lib/list_ui.rb +16 -0
- data/lib/active_scaffold/bridges/dragonfly/lib/list_ui.rb~ +16 -0
- data/lib/active_scaffold/bridges/paperclip/bridge.rb +1 -1
- data/lib/active_scaffold/bridges/record_select/bridge.rb +5 -0
- data/lib/active_scaffold/bridges/record_select/lib/record_select_bridge.rb +87 -0
- data/lib/active_scaffold/bridges/record_select/lib/record_select_bridge.rb~ +84 -0
- data/lib/active_scaffold/bridges/shared/date_bridge.rb +56 -34
- data/lib/active_scaffold/bridges/tiny_mce/lib/tiny_mce_bridge.rb +19 -3
- data/lib/active_scaffold/config/base.rb +4 -4
- data/lib/active_scaffold/config/core.rb +4 -0
- data/lib/active_scaffold/config/create.rb +1 -1
- data/lib/active_scaffold/config/field_search.rb +7 -7
- data/lib/active_scaffold/config/form.rb +8 -2
- data/lib/active_scaffold/config/list.rb +22 -8
- data/lib/active_scaffold/config/mark.rb +18 -5
- data/lib/active_scaffold/config/nested.rb +3 -3
- data/lib/active_scaffold/config/search.rb +1 -1
- data/lib/active_scaffold/config/show.rb +1 -1
- data/lib/active_scaffold/data_structures/action_columns.rb +10 -6
- data/lib/active_scaffold/data_structures/action_link.rb +14 -10
- data/lib/active_scaffold/data_structures/action_links.rb +2 -2
- data/lib/active_scaffold/data_structures/column.rb +25 -11
- data/lib/active_scaffold/data_structures/nested_info.rb +21 -21
- data/lib/active_scaffold/data_structures/set.rb +2 -3
- data/lib/active_scaffold/data_structures/sorting.rb +8 -8
- data/lib/{extensions → active_scaffold/extensions}/action_controller_rendering.rb +3 -1
- data/lib/{extensions → active_scaffold/extensions}/action_view_rendering.rb +31 -33
- data/lib/{extensions → active_scaffold/extensions}/action_view_resolver.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/active_association_reflection.rb +0 -0
- data/lib/active_scaffold/extensions/active_record_offset.rb +12 -0
- data/lib/{extensions → active_scaffold/extensions}/array.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/localize.rb +1 -1
- data/lib/{extensions → active_scaffold/extensions}/name_option_for_datetime.rb +1 -1
- data/lib/{extensions → active_scaffold/extensions}/nil_id_in_url_params.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/paginator_extensions.rb +2 -2
- data/lib/{extensions → active_scaffold/extensions}/reverse_associations.rb +1 -1
- data/lib/{extensions → active_scaffold/extensions}/routing_mapper.rb +2 -2
- data/lib/{extensions → active_scaffold/extensions}/to_label.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/unsaved_associated.rb +0 -0
- data/lib/{extensions → active_scaffold/extensions}/unsaved_record.rb +0 -0
- data/lib/active_scaffold/extensions/usa_state.rb +46 -0
- data/lib/active_scaffold/finder.rb +30 -19
- data/lib/active_scaffold/helpers/controller_helpers.rb +3 -5
- data/lib/active_scaffold/helpers/form_column_helpers.rb +19 -45
- data/lib/active_scaffold/helpers/human_condition_helpers.rb +1 -1
- data/lib/active_scaffold/helpers/id_helpers.rb +2 -2
- data/lib/active_scaffold/helpers/list_column_helpers.rb +28 -17
- data/lib/active_scaffold/helpers/search_column_helpers.rb +51 -40
- data/lib/active_scaffold/helpers/search_column_helpers.rb~ +215 -0
- data/lib/active_scaffold/helpers/show_column_helpers.rb +8 -4
- data/lib/active_scaffold/helpers/view_helpers.rb +50 -27
- data/lib/active_scaffold/locale/de.yml +111 -0
- data/lib/active_scaffold/locale/en.yml +115 -0
- data/lib/active_scaffold/locale/es.yml +32 -32
- data/lib/active_scaffold/locale/fr.yml +118 -0
- data/lib/active_scaffold/marked_model.rb +6 -6
- data/lib/active_scaffold/version.rb +1 -1
- data/lib/active_scaffold_assets.rb +1 -3
- data/lib/active_scaffold_env.rb +1 -2
- data/lib/generators/active_scaffold/active_scaffold_generator.rb +5 -5
- data/lib/generators/active_scaffold_controller/active_scaffold_controller_generator.rb +3 -2
- data/lib/generators/active_scaffold_controller/templates/helper.rb +2 -0
- data/lib/generators/active_scaffold_setup/active_scaffold_setup_generator.rb +17 -19
- data/shoulda_macros/macros.rb +4 -4
- data/test/misc/finder_test.rb +2 -2
- data/test/mock_app/public/stylesheets/active_scaffold/default/stylesheet.css +4 -1
- metadata +144 -126
- data/.autotest +0 -27
- data/.document +0 -5
- data/Gemfile +0 -13
- data/Gemfile.lock +0 -20
- data/Rakefile +0 -53
- data/active_scaffold.gemspec +0 -385
- data/init.rb +0 -2
- data/lib/active_scaffold/helpers/country_helpers.rb +0 -358
- data/lib/active_scaffold/locale/de.rb +0 -120
- data/lib/active_scaffold/locale/en.rb +0 -119
- data/lib/active_scaffold/locale/fr.rb +0 -116
- data/lib/extensions/active_record_offset.rb +0 -12
- data/lib/extensions/usa_state.rb +0 -50
- data/test/mock_app/.gitignore +0 -2
- data/uninstall.rb +0 -13
data/init.rb
DELETED
@@ -1,358 +0,0 @@
|
|
1
|
-
module ActiveScaffold
|
2
|
-
module Helpers
|
3
|
-
module CountryHelpers
|
4
|
-
# Return select and option tags for the given object and method,
|
5
|
-
# using country_options_for_select to generate the list of
|
6
|
-
# option tags.
|
7
|
-
def country_select(object, method, priority_countries = nil, options = {}, html_options = {})
|
8
|
-
ActionView::Helpers::InstanceTag.new(object, method, self, options.delete(:object)).to_country_select_tag(priority_countries, options, html_options)
|
9
|
-
end
|
10
|
-
|
11
|
-
def usa_state_select(object, method, priority_states = nil, options = {}, html_options = {})
|
12
|
-
ActionView::Helpers::InstanceTag.new(object, method, self, options.delete(:object)).to_usa_state_select_tag(priority_states, options, html_options)
|
13
|
-
end
|
14
|
-
|
15
|
-
# Returns a string of option tags for pretty much any country in
|
16
|
-
# the world. Supply a country name as +selected+ to have it
|
17
|
-
# marked as the selected option tag. You can also supply an
|
18
|
-
# array of countries as +priority_countries+, so that they will
|
19
|
-
# be listed above the rest of the (long) list.
|
20
|
-
#
|
21
|
-
# NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag.
|
22
|
-
def country_options_for_select(selected = nil, priority_countries = nil)
|
23
|
-
if priority_countries
|
24
|
-
country_options = options_for_select(priority_countries.collect {|country| [I18n.t("countries.#{country}", :default => country.to_s.titleize), country.to_s]} + [['-------------', '']], :selected => selected, :disabled => '')
|
25
|
-
else
|
26
|
-
country_options = ""
|
27
|
-
end
|
28
|
-
|
29
|
-
return country_options + options_for_select(COUNTRIES.collect {|country| [I18n.t("countries.#{country}", :default => country.to_s.titleize), country.to_s]}, :selected => selected)
|
30
|
-
end
|
31
|
-
|
32
|
-
# Returns a string of option tags for the states in the United
|
33
|
-
# States. Supply a state name as +selected to have it marked as
|
34
|
-
# the selected option tag. Included also is the option to set a
|
35
|
-
# couple of +priority_states+ in case you want to highligh a
|
36
|
-
# local area NOTE: Only the option tags are returned from this
|
37
|
-
# method, wrap it in a <select>
|
38
|
-
def usa_state_options_for_select(selected = nil, priority_states = nil)
|
39
|
-
if priority_states
|
40
|
-
state_options = options_for_select(priority_states + [['-------------', '']], :selected => selected, :disabled => '')
|
41
|
-
else
|
42
|
-
state_options = ""
|
43
|
-
end
|
44
|
-
|
45
|
-
if priority_states && priority_states.include?(selected)
|
46
|
-
state_options += options_for_select(USASTATES - priority_states, :selected => selected)
|
47
|
-
else
|
48
|
-
state_options += options_for_select(USASTATES, :selected => selected)
|
49
|
-
end
|
50
|
-
|
51
|
-
return state_options
|
52
|
-
end
|
53
|
-
# All the countries included in the country_options output.
|
54
|
-
COUNTRIES = [
|
55
|
-
:afghanistan,
|
56
|
-
:aland_islands,
|
57
|
-
:albania,
|
58
|
-
:algeria,
|
59
|
-
:american_samoa,
|
60
|
-
:andorra,
|
61
|
-
:angola,
|
62
|
-
:anguilla,
|
63
|
-
:antarctica,
|
64
|
-
:antigua_and_barbuda,
|
65
|
-
:argentina,
|
66
|
-
:armenia,
|
67
|
-
:aruba,
|
68
|
-
:australia,
|
69
|
-
:austria,
|
70
|
-
:azerbaijan,
|
71
|
-
:bahamas,
|
72
|
-
:bahrain,
|
73
|
-
:bangladesh,
|
74
|
-
:barbados,
|
75
|
-
:belarus,
|
76
|
-
:belgium,
|
77
|
-
:belize,
|
78
|
-
:benin,
|
79
|
-
:bermuda,
|
80
|
-
:bhutan,
|
81
|
-
:bolivia,
|
82
|
-
:bosnia_and_herzegowina,
|
83
|
-
:botswana,
|
84
|
-
:bouvet_island,
|
85
|
-
:brazil,
|
86
|
-
:british_indian_ocean_territory,
|
87
|
-
:brunei_darussalam,
|
88
|
-
:bulgaria,
|
89
|
-
:burkina_faso,
|
90
|
-
:burundi,
|
91
|
-
:cambodia,
|
92
|
-
:cameroon,
|
93
|
-
:canada,
|
94
|
-
:cape_verde,
|
95
|
-
:cayman_islands,
|
96
|
-
:central_african_republic,
|
97
|
-
:chad,
|
98
|
-
:chile,
|
99
|
-
:china,
|
100
|
-
:christmas_island,
|
101
|
-
:cocos_keeling_islands,
|
102
|
-
:colombia,
|
103
|
-
:comoros,
|
104
|
-
:congo,
|
105
|
-
:congo_the_democratic_republic_of_the,
|
106
|
-
:cook_islands,
|
107
|
-
:costa_rica,
|
108
|
-
:cote_divoire,
|
109
|
-
:croatia,
|
110
|
-
:cuba,
|
111
|
-
:cyprus,
|
112
|
-
:czech_republic,
|
113
|
-
:denmark,
|
114
|
-
:djibouti,
|
115
|
-
:dominica,
|
116
|
-
:dominican_republic,
|
117
|
-
:ecuador,
|
118
|
-
:egypt,
|
119
|
-
:el_salvador,
|
120
|
-
:equatorial_guinea,
|
121
|
-
:eritrea,
|
122
|
-
:estonia,
|
123
|
-
:ethiopia,
|
124
|
-
:falkland_islands_malvinas,
|
125
|
-
:faroe_islands,
|
126
|
-
:fiji,
|
127
|
-
:finland,
|
128
|
-
:france,
|
129
|
-
:french_guiana,
|
130
|
-
:french_polynesia,
|
131
|
-
:french_southern_territories,
|
132
|
-
:gabon,
|
133
|
-
:gambia,
|
134
|
-
:georgia,
|
135
|
-
:germany,
|
136
|
-
:ghana,
|
137
|
-
:gibraltar,
|
138
|
-
:greece,
|
139
|
-
:greenland,
|
140
|
-
:grenada,
|
141
|
-
:guadeloupe,
|
142
|
-
:guam,
|
143
|
-
:guatemala,
|
144
|
-
:guernsey,
|
145
|
-
:guinea,
|
146
|
-
:guinea_bissau,
|
147
|
-
:guyana,
|
148
|
-
:haiti,
|
149
|
-
:heard_and_mcdonald_islands,
|
150
|
-
:holy_see_vatican_city_state,
|
151
|
-
:honduras,
|
152
|
-
:hong_kong,
|
153
|
-
:hungary,
|
154
|
-
:iceland,
|
155
|
-
:india,
|
156
|
-
:indonesia,
|
157
|
-
:iran_islamic_republic_of,
|
158
|
-
:iraq,
|
159
|
-
:ireland,
|
160
|
-
:isle_of_man,
|
161
|
-
:israel,
|
162
|
-
:italy,
|
163
|
-
:jamaica,
|
164
|
-
:japan,
|
165
|
-
:jersey,
|
166
|
-
:jordan,
|
167
|
-
:kazakhstan,
|
168
|
-
:kenya,
|
169
|
-
:kiribati,
|
170
|
-
:korea_democratic_peoples_republic_of,
|
171
|
-
:korea_republic_of,
|
172
|
-
:kuwait,
|
173
|
-
:kyrgyzstan,
|
174
|
-
:lao_peoples_democratic_republic,
|
175
|
-
:latvia,
|
176
|
-
:lebanon,
|
177
|
-
:lesotho,
|
178
|
-
:liberia,
|
179
|
-
:libyan_arab_jamahiriya,
|
180
|
-
:liechtenstein,
|
181
|
-
:lithuania,
|
182
|
-
:luxembourg,
|
183
|
-
:macao,
|
184
|
-
:macedonia_the_former_yugoslav_republic_of,
|
185
|
-
:madagascar,
|
186
|
-
:malawi,
|
187
|
-
:malaysia,
|
188
|
-
:maldives,
|
189
|
-
:mali,
|
190
|
-
:malta,
|
191
|
-
:marshall_islands,
|
192
|
-
:martinique,
|
193
|
-
:mauritania,
|
194
|
-
:mauritius,
|
195
|
-
:mayotte,
|
196
|
-
:mexico,
|
197
|
-
:micronesia_federated_states_of,
|
198
|
-
:moldova_republic_of,
|
199
|
-
:monaco,
|
200
|
-
:mongolia,
|
201
|
-
:montenegro,
|
202
|
-
:montserrat,
|
203
|
-
:morocco,
|
204
|
-
:mozambique,
|
205
|
-
:myanmar,
|
206
|
-
:namibia,
|
207
|
-
:nauru,
|
208
|
-
:nepal,
|
209
|
-
:netherlands,
|
210
|
-
:netherlands_antilles,
|
211
|
-
:new_caledonia,
|
212
|
-
:new_zealand,
|
213
|
-
:nicaragua,
|
214
|
-
:niger,
|
215
|
-
:nigeria,
|
216
|
-
:niue,
|
217
|
-
:norfolk_island,
|
218
|
-
:northern_mariana_islands,
|
219
|
-
:norway,
|
220
|
-
:oman,
|
221
|
-
:pakistan,
|
222
|
-
:palau,
|
223
|
-
:palestinian_territory_occupied,
|
224
|
-
:panama,
|
225
|
-
:papua_new_guinea,
|
226
|
-
:paraguay,
|
227
|
-
:peru,
|
228
|
-
:philippines,
|
229
|
-
:pitcairn,
|
230
|
-
:poland,
|
231
|
-
:portugal,
|
232
|
-
:puerto_rico,
|
233
|
-
:qatar,
|
234
|
-
:reunion,
|
235
|
-
:romania,
|
236
|
-
:russian_federation,
|
237
|
-
:rwanda,
|
238
|
-
:saint_barthelemy,
|
239
|
-
:saint_helena,
|
240
|
-
:saint_kitts_and_nevis,
|
241
|
-
:saint_lucia,
|
242
|
-
:saint_pierre_and_miquelon,
|
243
|
-
:saint_vincent_and_the_grenadines,
|
244
|
-
:samoa,
|
245
|
-
:san_marino,
|
246
|
-
:sao_tome_and_principe,
|
247
|
-
:saudi_arabia,
|
248
|
-
:senegal,
|
249
|
-
:serbia,
|
250
|
-
:seychelles,
|
251
|
-
:sierra_leone,
|
252
|
-
:singapore,
|
253
|
-
:slovakia,
|
254
|
-
:slovenia,
|
255
|
-
:solomon_islands,
|
256
|
-
:somalia,
|
257
|
-
:south_africa,
|
258
|
-
:south_georgia_and_the_south_sandwich_islands,
|
259
|
-
:spain,
|
260
|
-
:sri_lanka,
|
261
|
-
:sudan,
|
262
|
-
:suriname,
|
263
|
-
:svalbard_and_jan_mayen,
|
264
|
-
:swaziland,
|
265
|
-
:sweden,
|
266
|
-
:switzerland,
|
267
|
-
:syrian_arab_republic,
|
268
|
-
:taiwan_province_of_china,
|
269
|
-
:tajikistan,
|
270
|
-
:tanzania_united_republic_of,
|
271
|
-
:thailand,
|
272
|
-
:timor_leste,
|
273
|
-
:togo,
|
274
|
-
:tokelau,
|
275
|
-
:tonga,
|
276
|
-
:trinidad_and_tobago,
|
277
|
-
:tunisia,
|
278
|
-
:turkey,
|
279
|
-
:turkmenistan,
|
280
|
-
:turks_and_caicos_islands,
|
281
|
-
:tuvalu,
|
282
|
-
:uganda,
|
283
|
-
:ukraine,
|
284
|
-
:united_arab_emirates,
|
285
|
-
:united_kingdom,
|
286
|
-
:united_states,
|
287
|
-
:united_states_minor_outlying_islands,
|
288
|
-
:uruguay,
|
289
|
-
:uzbekistan,
|
290
|
-
:vanuatu,
|
291
|
-
:venezuela,
|
292
|
-
:viet_nam,
|
293
|
-
:virgin_islands_british,
|
294
|
-
:virgin_islands_us,
|
295
|
-
:wallis_and_futuna,
|
296
|
-
:western_sahara,
|
297
|
-
:yemen,
|
298
|
-
:zambia,
|
299
|
-
:zimbabwe] unless const_defined?("COUNTRIES")
|
300
|
-
|
301
|
-
|
302
|
-
USASTATES = [["Alabama", "AL"], ["Alaska", "AK"], ["Arizona", "AZ"], ["Arkansas", "AR"], ["California", "CA"], ["Colorado", "CO"], ["Connecticut", "CT"], ["Delaware", "DE"], ["District of Columbia", "DC"], ["Florida", "FL"], ["Georgia", "GA"], ["Hawaii", "HI"], ["Idaho", "ID"], ["Illinois", "IL"], ["Indiana", "IN"], ["Iowa", "IA"], ["Kansas", "KS"], ["Kentucky", "KY"], ["Louisiana", "LA"], ["Maine", "ME"], ["Maryland", "MD"], ["Massachusetts", "MA"], ["Michigan", "MI"], ["Minnesota", "MN"], ["Mississippi", "MS"], ["Missouri", "MO"], ["Montana", "MT"], ["Nebraska", "NE"], ["Nevada", "NV"], ["New Hampshire", "NH"], ["New Jersey", "NJ"], ["New Mexico", "NM"], ["New York", "NY"], ["North Carolina", "NC"], ["North Dakota", "ND"], ["Ohio", "OH"], ["Oklahoma", "OK"], ["Oregon", "OR"], ["Pennsylvania", "PA"], ["Rhode Island", "RI"], ["South Carolina", "SC"], ["South Dakota", "SD"], ["Tennessee", "TN"], ["Texas", "TX"], ["Utah", "UT"], ["Vermont", "VT"], ["Virginia", "VA"], ["Washington", "WA"], ["Wisconsin", "WI"], ["West Virginia", "WV"], ["Wyoming", "WY"]] unless const_defined?("USASTATES")
|
303
|
-
|
304
|
-
class ActionView::Helpers::InstanceTag #:nodoc:
|
305
|
-
include CountryHelpers
|
306
|
-
|
307
|
-
def to_country_select_tag(priority_countries, options, html_options)
|
308
|
-
html_options = html_options.stringify_keys
|
309
|
-
add_default_name_and_id(html_options)
|
310
|
-
value = value(object)
|
311
|
-
selected_value = options.has_key?(:selected) ? options[:selected] : value
|
312
|
-
content_tag("select",
|
313
|
-
add_options(
|
314
|
-
country_options_for_select(selected_value, priority_countries),
|
315
|
-
options, selected_value
|
316
|
-
), html_options
|
317
|
-
)
|
318
|
-
end
|
319
|
-
|
320
|
-
def to_usa_state_select_tag(priority_states, options, html_options)
|
321
|
-
html_options = html_options.stringify_keys
|
322
|
-
add_default_name_and_id(html_options)
|
323
|
-
value = value(object)
|
324
|
-
selected_value = options.has_key?(:selected) ? options[:selected] : value
|
325
|
-
content_tag("select", add_options(usa_state_options_for_select(selected_value, priority_states), options, selected_value), html_options)
|
326
|
-
end
|
327
|
-
end
|
328
|
-
end
|
329
|
-
|
330
|
-
module FormColumnHelpers
|
331
|
-
def active_scaffold_input_country(column, options)
|
332
|
-
select_options = {:prompt => as_(:_select_)}
|
333
|
-
select_options.merge!(options)
|
334
|
-
options.reverse_merge!(column.options).except!(:prompt, :priority)
|
335
|
-
options[:name] += '[]' if options[:multiple]
|
336
|
-
country_select(:record, column.name, column.options[:priority] || [:united_states], select_options, options)
|
337
|
-
end
|
338
|
-
|
339
|
-
def active_scaffold_input_usa_state(column, options)
|
340
|
-
select_options = {:prompt => as_(:_select_)}
|
341
|
-
select_options.merge!(options)
|
342
|
-
options.reverse_merge!(column.options).except!(:prompt, :priority)
|
343
|
-
options[:name] += '[]' if options[:multiple]
|
344
|
-
usa_state_select(:record, column.name, column.options[:priority], select_options, options)
|
345
|
-
end
|
346
|
-
end
|
347
|
-
|
348
|
-
module SearchColumnHelpers
|
349
|
-
def active_scaffold_search_country(column, options)
|
350
|
-
active_scaffold_input_country(column, options.merge!(:selected => options.delete(:value)))
|
351
|
-
end
|
352
|
-
|
353
|
-
def active_scaffold_search_usa_state(column, options)
|
354
|
-
active_scaffold_input_usa_state(column, options.merge!(:selected => options.delete(:value)))
|
355
|
-
end
|
356
|
-
end
|
357
|
-
end
|
358
|
-
end
|
@@ -1,120 +0,0 @@
|
|
1
|
-
{
|
2
|
-
:'de' => {
|
3
|
-
:active_scaffold => {
|
4
|
-
:add => 'Hinzufügen',
|
5
|
-
:add_existing => 'Existierenden Eintrag hinzufügen',
|
6
|
-
:add_existing_model => 'Existierende %{model} hinzufügen',
|
7
|
-
:are_you_sure_to_delete => 'Sind Sie sicher?',
|
8
|
-
:cancel => 'Abbrechen',
|
9
|
-
:click_to_edit => 'Zum Editieren anklicken',
|
10
|
-
:click_to_reset => 'Reset',
|
11
|
-
:close => 'Schliessen',
|
12
|
-
:config_list => 'Konfigurieren',
|
13
|
-
:config_list_model => 'Konfiguriere Spalten für %{model}',
|
14
|
-
:create => 'Anlegen',
|
15
|
-
:create_model => 'Lege %{model} an',
|
16
|
-
:create_another => 'Weitere anlegen',
|
17
|
-
:created_model => '%{model} angelegt',
|
18
|
-
:create_new => 'Neu anlegen',
|
19
|
-
:customize => 'Anpassen',
|
20
|
-
:delete => 'Löschen',
|
21
|
-
:deleted_model => '%{model} gelöscht',
|
22
|
-
:delimiter => 'Trennzeichen',
|
23
|
-
:download => 'Download',
|
24
|
-
:edit => 'Bearbeiten',
|
25
|
-
:export => 'Exportieren',
|
26
|
-
:nested_for_model => '%{nested_model} für %{parent_model}',
|
27
|
-
:nested_of_model => '%{nested_model} von %{parent_model}',
|
28
|
-
:filtered => '(Gefiltert)',
|
29
|
-
:found => 'Gefunden',
|
30
|
-
:hide => 'Verstecken',
|
31
|
-
:live_search => 'Live-Suche',
|
32
|
-
:loading => 'Lade…',
|
33
|
-
:next => 'Vorwärts',
|
34
|
-
:no_entries => 'Keine Einträge',
|
35
|
-
:no_options => 'Keine Optionen',
|
36
|
-
:omit_header => 'Lasse Header weg',
|
37
|
-
:options => 'Optionen',
|
38
|
-
:pdf => 'PDF',
|
39
|
-
:previous => 'Zurück',
|
40
|
-
:print => 'Drucken',
|
41
|
-
:refresh => 'Neu laden',
|
42
|
-
:remove => 'Entfernen',
|
43
|
-
:remove_file => 'Entferne oder Ersetze Datei',
|
44
|
-
:replace_with_new => 'Mit Neuer ersetzen',
|
45
|
-
:revisions_for_model => 'Revisionen für %{model}',
|
46
|
-
:reset => 'Zurücksetzen',
|
47
|
-
:saving => 'Speichern…',
|
48
|
-
:search => 'Suche',
|
49
|
-
:search_terms => 'Suchbegriffe',
|
50
|
-
:_select_ => '- Auswählen -',
|
51
|
-
:show => 'Anzeigen',
|
52
|
-
:show_model => 'Zeige %{model} an',
|
53
|
-
:_to_ => ' zu ',
|
54
|
-
:update => 'Speichern',
|
55
|
-
:update_model => 'Editiere %{model}',
|
56
|
-
:updated_model => '%{model} aktualisiert',
|
57
|
-
:'=' => '=',
|
58
|
-
:'>=' => '>=',
|
59
|
-
:'<=' => '<=',
|
60
|
-
:'>' => '>',
|
61
|
-
:'<' => '<',
|
62
|
-
:'!=' => '!=',
|
63
|
-
:between => 'Zwischen',
|
64
|
-
:contains => 'Enthält',
|
65
|
-
:begins_with => 'Beginnt',
|
66
|
-
:ends_with => 'Ended',
|
67
|
-
:today => 'Heute',
|
68
|
-
:yesterday => 'Gestern',
|
69
|
-
:tomorrow => 'Morgen',
|
70
|
-
:this_week => 'Diese Woche',
|
71
|
-
:prev_week => 'Letzte Woche',
|
72
|
-
:next_week => 'Nächste Woche',
|
73
|
-
:this_month => 'Diesen Monat',
|
74
|
-
:prev_month => 'Letzten Monat',
|
75
|
-
:next_month => 'Nächsten Monat',
|
76
|
-
:this_year => 'Dieses Jahr',
|
77
|
-
:prev_year => 'Letztes Jahr',
|
78
|
-
:next_year => 'Nächstes Jahr',
|
79
|
-
:past => 'Letzten',
|
80
|
-
:future => 'Nächsten',
|
81
|
-
:range => 'Zeitraum',
|
82
|
-
:seconds => 'Sekunden',
|
83
|
-
:minutes => 'Minuten',
|
84
|
-
:hours => 'Stunden',
|
85
|
-
:days => 'Tage',
|
86
|
-
:weeks => 'Wochen',
|
87
|
-
:months => 'Monate',
|
88
|
-
:years => 'Jahre',
|
89
|
-
:optional_attributes => 'Weitere',
|
90
|
-
:null => 'Null',
|
91
|
-
:not_null => 'Nicht Null',
|
92
|
-
:date_picker_options => {
|
93
|
-
:weekHeader => 'Wo',
|
94
|
-
:firstDay => 1,
|
95
|
-
:isRTL => false,
|
96
|
-
:showMonthAfterYear => false
|
97
|
-
},
|
98
|
-
:datetime_picker_options => {
|
99
|
-
:timeText => 'Uhrzeit',
|
100
|
-
:currentText => 'Jetzt',
|
101
|
-
:closeText => 'Schließen'
|
102
|
-
},
|
103
|
-
:errors => {
|
104
|
-
:template => {
|
105
|
-
:header => {
|
106
|
-
:one => "Konnte %{model} nicht speichern: ein Fehler.",
|
107
|
-
:other => "Konnte %{model} nicht speichern: %{count} Fehler."
|
108
|
-
},
|
109
|
-
:body => "Bitte überprüfen Sie die folgenden Felder:"
|
110
|
-
}
|
111
|
-
},
|
112
|
-
# error_messages
|
113
|
-
:cant_destroy_record => "%{record} kann nicht gelöscht werden",
|
114
|
-
:internal_error => 'Fehler bei der Verarbeitung (code 500, Interner Fehler)',
|
115
|
-
:version_inconsistency => 'Inkonsistente Versionen - dieser Eintrag wurde verändert nachdem Sie mit der Bearbeitung begonnen haben.',
|
116
|
-
:record_not_saved => 'Eintrag kann nicht gespeichert werden. Ursache unbekannt.',
|
117
|
-
:no_authorization_for_action => "Keine Berechtigung für Aktion %{action}"
|
118
|
-
}
|
119
|
-
}
|
120
|
-
}
|