Created
February 16, 2012 21:34
-
-
Save sfalsin/1848039 to your computer and use it in GitHub Desktop.
Marcio Sfalsin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ApplicationHelper | |
def link_to_submit(name, html_options={}) | |
link_to_function name, ";$(this).closest('form').submit()",html_options | |
end | |
def sub_nav_fixed(&block) | |
content_tag('header',content_tag('div',content_tag('ul',block.call,:class=>"nav nav-pills"),:class=>"subnav subnav-fixed"),:class=>"jumbotron subhead",:id=>"overview") | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= semantic_form_for @empresa do |f| %> | |
<%= render :partial=>'form', :locals=>{:f=>f} %> | |
<% sub_nav_fixed do %> | |
<li><%=link_to content_tag("b", "Empresa"), empresas_path %></li> | |
<li><%=link_to_submit content_tag("i", "",:class=>"icon-ok")<<" Salvar",:id=>"save"%></li> | |
<li><%=link_to content_tag("i", "",:class=>"icon-backward")<<' Cancelar', empresas_path,:id=>"cancel" %></li> | |
<li><%=link_to content_tag("i", "",:class=>"icon-minus")<<' Excluir', @empresa, :confirm => 'Deseja realmente excluir?', :method => :delete %></li> | |
<%end%> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment