Streamlined 1.0 hacks: add help text to forms.
Posted by Sandro Paganotti in
Ruby on Rails -
1 comment
I’ve created a small Streamlined hack that let you implement a :help option while defining ‘user columns’, here’s a sample:
:title, {
:human_name => "Book title",
:help => "Please specify the title of the book you're reading."
}
and this is the result (for ‘edit’ and ‘new’ views):

Instructions:
Here you’ll find what to change in the plugin:
# in /lib/streamlined/column/base.rb
# around line 9
attr_accessor :human_name, :link_to, :popup, :parent_model, :wrapper, :additional_column_pairs,
:additional_includes, :filter_column, :help
# around line 196
x.td(:class => 'sl_edit_value') do
x << render_td(view, item)
if(!help.nil?)
x.p{ x << help }
end
end
Hope you’ll find useful.
Sandro


Comments
Matthew Bass
Posted on June 24