inline_forms 2.2 → 2.21
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/app/views/inline_forms/_new.html.erb +24 -14
- data/lib/inline_forms/version.rb +1 -1
- metadata +2 -2
@@ -28,20 +28,30 @@
|
|
28
28
|
<% attributes.each do | attribute, name, form_element | -%>
|
29
29
|
<% unless form_element.to_sym == :associated || (cancan_enabled? && cannot?(:read, @Klass.to_s.underscore.pluralize.to_sym, attribute)) -%>
|
30
30
|
<% css_class_id = "attribute_#{attribute}_#{@object.id}" -%>
|
31
|
-
|
32
|
-
<
|
33
|
-
<
|
34
|
-
<%=
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
31
|
+
<% if form_element == :header %>
|
32
|
+
<tr>
|
33
|
+
<td valign="top" class="header" colspan="2">
|
34
|
+
<div class='<%= "attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
|
35
|
+
<%= @object.class.human_attribute_name(attribute) -%>
|
36
|
+
</div>
|
37
|
+
</td>
|
38
|
+
</tr>
|
39
|
+
<% else %>
|
40
|
+
<tr>
|
41
|
+
<td valign="top" class="<%= 'has_validations ' if @object.has_validations_for?(attribute) -%>" validation-hint="<%= validation_hints_as_list_for(@object, attribute) -%>">
|
42
|
+
<div class='<%= "attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
|
43
|
+
<%= @object.class.human_attribute_name(attribute) -%>
|
44
|
+
</div>
|
45
|
+
</td>
|
46
|
+
<td valign="top">
|
47
|
+
<div class='<%= "attribute_value attribute_#{attribute} form_element_#{form_element}" -%>' >
|
48
|
+
<span id="<%= css_class_id -%>" >
|
49
|
+
<%= send("#{form_element}_edit", @object, attribute) -%>
|
50
|
+
</span>
|
51
|
+
</div>
|
52
|
+
</td>
|
53
|
+
</tr>
|
54
|
+
<% end -%>
|
45
55
|
<% end -%>
|
46
56
|
<% end -%>
|
47
57
|
</table>
|
data/lib/inline_forms/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inline_forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '2.
|
4
|
+
version: '2.21'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-08-
|
12
|
+
date: 2013-08-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rvm
|