<%= link_to l(:label_department_new), {:controller => 'departments', :action => 'new'}, :class => 'icon icon-add' if User.current.allowed_people_to?(:edit_departments) %>

<%=l(:label_department_plural)%>

<% if @departments.any? %>
<% if User.current.allowed_people_to?(:edit_departments) %> <% end %> <% department_tree(@departments) do |department, level| %> <%= department.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>"> <% if User.current.allowed_people_to?(:edit_departments) %> <% end %> <% end %>
<%=l(:label_department)%> <%=l(:label_department_head)%>
<%= link_to department, department_path(department) %> <%= link_to_user(department.head) %> <%= link_to(l(:button_delete), department_path(department), :method => :delete, :class => 'icon icon-del') %>
<% else %>

<%= l(:label_no_data) %>

<% end %>