inline_forms 1.3.6 → 1.3.7

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.
Files changed (34) hide show
  1. data/Gemfile.lock +1 -1
  2. data/bin/inline_forms +2 -1
  3. data/lib/app/assets/stylesheets/inline_forms.css +34 -0
  4. data/lib/app/controllers/inline_forms_application_controller.rb +21 -0
  5. data/lib/app/controllers/inline_forms_controller.rb +222 -189
  6. data/lib/app/helpers/form_elements/text_area.rb +1 -1
  7. data/lib/app/helpers/form_elements/text_area_without_ckeditor.rb +13 -0
  8. data/lib/app/helpers/inline_forms_helper.rb +33 -19
  9. data/lib/app/validators/is_a_curacao_id_number_validator.rb +4 -6
  10. data/lib/app/validators/is_email_address_validator.rb +0 -4
  11. data/lib/app/validators/must_be_a_value_validator.rb +0 -1
  12. data/lib/app/validators/must_be_unique_validator.rb +0 -3
  13. data/lib/app/views/devise/confirmations/new.html.erb +5 -8
  14. data/lib/app/views/devise/passwords/edit.html.erb +12 -11
  15. data/lib/app/views/devise/passwords/new.html.erb +5 -8
  16. data/lib/app/views/devise/registrations/new.html.erb +5 -8
  17. data/lib/app/views/devise/sessions/new.html.erb +4 -8
  18. data/lib/app/views/devise/shared/_header_and_errors.html.erb +4 -0
  19. data/lib/app/views/devise/shared/_links.erb +21 -19
  20. data/lib/app/views/devise/unlocks/new.html.erb +5 -8
  21. data/lib/app/views/inline_forms/_close.html.erb +1 -1
  22. data/lib/app/views/inline_forms/_list.html.erb +8 -11
  23. data/lib/app/views/inline_forms/_new.html.erb +9 -3
  24. data/lib/app/views/inline_forms/_show.html.erb +2 -2
  25. data/lib/app/views/inline_forms/extract_translations.erb +4 -0
  26. data/lib/app/views/inline_forms/show_undo.js.erb +1 -1
  27. data/lib/app/views/layouts/devise.html.erb +1 -1
  28. data/lib/app/views/layouts/inline_forms.html.erb +1 -1
  29. data/lib/inline_forms.rb +2 -0
  30. data/lib/inline_forms/version.rb +1 -1
  31. data/lib/locales/inline_forms.en.yml +38 -0
  32. data/lib/locales/inline_forms.nl.yml +4 -0
  33. metadata +11 -6
  34. data/lib/app/views/inline_forms/_show_undo.html.erb +0 -1
@@ -1,6 +1,12 @@
1
1
  <li id="newnew">
2
2
  <% flash.each do |key, value| %>
3
- <div id="flash" class="flash <%= key %>"><%= value %></div>
3
+ <div id="flash" class="flash <%= key %>">
4
+ <ul>
5
+ <% value.each do |m| %>
6
+ <li><%= m %></li>
7
+ <% end %>
8
+ </ul>
9
+ </div>
4
10
  <% end %>
5
11
  <script type="text/javascript">
6
12
  $(function() { $("#flash").delay(1000).fadeTo('slow', 0.33); } );
@@ -14,7 +20,7 @@
14
20
  <tr>
15
21
  <th colspan="2" valign="top">
16
22
  <div class="object_presentation" >
17
- Add a new <%= @object.class.to_s.singularize.downcase -%>
23
+ <%= t('inline_forms.view.add_new', :model => @Klass.model_name.human ) -%>
18
24
  </div>
19
25
  </th>
20
26
  </tr>
@@ -25,7 +31,7 @@
25
31
  <tr>
26
32
  <td valign="top">
27
33
  <div class='<%= has_validations(@object, attribute) -%><%= "attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
28
- <%= h(name) -%>
34
+ <%= translated_attribute(@object, attribute) -%>
29
35
  </div>
30
36
  <% if has_validations(@object, attribute) %>
31
37
  <div class='validation_help_tooltip'>
@@ -13,11 +13,11 @@
13
13
  </tr>
14
14
  <% attributes = @inline_forms_attribute_list || @object.inline_forms_attribute_list -%>
15
15
  <% attributes.each do | attribute, name, form_element | -%>
16
- <% css_class_id = "#{@object.class.to_s.underscore}_#{@object.id}_#{attribute}" -%>
16
+ <% css_class_id = "#{@object.class.name.underscore}_#{@object.id}_#{attribute}" -%>
17
17
  <tr>
18
18
  <td valign="top">
19
19
  <div class='<%= has_validations(@object, attribute) -%><%= "attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
20
- <%= h(name) -%>
20
+ <%= translated_attribute(@object, attribute) -%>
21
21
  </div>
22
22
  <% if has_validations(@object, attribute) %>
23
23
  <div class='validation_help_tooltip'>
@@ -0,0 +1,4 @@
1
+
2
+ <pre>
3
+ <%= @display_array%>
4
+ </pre>
@@ -1 +1 @@
1
- $('#<%= @update_span %>').html('<%= escape_javascript(link_to 'undo', send('revert_' + @object.class.to_s.underscore + "_path", @object.versions.scoped.last, :update => @update_span), :remote => true, :method => :post)%>')
1
+ $('#<%= @update_span %>').html('<%= escape_javascript(link_to t('inline_forms.view.undo'), send('revert_' + @object.class.to_s.underscore + "_path", @object.versions.scoped.last, :update => @update_span), :remote => true, :method => :post)%>')
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
- <title><%= application_title -%> v<%= inline_forms_version -%></title>
4
+ <title><%= t('application.name') + " v" + InlineForms::VERSION -%></title>
5
5
  <%= stylesheet_link_tag 'devise' %>
6
6
  <%#= javascript_include_tag :defaults %>
7
7
  <%= csrf_meta_tag %>
@@ -2,7 +2,7 @@
2
2
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
3
  <html>
4
4
  <head>
5
- <title><%= h( yield(:title) || "Unconfigured Titile") %></title>
5
+ <title><%= t('application.name') + " v" + InlineForms::VERSION -%></title>
6
6
  <%= stylesheet_link_tag 'inline_forms_application', 'application' %>
7
7
  <%= javascript_include_tag 'application', 'inline_forms_application' %>
8
8
  <%= csrf_meta_tag %>
@@ -142,6 +142,8 @@ module InlineForms
142
142
  paths["app/models"] << "lib/app/models"
143
143
  paths["app/views"] << "lib/app/views"
144
144
  paths["app/assets"] << "lib/app/assets"
145
+ I18n.load_path << Dir[File.join(File.expand_path(File.dirname(__FILE__) + '/locales'), '*.yml')]
146
+ I18n.load_path.flatten!
145
147
  end
146
148
 
147
149
  end
@@ -1,3 +1,3 @@
1
1
  module InlineForms
2
- VERSION = "1.3.6"
2
+ VERSION = "1.3.7"
3
3
  end
@@ -0,0 +1,38 @@
1
+ "en":
2
+ "activerecord":
3
+ "models":
4
+ "if_locale": "Inline Forms Taal"
5
+ "if_key": "Inline Forms Vertaalsleutel"
6
+ "language": "Taal"
7
+ "attributes":
8
+ "if_translation":
9
+ "value": "vertaling"
10
+ "page":
11
+ "page_blurbs": "Paginatekst"
12
+ "application":
13
+ "name": "KBB Barometer Administratie"
14
+ "inline_forms":
15
+ "validators":
16
+ "help":
17
+ "numericality_validator": "moet een getal zijn"
18
+ "is_a_curacao_id_number_validator": "Een geldig ID nummer bestaat uit:<br />4 cijfers voor het jaar<br />2 cijfers voor de maand<br />2 cijfers voor de dag<br />2 cijfers voor het volgnummer<br />Bijvoorbeeld: 1990021123."
19
+ "view":
20
+ "close": "Sluiten"
21
+ "add_new": "Maak een %{model} aan"
22
+ "undo": "Terughalen"
23
+ "trash": "Weggooien"
24
+ "devise":
25
+ "send_instructions": "stuur instructies"
26
+ "sign_up": "inschrijven"
27
+ "login_with_email_and_password": "Aanmelden door email adres en wachtwoord in te voeren."
28
+ "sign_in": "aanmelden"
29
+ "links":
30
+ "no_unlock_instructions": "geen instructies ontvangen om blokkade op te heffen?"
31
+ "sign_up": "inschrijven"
32
+ "sign_in": "aanmelden"
33
+ "forgot_password": "wachtwoord vergeten?"
34
+ "sign_in_with": "aanmelden via %{provider}"
35
+ "no_instructions": "geen instructies ontvangen?"
36
+ "signup_with_email_name_and_password": "Inschrijven door naam, email adres en wachtwoord (twee keer) in te voeren."
37
+ "provide_email_and_we_send_instructions": "Geef ons uw email adres, dan sturen wij u instructies"
38
+
@@ -0,0 +1,4 @@
1
+ nl:
2
+ test: test
3
+
4
+
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 6
10
- version: 1.3.6
9
+ - 7
10
+ version: 1.3.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ace Suares
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-05 00:00:00 Z
18
+ date: 2012-04-14 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rspec-rails
@@ -158,6 +158,7 @@ files:
158
158
  - lib/app/assets/stylesheets/ui-lightness/jquery-ui-1.8.17.custom.css
159
159
  - lib/app/assets/stylesheets/validation_tooltips.css
160
160
  - lib/app/controllers/geo_code_curacao_controller.rb
161
+ - lib/app/controllers/inline_forms_application_controller.rb
161
162
  - lib/app/controllers/inline_forms_controller.rb
162
163
  - lib/app/helpers/form_elements/check_box.rb
163
164
  - lib/app/helpers/form_elements/check_list.rb
@@ -176,6 +177,7 @@ files:
176
177
  - lib/app/helpers/form_elements/scale_with_values.rb
177
178
  - lib/app/helpers/form_elements/slider_with_values.rb
178
179
  - lib/app/helpers/form_elements/text_area.rb
180
+ - lib/app/helpers/form_elements/text_area_without_ckeditor.rb
179
181
  - lib/app/helpers/form_elements/text_field.rb
180
182
  - lib/app/helpers/inline_forms_helper.rb
181
183
  - lib/app/models/geo_code_curacao.rb
@@ -194,6 +196,7 @@ files:
194
196
  - lib/app/views/devise/registrations/edit.html.erb
195
197
  - lib/app/views/devise/registrations/new.html.erb
196
198
  - lib/app/views/devise/sessions/new.html.erb
199
+ - lib/app/views/devise/shared/_header_and_errors.html.erb
197
200
  - lib/app/views/devise/shared/_links.erb
198
201
  - lib/app/views/devise/unlocks/new.html.erb
199
202
  - lib/app/views/geo_code_curacao/list_streets.html.erb
@@ -204,9 +207,9 @@ files:
204
207
  - lib/app/views/inline_forms/_list.html.erb
205
208
  - lib/app/views/inline_forms/_new.html.erb
206
209
  - lib/app/views/inline_forms/_show.html.erb
207
- - lib/app/views/inline_forms/_show_undo.html.erb
208
210
  - lib/app/views/inline_forms/close.js.erb
209
211
  - lib/app/views/inline_forms/edit.js.erb
212
+ - lib/app/views/inline_forms/extract_translations.erb
210
213
  - lib/app/views/inline_forms/list.js.erb
211
214
  - lib/app/views/inline_forms/new.js.erb
212
215
  - lib/app/views/inline_forms/show.js.erb
@@ -223,6 +226,8 @@ files:
223
226
  - lib/generators/templates/model.erb
224
227
  - lib/inline_forms.rb
225
228
  - lib/inline_forms/version.rb
229
+ - lib/locales/inline_forms.en.yml
230
+ - lib/locales/inline_forms.nl.yml
226
231
  - lib/otherstuff/add_roles.sql
227
232
  - lib/otherstuff/bump
228
233
  - lib/otherstuff/diffie
@@ -259,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
259
264
  requirements: []
260
265
 
261
266
  rubyforge_project: inline_forms
262
- rubygems_version: 1.8.15
267
+ rubygems_version: 1.8.18
263
268
  signing_key:
264
269
  specification_version: 3
265
270
  summary: Inline editing of forms.