app/views/e9_crm/contacts/show.html.haml in e9_crm-0.1.20 vs app/views/e9_crm/contacts/show.html.haml in e9_crm-0.1.21
- old
+ new
@@ -34,35 +34,50 @@
%h2
%span.contact-subheader Deals
%span.contact-actions
= link_to_new_resource(Deal, :deal => { :contact_ids => [resource.id] })
- %ul
- - if (deals = resource.associated_deals.leads(false).limit(5)).blank?
- %li= resource_humanize(:no_deals)
- - else
- - deals.each do |deal|
- %li
- .contact-deal-status
- = deal.status
- .contact-deal-name
- = link_to deal.name, deal
- .contact-deal-value
- = deal.value
+ %table
+ %thead
+ %tr
+ %th= Deal.human_attribute_name(:status)
+ %th= Deal.human_attribute_name(:name)
+ %th= Deal.human_attribute_name(:value)
+ %tbody
+ - if (deals = resource.associated_deals.leads(false)).blank?
+ %tr
+ %td{:colspan => 3}= resource_humanize(:no_deals)
+ - else
+ - deals.each do |deal|
+ %tr
+ %td.contact-deal-name
+ = link_to deal.name, deal
+ %td.contact-deal-status
+ = deal.status
+ %td.contact-deal-value
+ = deal.value
+
.contact.leads
%h2
%span.contact-subheader Leads
- %ul
- - if (leads = resource.associated_deals.leads.limit(5)).blank?
- %li= resource_humanize(:no_leads)
- - else
- - leads.each do |lead|
- %li
- .contact-lead-created-at
- = l(lead.created_at)
- .contact-lead-name
- = link_to lead.offer_name, edit_deal_path(lead)
+ %table
+ %thead
+ %tr
+ %th= Deal.human_attribute_name(:created_at)
+ %th= Deal.human_attribute_name(:offer_name)
+
+ %tbody
+ - if (leads = resource.associated_deals.leads).blank?
+ %tr
+ %td{:colspan => 2}= resource_humanize(:no_leads)
+ - else
+ - leads.each do |lead|
+ %tr
+ %td.contact-lead-name
+ = link_to lead.offer_name, edit_deal_path(lead)
+ %td.contact-lead-created-at
+ = l(lead.created_at)
.contact-sidebar
= render 'sidebar'