<% if !@issue.blank? && (User.current.allowed_to?(:view_contacts, @project) || User.current.admin?) %>
<%= link_to_remote l(:button_add), :url => {:controller => 'contacts_tasks', :action => 'add', :project_id => @project, :issue_id => @issue} if User.current.allowed_to?({:controller => 'contacts_tasks', :action => 'add'}, @project) %>

<%= l(:label_contact_plural) %>

<% unless !(@show_form == "true") %> <% form_remote_tag( :url => {:controller => 'contacts_tasks', :action => 'add', :issue_id => @issue, :project_id => @project}, :method => :post, :html => {:id => 'add-contact-form'}) do |f| %>

<%= select_tag :contact_id, options_for_select(@project.contacts.sort!{|x, y| x.name <=> y.name }.collect {|m| [m.name, m.id]}), :prompt => "--- #{l(:actionview_instancetag_blank_option)} ---" %> <%= submit_tag l(:button_add) %> <%= toggle_link l(:button_cancel), 'add-contact-form'%>

<% end %> <% end %>
<% end %>