Sha256: 44f8efc8c1597a1f202aefaf7236c4698377cab90cf216f88081075937394101

Contents?: true

Size: 1.96 KB

Versions: 15

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.present?
        %dt
          .tags= tags_for_dashboard(opportunity)
      = hook(:opportunity_bottom, self, :opportunity => opportunity)

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
fat_free_crm-0.14.2 app/views/home/_opportunity.html.haml
fat_free_crm-0.15.2 app/views/home/_opportunity.html.haml
fat_free_crm-0.16.4 app/views/home/_opportunity.html.haml
fat_free_crm-0.14.1 app/views/home/_opportunity.html.haml
fat_free_crm-0.15.1 app/views/home/_opportunity.html.haml
fat_free_crm-0.16.3 app/views/home/_opportunity.html.haml
fat_free_crm-0.16.2 app/views/home/_opportunity.html.haml
fat_free_crm-0.16.1 app/views/home/_opportunity.html.haml
fat_free_crm-0.16.0 app/views/home/_opportunity.html.haml
fat_free_crm-0.15.0 app/views/home/_opportunity.html.haml
fat_free_crm-0.15.0.beta.2 app/views/home/_opportunity.html.haml
fat_free_crm-0.15.0.beta app/views/home/_opportunity.html.haml
fat_free_crm-0.14.0 app/views/home/_opportunity.html.haml
reduced_fat_crm-0.15.0.beta app/views/home/_opportunity.html.haml
reduced_fat_crm-0.14.0 app/views/home/_opportunity.html.haml