Module: FlexaLib::Helpers::LookupHelpers

Included in:
FlexaLib::Helpers
Defined in:
lib/flexa_lib/helpers/lookup_helpers.rb

Instance Method Summary collapse

Instance Method Details

#flexa_lookup_search_tool(class_ref) ⇒ Object

LOOKUP_HELPERS



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/flexa_lib/helpers/lookup_helpers.rb', line 6

def flexa_lookup_search_tool(class_ref)
  class_name = class_ref.name.to_s.underscore
   :li do
    form_tag(send("lookups_#{class_name.pluralize}_path"), :method=>"get", :id=>"formsearch", :style=>"padding-top:4px;padding-left:50px;",:class=>"form-search") do
      concat(hidden_field_tag :fill, params[:fill])
      concat(text_field_tag :search, params[:search], :class=>"input-medium search-query")
      concat(("button",:type=>"submit",:class=>"btn btn-info",:style=>"margin-left:4px;",:id=>"search") do
        ("i", "",:class=>"icon-search icon-white")
      end)
    end
  end
end