app/views/home/_opportunity.html.haml
%li.highlight[opportunity]
- if opportunity.stage
.strip{class: opportunity.stage}= t(opportunity.stage)
- else
.strip.other #{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
= opportunity_revenue_message(opportunity)
- if opportunity.tags.present?
%dt
.tags= tags_for_dashboard(opportunity)
= hook(:opportunity_bottom, self, opportunity: opportunity)