_subnavigation.html.haml revision 860ccc55684a5cbfed050ec17c6d9c145a8a9369
- if can? :edit, resource
- 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
- pages.each do |page, path, count|
%li{:class => (page==current_page ? 'active' : nil)}
%a{:href => url_for(path)}
- if count # hide counter if empty
%span.badge{:style => count==0 && 'display:none'}= count
= format_links