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/deals/bulk_edit.html.erb
2012-01-03 16:18:32 +00:00

81 lines
2.5 KiB
Plaintext

<h2><%= l(:label_bulk_edit_selected_deals) %></h2>
<div class="box" id="duplicates">
<ul>
<% @deals.each do |deal| %>
<li>
<%= avatar_to deal, :size => "16" %>
<%= link_to deal.full_name, polymorphic_url(deal) %>
<%= "(#{deal_price(deal)}) " unless deal.price.blank? %>
<% if deal.status %>
<span class="deal-status" style = <%= "background-color:#{deal.status.color_name};color:white;" %> >
<%= h deal.status %>
</span>
<% end %>
</li>
<% end %>
</ul>
</div>
<% form_tag(:action => 'bulk_update') do %>
<%= @deals.collect {|i| hidden_field_tag('ids[]', i.id)}.join %>
<div class="box tabular">
<fieldset class="attributes">
<legend><%= l(:label_change_properties) %></legend>
<% if @available_statuses.any? %>
<p>
<label><%= l(:field_status) %></label>
<%= select_tag('deal[status_id]', content_tag('option', l(:label_no_change_option), :value => '') +
options_from_collection_for_select(@available_statuses, :id, :name)) %>
</p>
<% end %>
<% if @available_categories.any? %>
<p>
<label><%= l(:field_category) %></label>
<%= select_tag('deal[category_id]', content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_none), :value => 'none') +
options_from_collection_for_select(@available_categories, :id, :name)) %>
</p>
<% end %>
<p>
<label><%= l(:label_assigned_to) %></label>
<%= select_tag('deal[assigned_to_id]', content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_nobody), :value => 'none') +
options_from_collection_for_select(@assignables, :id, :name)) %>
</p>
<p>
<label><%= l(:field_deal_currency) %></label>
<%= select_tag "deal[currency]", options_for_select(collection_for_currencies_select.insert(0, ['', '']), '') %>
</p>
<% @deals.first.custom_field_values.each do |value| %>
<p>
<% value.value = '' %>
<%= custom_field_tag_with_label :contact, value %>
</p>
<% end -%>
</fieldset>
<fieldset><legend><%= l(:field_notes) %></legend>
<%= text_area_tag 'note[content]', '', :cols => 60, :rows => 10, :class => 'wiki-edit' %>
<%= wikitoolbar_for 'note_content' %>
</fieldset>
</div>
<p><%= submit_tag l(:button_submit) %></p>
<% end %>
<% content_for :header_tags do %>
<%= javascript_include_tag :contacts, :plugin => 'redmine_contacts' %>
<%= stylesheet_link_tag :contacts, :plugin => 'redmine_contacts' %>
<% end %>