_subnavigation.html.haml revision ff1cb52f98165f66c60e96a21b03ce5d838591d7
- if can? :edit, resource
%ul.actions.pull-right
- additional_actions.each do |action_link|
%li= action_link
%li= link_to 'Edit', [:edit, resource]
%li= link_to 'Delete', resource, :confirm => 'Really delete?', :method => :delete
%h2
= link_to resource, resource, 'data-type' => resource.class
%nav
%ul.nav.nav-tabs
- pages.each do |page, path, count|
%li{:class => (page==current_page ? 'active' : nil)}
%a{:href => url_for(path)}
= page.to_s.capitalize
- if count # hide counter if empty
%span.badge{:style => count==0 && 'display:none'}= count
= format_links
%h3= current_page.to_s.capitalize