Module: FlexaLib::Helpers::OtherHelpers
- Included in:
- FlexaLib::Helpers
- Defined in:
- lib/flexa_lib/helpers/other_helpers.rb
Instance Method Summary collapse
-
#flexa_column(size = "3", &block) ⇒ Object
OTHER_HELPERS.
-
#flexa_fixed_toolbar(title = "", path = "", &block) ⇒ Object
OTHER_HELPERS.
-
#flexa_flash_message ⇒ Object
OTHER_HELPERS.
-
#flexa_icon_text(icon, text) ⇒ Object
OTHER_HELPERS.
-
#flexa_page_title(title, path) ⇒ Object
OTHER_HELPERS.
-
#flexa_search_tool(class_ref) ⇒ Object
OTHER_HELPERS.
Instance Method Details
#flexa_column(size = "3", &block) ⇒ Object
OTHER_HELPERS
57 58 59 60 61 |
# File 'lib/flexa_lib/helpers/other_helpers.rb', line 57 def flexa_column(size="3",&block) content_tag :div, :class=>"span"+size.to_s do block.call end end |
#flexa_fixed_toolbar(title = "", path = "", &block) ⇒ Object
OTHER_HELPERS
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/flexa_lib/helpers/other_helpers.rb', line 45 def (title="",path="",&block) content_tag :header,:class=>"jumbotron subhead" do content_tag :div,:class=>"subnav subnav-fixed" do content_tag :ul,:class=>"nav nav-pills", :id=>"overview" do concat(flexa_page_title(title, path)) block.call end end end end |
#flexa_flash_message ⇒ Object
OTHER_HELPERS
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/flexa_lib/helpers/other_helpers.rb', line 33 def = "" css_class = {:notice => "success", :info => "info", :warning => "info", :error => "error"} [:notice, :info, :warning, :error].each {|type| if flash[type] += content_tag('div',flash[type],:class=>'alert alert-'<<css_class[type.to_sym]) end } raw end |
#flexa_icon_text(icon, text) ⇒ Object
OTHER_HELPERS
28 29 30 |
# File 'lib/flexa_lib/helpers/other_helpers.rb', line 28 def flexa_icon_text(icon,text) content_tag("i", "",:class=>"icon-"+icon)<<text end |
#flexa_page_title(title, path) ⇒ Object
OTHER_HELPERS
21 22 23 24 25 |
# File 'lib/flexa_lib/helpers/other_helpers.rb', line 21 def flexa_page_title(title, path) content_tag :li do link_to(content_tag("b", title), path) end end |
#flexa_search_tool(class_ref) ⇒ Object
OTHER_HELPERS
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/flexa_lib/helpers/other_helpers.rb', line 7 def flexa_search_tool(class_ref) class_name = class_ref.name.to_s.underscore content_tag :li do form_tag(send("#{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(content_tag("button",:type=>"submit",:class=>"btn btn-info",:style=>"margin-left:4px;",:id=>"search") do content_tag("i", "",:class=>"icon-search icon-white") end) end end end |