Sha256: ad4bd837c31bbb595521401b18df7aca17200b56c387f5b7fbc294d036db5f12

Contents?: true

Size: 1.62 KB

Versions: 1

Compression:

Stored size: 1.62 KB

Contents

- user = link_to(activity.user.full_name, user_path(activity.user)) if activity.user

- subject = if (item = activity.related || activity.item)
  - if item.respond_to?(:full_name)
    - link_to item.full_name, polymorphic_url(item)

  - elsif [Account, Campaign, Contact, Lead, Opportunity].include?(item.class)
    - link_to item.name, polymorphic_url(item)

  - elsif item.respond_to?(:name)
    - content_tag :span, item.name, :style => "color:black;" # Individual tasks have no landing pages where we could link to.

- known_event = t('action_' + activity.event, :default => 0) != 0

- if (user.present? && subject.present?) || !known_event
  %li[activity]
    .tools
      %small
        = l(activity.created_at, :format => :short)
    %tt
      - if known_event
        - action = t('action_' + activity.event)
        - type = t('subject_' + activity.item_type.downcase)
        = link_to avatar_for(activity.user, :size => :thumb), user_path(activity.user)
        = t("activity_text", :user => h(user), :action => h(action), :type => h(type), :subject => h(subject), :default => "#{h user} #{h action} #{h type} #{h subject}").html_safe # locales optionally can change the word order for activities using 'activity_text'
        - if ((item = activity.item).class == Comment) and Setting.comments_visible_on_dashboard
          = t('action_create_comment', :comment => truncate(h(item.comment), :length => 90)).html_safe
      - else
        - type = t(activity.item_type.downcase)
        - if item.respond_to? :email
          = avatar_for(item, :size => "16x16")
        = type
        = subject
        = ":"
        = auto_link(t(activity.event))

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fat_free_crm-0.13.4 app/views/home/_activity.html.haml