Sha256: 8ee440d99f6b0d256d72d8e9b997106a0bd1da2a7bf5ea2ad884d1fb126c5b55

Contents?: true

Size: 1.75 KB

Versions: 1

Compression:

Stored size: 1.75 KB

Contents

.actions.top
  - if resource.persisted?
    - if resource.lead?
      = link_to 'Back to Leads', leads_path
    - else
      = link_to_destroy_resource(resource, :remote => false)

.field
  = f.label :name, nil, :class => :req
  = f.text_field :name
.field.select
  = f.label :category
  = f.select :category, MenuOption.options_for('Deal Category'), :include_blank => 'No Category'
.field
  = help_label(f, :info, :key => :markdown_help, :header => 'Markdown Help')
  = f.text_area :info
.field
  = f.label :value, nil, :class => :req
  = f.text_field :value
.field.select
  = f.label :campaign, :for => 'deal_campaign_select'
  = f.collection_select :campaign_id, Campaign.ordered.all, :id, :to_s, {:prompt => true}, :id => 'deal_campaign_select'
.field.select
  = f.label :status
  = f.select :status, Deal::Status::OPTIONS[1..-1]
.field.select
  = f.label :contacts
  %input#contact_autocomplete.list{:type => 'text', 'data-values' => resource.contact_ids.join(','), 'data-iname' => resource_instance_name, 'data-field' => '[contact_ids]', :id => 'deal_contacts'}
  %ul.select
    - f.object.contacts.each do |contact|
      %li.ui-state-default
        %span.content= contact.name
        %input{:type => :hidden, :name => "contact[contact_ids][]", :value => contact.id}
        %a{:class => :remove, :title => "Remove", :alt => "Remove"} Remove
.field.select
  = f.label :owner
  = f.select :contact_id, deal_contacts_array, { :prompt => true }, :id => :deal_owner 
.field
  Created At:
  = l(resource.created_at)
.field
  Closed At:
  = resource.closed_at ? l(resource.closed_at) : 'n/a'
.field
  Campaign Cost:
  = resource.campaign.try(:cost) || 0
.field
  Campaign Deal Count:
  = resource.campaign ? resource.campaign.non_leads.count : 0
.field
  Cost:
  = deal_cost(resource)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
e9_crm-0.1.17 app/views/e9_crm/deals/_form_inner.html.haml