Sha256: 5a3cac7759418cdcea870a2c3833173a7dc7e0c5b4e7c92600bd6dbc040dd6ea

Contents?: true

Size: 1.15 KB

Versions: 4

Compression:

Stored size: 1.15 KB

Contents

- truncated = truncate(email.body_inline, :length => 125 - email.subject.to_s.size)
- formatted = email.body_html
- mediator = email.mediator

%li.mail.highlight[email]
  .body
    = link_to avatar_for(email.user, :size => :small), user_path(email.user)
    %ul.tools
      - if can?(:destroy, mediator)
        %li= link_to_delete(email)

    - if can?(:read, mediator)
      %tt
        - if email.sent_to.to_s.include?(", ")
          = "To: "
          = email.sent_to
        - else
          = "To "
          = link_to_email(email.sent_to)
        = "from "
        = link_to_email(email.sent_from)
        = ", sent on "
        = l(email.sent_at, :format => :mmddhhss) << " | "
        = link_to_function(email.collapsed? ? t(:more) : t(:less), "crm.flip_note_or_email(this, '#{t(:more)}', '#{t(:less)}')", :class => "toggle")

      %dt{ hidden_if(email.expanded?), :id => dom_id(email, :truncated) }
        %p
          = h(email.subject)
          %tt
            = " - "
            = truncated

      %dt.textile{ hidden_if(email.collapsed?), :id => dom_id(email, :formatted) }
        .email_content
          %p= h(email.subject)
          = auto_link(formatted)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fat_free_crm-0.16.4 app/views/emails/_email.html.haml
fat_free_crm-0.16.3 app/views/emails/_email.html.haml
fat_free_crm-0.16.2 app/views/emails/_email.html.haml
fat_free_crm-0.16.1 app/views/emails/_email.html.haml