This repository has been archived on 2024-12-01. You can view files and clone it, but cannot push or open issues or pull requests.
redmine_rodax_crm/app/views/contacts_projects/_related.html.erb
2012-01-03 16:18:32 +00:00

31 lines
1.2 KiB
Plaintext

<div id="contact_projects">
<div class="contextual">
<%= link_to_remote(l(:button_add),
:url => {:controller => 'contacts_projects',
:action => 'add',
:project_id => @project,
:contact_id => @contact}) if authorize_for(:contacts, :edit) %>
</div>
<h3><%= l(:label_project_plural) %> </h3>
<% unless !(@show_form == "true") %>
<% form_remote_tag(:url => {:controller => 'contacts_projects',
:action => 'add',
:contact_id => @contact,
:project_id => @project},
:method => :post,
:html => {:id => 'add-project-form'}) do %>
<p><%= select_tag :new_project_id, project_tree_options_for_select(Project.visible.has_module(:contacts_module).find(:all, :order => 'lft')), :prompt => "--- #{l(:actionview_instancetag_blank_option)} ---" %>
<%= submit_tag l(:button_add) %>
<%= toggle_link l(:button_cancel), 'add-project-form'%></p>
<% end %>
<% end %>
<%= render_contact_projects_hierarchy @contact.projects %>
</div>