_subnavigation.html.haml revision 068c4812bb4a75942b62c2124ca1875525b3ac5c
- if can? :edit, resource
%ul.actions.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.ui-tabs.ui-widget.static
%ul{:class => 'ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all'}
- pages.each do |page, path, count|
%li{:class => 'ui-state-default ui-corner-top' << (page==current_page ? ' ui-tabs-selected ui-state-active' : '')}
%a{:href => url_for(path)}
= page.to_s.capitalize
- if count # hide counter if empty
%span{:style => count==0 && 'display:none'}= count
= format_links
%h3= current_page.to_s.capitalize