Sha256: 9591112064bdec80a8f45d778da6c288078d943acdc4c6a073b2c6bd01829898

Contents?: true

Size: 1.96 KB

Versions: 3

Compression:

Stored size: 1.96 KB

Contents

%li.highlight[opportunity]
  - if opportunity.stage
    .strip{:class => opportunity.stage}= t(opportunity.stage)
  - else
    .strip.white #{t :other}

  .indent
    = link_to(h(opportunity.name), opportunity)
    - if opportunity.account
      == #{t :from} #{link_to(h(opportunity.account.name), account_path(opportunity.account))}
    %tt
      –
      - user_name = opportunity.user.try(:full_name)
      - if user_name
        = t(:added_by, :time_ago => timeago(opportunity.created_at), :user => h(user_name)).html_safe
      - else
        = t(:added_ago, :value => timeago(opportunity.created_at)).html_safe
    - unless current_user.preference[:opportunities_index_view] == "opportunities_index_brief"
      %dt
        %b= number_to_currency(opportunity.weighted_amount, :precision => 0) + " | "
        - won_or_lost = %w(won lost).include?(opportunity.stage)
        - unless won_or_lost
          = t(:probability_number, (opportunity.probability || 0).to_s + '%') + " | "
        - if opportunity.closes_on
          - if won_or_lost
            - if opportunity.closes_on >= Date.today
              = t(:closing_date, l(opportunity.closes_on, :format => :mmddyy))
            - else
              = t(:closed_ago_on, :time_ago => distance_of_time_in_words(opportunity.closes_on, Date.today), :date => l(opportunity.closes_on, :format => :mmddyy))
          - elsif opportunity.closes_on > Date.today
            = t(:expected_to_close,  :time => distance_of_time_in_words(Date.today, opportunity.closes_on), :date => l(opportunity.closes_on, :format => :mmddyy))
          - elsif opportunity.closes_on == Date.today
            %span.warn= t(:closes_today)
          - else
            %span.warn= t(:past_due, distance_of_time_in_words(opportunity.closes_on, Date.today))
        - else
          = t(:no_closing_date)
      - if opportunity.tags.any?
        %dt
          .tags= tags_for_dashboard(opportunity)
      = hook(:opportunity_bottom, self, :opportunity => opportunity)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fat_free_crm-0.13.6 app/views/home/_opportunity.html.haml
fat_free_crm-0.13.5 app/views/home/_opportunity.html.haml
fat_free_crm-0.13.4 app/views/home/_opportunity.html.haml