<% replace_watcher ||= 'watcher' %> <%= watcher_tag(@contract, User.current, {:id => replace_watcher, :replace => ['watcher','watcher2']}) %> <%= link_to_if_authorized l(:button_edit), {:controller => 'contracts', :action => 'edit', :id => @contract}, :class => 'icon icon-edit' unless @contract.nil? %> <%= link_to_if_authorized l(:button_delete), {:controller => 'contracts', :action => 'destroy', :id => @contract}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' unless @contract.nil? %>

<%= "#{l(:label_contract)} ##{@contract.id}" %>

<% if !@contract.price.blank? %> <% end %>
<%= avatar_to(@contract, :size => "64") %>

<%= h @contract.contact.name + ": " if @contract.contact %> <%= @contract.name %>

<%= h @contract.category %>

<% if @contract.status && @project.contract_statuses.any? %>
> <%= h @contract.status %> <% if authorize_for('contracts', 'edit') %> <%= link_to l(:label_contract_change_status), {}, :onclick => "Element.show('edit_status_form'); Element.hide('contract-status'); return false;", :id => 'edit_status_link' %> <% end %>
<% form_tag( {:controller => 'contracts', :action => 'update', :project_id => @project, :id => @contract }, :multipart => true, :id => "edit_status_form", :style => "display:none; size: 100%" ) do %> <%= select :contract, :status_id, options_for_select(collection_for_status_select, @contract.status_id.to_s), { :include_blank => false } %> <%= submit_tag l(:button_save) %> <%= link_to l(:button_cancel), {}, :onclick => "Element.hide('edit_status_form'); Element.show('contract-status'); return false;" %>
<% end %> <% end %>
  • <%= contract_price(@contract) %>
<% if authorize_for('notes', 'add_note') %>
<%= render :partial => 'notes/add', :locals => {:note_source => @contract} %> <% end %>

<%= l(:label_note_plural) %>

<%= render :partial => 'notes/note_item', :collection => @contract.notes, :locals => {:note_source => @contract} %>
<% content_for :sidebar do %> <%= render :partial => 'common/sidebar' %> <%= render :partial => 'attributes' %> <%= render :partial => 'common/responsible_user', :object => @contract %> <%= render :partial => 'contract_contacts/contacts' %> <%= render :partial => 'common/notes_attachments', :object => @contract_attachments %> <% if !@contract.background.blank? %>

<%= l(:label_contact_background_info) %>

<%= textilizable(@contract, :background) %>
<% end %> <%= render :partial => 'common/recently_viewed' %> <% end %> <% html_title "#{l(:label_contract)} ##{@contract.id}: #{@contract.name}" %> <% content_for :header_tags do %> <%= javascript_include_tag :defaults %> <%= javascript_include_tag :contacts, :plugin => 'redmine_contacts' %> <%= stylesheet_link_tag :contacts, :plugin => 'redmine_contacts' %> <%= stylesheet_link_tag :contacts_sidebar, :plugin => 'redmine_contacts' %> <% end %>