Sha256: d9cb41ffec3f7e32dfa41dc32f00ed5259ee61bb4df37130ac930f527829a066

Contents?: true

Size: 1.18 KB

Versions: 12

Compression:

Stored size: 1.18 KB

Contents

- truncated = truncate(email.body_without_textile.to_s.gsub("\n", " "), :length => 125 - email.subject.to_s.size)
- formatted = email.body
- 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: ".html_safe << email.sent_to
        - else
          = "To ".html_safe << link_to_email(email.sent_to)
        = "from ".html_safe << link_to_email(email.sent_from) << ", sent on ".html_safe
        = l(email.sent_at, :format => :mmddhhss)
        = " | ".html_safe + 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).html_safe

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

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
fat_free_crm-0.13.3 app/views/emails/_email.html.haml
fat_free_crm-0.13.2 app/views/emails/_email.html.haml
fat_free_crm-0.12.3 app/views/emails/_email.html.haml
fat_free_crm-0.12.2 app/views/emails/_email.html.haml
fat_free_crm-0.13.1 app/views/emails/_email.html.haml
fat_free_crm-0.12.1 app/views/emails/_email.html.haml
fat_free_crm-0.13.0 app/views/emails/_email.html.haml
fat_free_crm-0.12.0 app/views/emails/_email.html.haml
fat_free_crm-0.11.4 app/views/emails/_email.html.haml
fat_free_crm-0.11.3 app/views/emails/_email.html.haml
fat_free_crm-0.11.2 app/views/emails/_email.html.haml
fat_free_crm-0.11.1 app/views/emails/_email.html.haml