inline_forms 2.23 → 3.0

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 (51) hide show
  1. checksums.yaml +9 -9
  2. data/.gitignore +5 -0
  3. data/bin/inline_forms +41 -414
  4. data/bin/inline_forms_app_template.rb +16 -0
  5. data/bin/inline_forms_installer_core.rb +423 -0
  6. data/lib/app/assets/javascripts/inline_forms.js +12 -32
  7. data/lib/app/assets/javascripts/inline_forms_application.js +7 -1
  8. data/lib/app/assets/stylesheets/inline_forms.css +5 -399
  9. data/lib/app/assets/stylesheets/inline_forms_application.css +3 -3
  10. data/lib/app/controllers/inline_forms_application_controller.rb +1 -2
  11. data/lib/app/controllers/inline_forms_controller.rb +2 -2
  12. data/lib/app/helpers/form_elements/check_list.rb +7 -14
  13. data/lib/app/helpers/form_elements/date.rb +3 -8
  14. data/lib/app/helpers/form_elements/decimal_field.rb +15 -0
  15. data/lib/app/helpers/form_elements/dropdown.rb +1 -1
  16. data/lib/app/helpers/form_elements/dropdown_with_other.rb +153 -0
  17. data/lib/app/helpers/form_elements/dropdown_with_values.rb +1 -1
  18. data/lib/app/helpers/form_elements/info_list.rb +22 -0
  19. data/lib/app/helpers/form_elements/integer_field.rb +15 -0
  20. data/lib/app/helpers/form_elements/kansen_slider.rb +89 -0
  21. data/lib/app/helpers/form_elements/month_year_picker.rb +33 -0
  22. data/lib/app/helpers/form_elements/move.rb +17 -0
  23. data/lib/app/helpers/form_elements/plain_text_area.rb +1 -1
  24. data/lib/app/helpers/form_elements/radio_button.rb +5 -6
  25. data/lib/app/helpers/form_elements/slider_with_values.rb +1 -1
  26. data/lib/app/helpers/form_elements/text_area.rb +12 -10
  27. data/lib/app/helpers/form_elements/text_area_without_ckeditor.rb +1 -1
  28. data/lib/app/helpers/form_elements/text_field.rb +2 -2
  29. data/lib/app/helpers/inline_forms_helper.rb +32 -37
  30. data/lib/app/views/inline_forms/_close.html.erb +12 -2
  31. data/lib/app/views/inline_forms/_edit.html.erb +54 -21
  32. data/lib/app/views/inline_forms/_flash.html.erb +13 -0
  33. data/lib/app/views/inline_forms/_list.html.erb +28 -24
  34. data/lib/app/views/inline_forms/_new.html.erb +52 -60
  35. data/lib/app/views/inline_forms/_new_nested.html.erb +43 -0
  36. data/lib/app/views/inline_forms/_show.html.erb +83 -39
  37. data/lib/app/views/inline_forms/_tree.html.erb +46 -0
  38. data/lib/app/views/layouts/devise.html.erb +4 -14
  39. data/lib/app/views/layouts/inline_forms.html.erb +15 -23
  40. data/lib/inline_forms/version.rb +1 -1
  41. metadata +17 -13
  42. data/lib/app/assets/images/add.png +0 -0
  43. data/lib/app/assets/images/close.png +0 -0
  44. data/lib/app/assets/images/tooltip-bubble-down-left.png +0 -0
  45. data/lib/app/assets/images/tooltip-bubble-down-right.png +0 -0
  46. data/lib/app/assets/images/tooltip-bubble-up-left.png +0 -0
  47. data/lib/app/assets/images/tooltip-bubble-up-right.png +0 -0
  48. data/lib/app/assets/images/trash.png +0 -0
  49. data/lib/app/assets/javascripts/jquery.qtip.js +0 -3395
  50. data/lib/app/assets/stylesheets/jquery.qtip.css +0 -567
  51. data/lib/app/views/inline_forms/_header.html.erb +0 -1
@@ -2,7 +2,7 @@
2
2
  InlineForms::SPECIAL_COLUMN_TYPES[:plain_text_area]=:text
3
3
 
4
4
  def plain_text_area_show(object, attribute)
5
- link_to_inline_edit object, attribute, object[attribute] #.empty? ? 'Click here to edit' : object[attribute]
5
+ link_to_inline_edit object, attribute, (object[attribute].nil? || object[attribute].empty?) ? "<i class='fi-plus'></i>".html_safe : object[attribute]
6
6
  end
7
7
 
8
8
  def plain_text_area_edit(object, attribute)
@@ -10,16 +10,15 @@ def radio_button_show(object, attribute)
10
10
  end
11
11
 
12
12
  def radio_button_edit(object, attribute)
13
- out ='<ul class="radio_list">'
13
+ out =''
14
14
  values = attribute_values(object, attribute)
15
15
  values.each do |key,value|
16
- out << '<li>'
16
+ out << "<div class='row #{cycle('odd', 'even')}'>"
17
17
  out << radio_button_tag(attribute.to_s, key, key == object.send(attribute))
18
- out << value
19
- out << '</li>'
18
+ out << "<label for=#{key}>#{value}</label>"
19
+ out << '</div>'
20
20
  end
21
- out << '</ul>'
22
- raw out
21
+ out.html_safe
23
22
  end
24
23
 
25
24
  def radio_button_update(object, attribute)
@@ -24,7 +24,7 @@ def slider_with_values_show(object, attribute)
24
24
  range: "min",
25
25
  disabled: true,
26
26
  min: 0,
27
- max: 5,
27
+ max: ' + values.length + ',
28
28
  step: 1,
29
29
  }
30
30
  );
@@ -9,13 +9,14 @@ def text_area_show(object, attribute)
9
9
  cktext_area_tag(
10
10
  attribute,
11
11
  object[attribute],
12
- :input_html => { :id => "textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
13
- :width => '100%' },
14
- :height => '200px',
15
- :toolbar => "None",
16
- :readOnly => "true",
17
- :resize_enabled => "false",
18
- :toolbarCanCollapse => "false"
12
+ :id => "textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
13
+ :ckeditor => { :width => '100%',
14
+ :height => '200px',
15
+ :toolbar => "None",
16
+ :readOnly => "true",
17
+ :resize_enabled => "false",
18
+ :toolbarCanCollapse => "false"
19
+ }
19
20
  ) +
20
21
  image_tag( 'glass_plate.gif',
21
22
  :class => "glass_plate",
@@ -31,9 +32,10 @@ def text_area_edit(object, attribute)
31
32
  cktext_area_tag(
32
33
  attribute,
33
34
  object[attribute],
34
- :input_html => { :id => "textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
35
- :width => '100%'},
36
- :height => '200px'
35
+ :id => "textarea_#{object.class.name.underscore}_#{object.id}_#{attribute.to_s}",
36
+ :ckeditor => { :width => '100%',
37
+ :height => '200px'
38
+ }
37
39
  )
38
40
  else
39
41
  text_area_tag attribute, object[attribute], :class => 'attribute_text_area'
@@ -2,7 +2,7 @@
2
2
  InlineForms::SPECIAL_COLUMN_TYPES[:text_area_without_ckeditor]=:text
3
3
 
4
4
  def text_area_without_ckeditor_show(object, attribute)
5
- link_to_inline_edit object, attribute, object[attribute]
5
+ link_to_inline_edit object, attribute, (object[attribute].nil? || object[attribute].empty?) ? "<i class='fi-plus'></i>".html_safe : object[attribute]
6
6
  end
7
7
 
8
8
  def text_area_without_ckeditor_edit(object, attribute)
@@ -2,11 +2,11 @@
2
2
  InlineForms::SPECIAL_COLUMN_TYPES[:text_field]=:string
3
3
 
4
4
  def text_field_show(object, attribute)
5
- link_to_inline_edit object, attribute, (object.send attribute.to_sym)
5
+ link_to_inline_edit object, attribute, (object[attribute].nil? || object[attribute].empty?) ? "<i class='fi-plus'></i>".html_safe : object[attribute]
6
6
  end
7
7
 
8
8
  def text_field_edit(object, attribute)
9
- text_field_tag attribute, (object.send attribute.to_sym), :class => 'input_text_field'
9
+ text_field_tag attribute, (object.send attribute.to_sym), :class => 'input_text_field' # for abide: , :required => true
10
10
  end
11
11
 
12
12
  def text_field_update(object, attribute)
@@ -19,35 +19,54 @@ module InlineFormsHelper
19
19
  end
20
20
 
21
21
  # close link
22
- def close_link( object, update_span )
23
- link_to image_tag( 'close.png',
24
- :class => "close_icon",
25
- :title => t('inline_forms.view.close') ),
22
+ def close_link( object, update_span, html_class = 'button close_button' )
23
+ link_to "<i class='fi-x'></i>".html_safe,
26
24
  send( object.class.to_s.underscore + '_path',
27
25
  object,
28
26
  :update => update_span,
29
27
  :close => true ),
30
- :remote => true
28
+ :remote => true,
29
+ :class => html_class,
30
+ :title => t('inline_forms.view.close')
31
31
  end
32
32
 
33
33
  # destroy link
34
34
  def link_to_destroy( object, update_span )
35
35
  if cancan_disabled? || ( can? :delete, object )
36
- link_to image_tag( 'trash.png',
37
- :class => "trash_icon",
38
- :title => t('inline_forms.view.trash') ),
36
+ link_to "<i class='fi-trash'></i>".html_safe,
39
37
  send( object.class.to_s.underscore + '_path',
40
38
  object,
41
39
  :update => update_span ),
42
40
  :method => :delete,
43
- :remote => true
41
+ :remote => true,
42
+ :title => t('inline_forms.view.trash')
44
43
  end
45
44
  end
46
45
 
47
- # # undo link
48
- # def link_to_undo_destroy(object, update_span )
49
- # link_to(t('inline_forms.view.undo'), revert_version_path(object.versions.scoped.last), :method => :post)
50
- # end
46
+ # new link
47
+ def link_to_new_record(model, path_to_new, update_span, parent_class = nil, parent_id = nil, html_class = 'button new_button')
48
+ out = (link_to "<i class='fi-plus'></i>".html_safe,
49
+ send(path_to_new,
50
+ :update => update_span,
51
+ :parent_class => parent_class,
52
+ :parent_id => parent_id,
53
+ ),
54
+ :remote => true,
55
+ :class => html_class,
56
+ :title => t('inline_forms.view.add_new', :model => model.model_name.human )
57
+ )
58
+ if cancan_enabled?
59
+ if can? :create, model.to_s.pluralize.underscore.to_sym
60
+ if parent_class.nil?
61
+ raw out
62
+ else
63
+ raw out if can? :update, parent_class.find(parent_id) # can update this specific parent object???
64
+ end
65
+ end
66
+ else
67
+ raw out
68
+ end
69
+ end
51
70
 
52
71
  # link_to_inline_edit
53
72
  def link_to_inline_edit(object, attribute, attribute_value='')
@@ -68,30 +87,6 @@ module InlineFormsHelper
68
87
  end
69
88
  end
70
89
 
71
- # link to new record
72
- def link_to_new_record(model, path_to_new, update_span, parent_class, parent_id)
73
- out = ""
74
- out << "<li class='new_record_link'>"
75
- out << (link_to image_tag( 'add.png',
76
- :class => "new_record_icon",
77
- :title => t('inline_forms.view.add_new', :model => model.model_name.human ) ),
78
- send(path_to_new, :update => update_span, :parent_class => parent_class, :parent_id => parent_id ),
79
- :remote => true)
80
- out << "<div style='clear: both;'></div>"
81
- out << "</li>"
82
- if cancan_enabled?
83
- if can? :create, model.to_s.pluralize.underscore.to_sym
84
- if parent_class.nil?
85
- raw out
86
- else
87
- raw out if can? :update, parent_class.find(parent_id) # can update this specific parent object???
88
- end
89
- end
90
- else
91
- raw out
92
- end
93
- end
94
-
95
90
  # url to other language
96
91
  def locale_url(request, locale)
97
92
  subdomains = request.subdomains
@@ -1,2 +1,12 @@
1
- <%= link_to_destroy(@object, @update_span) -%>
2
- <%= link_to h(@object._presentation), send(@object.class.to_s.underscore + "_path", @object, :update => @update_span), :remote => true -%>
1
+ <% if cancan_disabled? || ( can? :delete, @object ) %>
2
+ <div class="small-1 column">
3
+ <%= link_to_destroy(@object, @update_span) -%>
4
+ </div>
5
+ <div class="small-11 column">
6
+ <%= link_to h(@object._presentation), send(@object.class.to_s.underscore + "_path", @object, :update => @update_span), :remote => true -%>
7
+ </div>
8
+ <% else %>
9
+ <div class="small-12 column">
10
+ <%= link_to h(@object._presentation), send(@object.class.to_s.underscore + "_path", @object, :update => @update_span), :remote => true -%>
11
+ </div>
12
+ <% end %>
@@ -1,23 +1,56 @@
1
+ <% @BUTTONS_UNDER = [ "text_area", "kansen_slider" ] %>
1
2
  <%= form_tag send(@object.class.to_s.underscore + '_path', :update => @update_span,
2
- :attribute => @attribute,
3
- :form_element => @form_element,
4
- :sub_id => @sub_id ),
5
- :method => :put, # this is going to the update method!
6
- :multipart => true,
7
- :class => "edit_form",
8
- :remote => true do -%>
9
- <div class="edit_form_field">
10
- <%= send("#{@form_element}_edit", @object, @attribute) %>
11
- </div>
12
- <%= link_to( send( @object.class.to_s.underscore + '_path', :update => @update_span || "field_#{@attribute}_#{@object.id.to_s}",
13
- :attribute => @attribute,
14
- :form_element => @form_element,
15
- :sub_id => @sub_id ),
16
- :method => :get, # this is going to the show method!
17
- :class => "edit_form_cancel",
18
- :remote => true ) do %>
19
- <input type="button" name="cancel" value="cancel" />
20
- <% end %>
21
- <%= submit_tag "ok", :class => "edit_form_submit"-%>
22
- <div style="clear: both;"></div>
3
+ :attribute => @attribute,
4
+ :form_element => @form_element,
5
+ :sub_id => @sub_id ),
6
+ :method => :put, # this is going to the update method!
7
+ :multipart => true,
8
+ :class => "edit_form",
9
+ :abide => true,
10
+ :remote => true do -%>
11
+ <% if @BUTTONS_UNDER.include? @form_element %>
12
+ <div class="row collapse">
13
+ <div class="small-12 columns">
14
+ <%= send("#{@form_element}_edit", @object, @attribute) %>
15
+ </div>
16
+ </div>
17
+ <div class="row collapse">
18
+ <div class="small-9 columns">
19
+ &nbsp;
20
+ </div>
21
+ <div class="small-1 columns">
22
+ <%= submit_tag "ok", :class => "postfix button"-%>
23
+ </div>
24
+ <div class="small-2 columns">
25
+ <%= link_to( send( @object.class.to_s.underscore + '_path', :update => @update_span || "field_#{@attribute}_#{@object.id.to_s}",
26
+ :attribute => @attribute,
27
+ :form_element => @form_element,
28
+ :sub_id => @sub_id ),
29
+ :method => :get, # this is going to the show method!
30
+ :remote => true ) do %>
31
+ <input type="button" name="cancel" value="cancel" class="button alert postfix radius" />
32
+ <% end %>
33
+ </div>
34
+ </div>
35
+ <% else %>
36
+ <div class="row collapse">
37
+ <div class="small-9 columns">
38
+ <%= send("#{@form_element}_edit", @object, @attribute) %>
39
+ </div>
40
+ <div class="small-1 columns">
41
+ <%= submit_tag "ok", :class => "postfix button"-%>
42
+ </div>
43
+ <div class="small-2 columns">
44
+ <%= link_to( send( @object.class.to_s.underscore + '_path', :update => @update_span || "field_#{@attribute}_#{@object.id.to_s}",
45
+ :attribute => @attribute,
46
+ :form_element => @form_element,
47
+ :sub_id => @sub_id ),
48
+ :method => :get, # this is going to the show method!
49
+ :remote => true ) do %>
50
+ <input type="button" name="cancel" value="cancel" class="button alert postfix radius" />
51
+ <% end %>
52
+ </div>
53
+ </div>
54
+ <% end%>
55
+
23
56
  <% end -%>
@@ -0,0 +1,13 @@
1
+ <% unless flash.empty? %>
2
+ <% identifier = Time.now.to_i.to_s %>
3
+ <div class="row" id="flash_<%= identifier %>">
4
+ <% flash.each do |key, value| %>
5
+ <%= value %>
6
+ <% end %>
7
+ <script>
8
+ $("#<%= "#{update_span}_auto_header" %>").ScrollTo();
9
+ $("#flash_<%= identifier %>").delay(1000).fadeToggle('2000');
10
+ </script>
11
+ </div>
12
+ <% end %>
13
+
@@ -1,16 +1,3 @@
1
- <% flash.each do |key, value| %>
2
- <div id="flash" class="flash <%= key %>"><%= value %></div>
3
- <%#*<script type="text/javascript">%>
4
- <%#*$(function() { $("#flash").delay(1000).fadeToggle('2000'); } );%>
5
- <%#*</script>%>
6
- <% end %>
7
-
8
- <!-- purpose: list objects. we come here from #index and from #new.
9
- If we come here for the 'first' time, we dont' have parents; its just a list of objects.
10
- But if we come here because we are called from the show partial, then we have to deal wits some parent object.
11
- Unfortaunatlly, the way :locals work, these are local variables, like object, but if we come from a controller,
12
- they are @object. We need this magic here to rewrite all the @variables to variables. Ugh. -->
13
-
14
1
  <% ul_needed = true %>
15
2
  <% if not defined?(parent_class) %>
16
3
  <% # we didn't come here via _show.html.erb %>
@@ -47,9 +34,8 @@ they are @object. We need this magic here to rewrite all the @variables to varia
47
34
  <% objects = objects.paginate :page => params[:page], :per_page => @PER_PAGE || 5, :conditions => conditions %>
48
35
  <% end %>
49
36
 
50
- <%= raw "<ul id=\"#{update_span}\" class=\"inline_forms_list\">" if ul_needed -%>
51
- <!-- # link to new -->
52
- <%= link_to_new_record(model, path_to_new, update_span, parent_class, parent_id) -%>
37
+ <%= raw "<div class=\"list_container\" id=\"#{update_span}\">" if ul_needed -%>
38
+
53
39
  <!-- # list of objects -->
54
40
  <% for object in objects %>
55
41
  <% if parent_class.nil? %>
@@ -59,12 +45,24 @@ they are @object. We need this magic here to rewrite all the @variables to varia
59
45
  <% css_class_id = parent_class.to_s.underscore + '_' + parent_id.to_s + '_' + attribute.to_s.singularize.underscore + "_" + object.id.to_s -%>
60
46
  <% path_to_object = attribute.to_s.singularize.underscore + "_path" %>
61
47
  <% end %>
62
- <li id="<%= css_class_id -%>" class="<%= cycle('odd', 'even') -%>" >
63
- <%= link_to_destroy(object, css_class_id) -%>
64
- <%= link_to h(object._presentation),
65
- send( path_to_object, object, :update => css_class_id),
66
- :remote => true -%>
67
- </li>
48
+ <div class="row <%= cycle('odd', 'even') %><%= " top-level" if parent_class.nil? %>" id="<%= css_class_id -%>">
49
+ <% if cancan_disabled? || ( can? :delete, object ) %>
50
+ <div class="small-1 column">
51
+ <%= link_to_destroy(object, css_class_id) -%>
52
+ </div>
53
+ <div class="small-11 column">
54
+ <%= link_to h(object._presentation),
55
+ send( path_to_object, object, :update => css_class_id),
56
+ :remote => true -%>
57
+ </div>
58
+ <% else %>
59
+ <div class="small-12 column">
60
+ <%= link_to h(object._presentation),
61
+ send( path_to_object, object, :update => css_class_id),
62
+ :remote => true -%>
63
+ </div>
64
+ <% end %>
65
+ </div>
68
66
  <% end -%>
69
67
  <!-- # pagination -->
70
68
  <% if parent_id.nil? -%>
@@ -72,5 +70,11 @@ they are @object. We need this magic here to rewrite all the @variables to varia
72
70
  <% else %>
73
71
  <% pagination = will_paginate objects, :remote => true, :params => {:controller => attribute, :action => :index, :id => nil, :parent_class => parent_class, :parent_id => parent_id, :update => "#{parent_class.to_s.underscore}_#{parent_id}_#{attribute}", :ul_needed => true } -%>
74
72
  <% end %>
75
- <%= raw "<li class=\"#{cycle('odd', 'even')}\">" + pagination + "</li>" if pagination -%>
76
- <%= raw "</ul>" if ul_needed -%>
73
+ <% if pagination %>
74
+ <div class="row <%= cycle('odd', 'even') %>">
75
+ <div class='small-11 small-centered column'>
76
+ <%= raw pagination %>
77
+ </div>
78
+ </div>
79
+ <% end %>
80
+ <%= raw "</div>" if ul_needed -%>
@@ -1,72 +1,64 @@
1
- <li id="newnew">
1
+ <div class="new_record"">
2
2
  <% flash.each do |key, value| %>
3
3
  <div id="flash" class="flash <%= key %>">
4
4
  <ul>
5
5
  <% value.each do |m| %>
6
- <li><%= m %></li>
6
+ <li>
7
+ <%= m %>
8
+ </li>
7
9
  <% end %>
8
10
  </ul>
9
11
  </div>
10
12
  <% end %>
11
- <script type="text/javascript">
12
- $(function() { $("#flash").delay(1000).fadeTo('slow', 0.33); } );
13
- </script>
14
- <%= form_tag send(@Klass.to_s.underscore.pluralize + '_path', :update => @update_span,
15
- :parent_class => @parent_class,
16
- :parent_id => @parent_id ),
17
- :multipart => true, :remote => true, :class => "edit_form" do -%>
18
- <div class="edit_form_field">
19
- <table cellspacing="0" cellpadding="0">
20
- <tr>
21
- <th colspan="2" valign="top">
22
- <div class="object_presentation" >
23
- <%= t('inline_forms.view.add_new', :model => @Klass.model_name.human ) -%>
13
+
14
+ <div class="row" >
15
+ <div class="large-12 column object_presentation" >
16
+ <%= t('inline_forms.view.add_new', :model => @Klass.model_name.human ) -%>
17
+ </div>
18
+ </div>
19
+
20
+ <%= form_tag send(@Klass.to_s.underscore.pluralize + '_path', :update => @update_span,
21
+ :parent_class => @parent_class,
22
+ :parent_id => @parent_id ),
23
+ :multipart => true, :remote => true, :class => "edit_form" do -%>
24
+ <% attributes = @inline_forms_attribute_list || @object.inline_forms_attribute_list -%>
25
+ <% attributes.each do | attribute, name, form_element | -%>
26
+ <% unless form_element.to_sym == :associated || form_element.to_sym == :tree || (cancan_enabled? && cannot?(:read, @Klass.to_s.underscore.pluralize.to_sym, attribute)) -%>
27
+ <% css_class_id = "attribute_#{attribute}_#{@object.id}" -%>
28
+ <% if form_element == :header %>
29
+ <div class="row form_element_header" >
30
+ <div class='large-12 column<%= " attribute_name attribute_#{attribute} form_element_#{form_element}" -%>' >
31
+ <%= @object.class.human_attribute_name(attribute) -%>
32
+ </div>
33
+ </div>
34
+ <% else %>
35
+ <div class="row <%= cycle('odd', 'even') %>">
36
+ <div class='medium-5 large-5 column' >
37
+ <%= @object.class.human_attribute_name(attribute) -%>
24
38
  </div>
25
- </th>
26
- </tr>
27
- <% attributes = @inline_forms_attribute_list || @object.inline_forms_attribute_list -%>
28
- <% attributes.each do | attribute, name, form_element | -%>
29
- <% unless form_element.to_sym == :associated || (cancan_enabled? && cannot?(:read, @Klass.to_s.underscore.pluralize.to_sym, attribute)) -%>
30
- <% css_class_id = "attribute_#{attribute}_#{@object.id}" -%>
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 -%>
55
- <% end -%>
39
+ <div class='medium-7 large-7 column' >
40
+ <span id="<%= css_class_id -%>" > <%= send("#{form_element}_edit", @object, attribute) -%> </span>
41
+ </div>
42
+ </div>
56
43
  <% end -%>
57
- </table>
44
+ <% end -%>
45
+ <% end -%>
46
+ <div class="row <%= cycle('odd', 'even') %>">
47
+ <div class='medium-1 large-1 column'>
48
+ &nbsp;
49
+ </div>
50
+ <div class='small-11 column' >
51
+ <%= link_to( send(@Klass.to_s.underscore.pluralize + '_path', :update => @update_span,
52
+ :parent_class => @parent_class,
53
+ :parent_id => @parent_id,
54
+ :ul_needed => true ),
55
+ :remote => true,
56
+ ) do -%>
57
+ <input type="button" name="cancel" value="cancel" class="button alert" />
58
+ <% end %>
59
+ <%= submit_tag "ok", :class => "button "-%>
60
+ </div>
58
61
  </div>
59
- <%= link_to( send(@Klass.to_s.underscore.pluralize + '_path', :update => @update_span,
60
- :parent_class => @parent_class,
61
- :parent_id => @parent_id ),
62
- :remote => true,
63
- :class => "edit_form_cancel" ) do %>
64
- <input type="button" name="cancel" value="cancel" />
65
- <% end %>
66
- <%= submit_tag "ok", :class => "edit_form_submit"-%>
67
- <div style="clear: both;"></div>
62
+ <div class="row record_footer"></div>
68
63
  <% end %>
69
- </li>
70
- <script type="text/javascript">
71
- $(function() { $("#newnew").slideDown(4000); } );
72
- </script>
64
+ </div>