<h3><%= l(:label_crm_deal_category_plural) %></h3>

<% if @project.deal_categories.any? %>

<table class="list">
	<thead><tr>
	<th><%= l(:field_name) %></th>
	<th></th>
	</tr></thead>
	<tbody>
<% for category in @project.deal_categories %>
	<% unless category.new_record? %>
	<tr class="<%= cycle 'odd', 'even' %>">
	<td class="name"><%=  category.name %></td>
    <td class="buttons">
      <% if User.current.allowed_to?(:manage_deals, @project) %>
        <%= link_to l(:button_edit), edit_deal_category_path(category), :class => 'icon icon-edit' %>
        <%= delete_link deal_category_path(category) %>
      <% end %>
    </td>
	</tr>
	<% end %>
<% end %>
    </tbody>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>

<p><%= link_to_if_authorized l(:label_crm_deal_category_new), :controller => 'deal_categories', :action => 'new', :project_id => @project %></p>

<%= render :partial => "projects/deal_statuses" %>
