Sha256: 08ef43307155236c6d406a3ef1d1d0e02c958f58858c27ae34db0a23e6c33f67

Contents?: true

Size: 1.85 KB

Versions: 3

Compression:

Stored size: 1.85 KB

Contents

.conversations--table
  %table.bordered.data-table
    %thead
      %th.select-all.nosort
        .a
          = check_box_tag :select_all
          .n-selected -
      %th.leads leads
      %th.subject subject, preview
      %th.tags Tags
      %th.latest-at latest_at
    - convs.each_with_index do |conv, idx|
      %tr
        %td.select-all
          .gray= idx+1
          = check_box_tag 'conversation_ids[]', conv.id.to_s, nil, { class: 'i-sel' }
        %td.leads.mini
          -# - conv.from_emails.each do |from|
          -#   = link_to from, wco.lead_path( from )
          -# %hr
          - conv.leads.each do |lead|
            = link_to lead.email, wco.lead_path( lead )
        %td.subject
          - if conv.unread?
            <b>#{link_to conv.subject, wco_email.conversation_path(conv)}</b>
          - else
            = link_to conv.subject, wco_email.conversation_path(conv)
          <b>#{conv.messages.unread.length}</b> (#{conv.messages.length})
          - conv.messages.unread.each do |msg|
            .border-bottom
              .gray= msg.preview_str
              = render '/wco_email/contexts/form_reply_mini', lead_id: msg.lead_id, message: msg, ctx: WcoEmail::Context.new({ from_email: msg.to&.downcase, subject: msg.subject, email_template_id: ET.find_by( slug: 'blank').id })
          - if conv.messages.unread.blank?
            - msg = conv.messages.last
            .border-bottom
              .gray= msg.preview_str
              = render '/wco_email/contexts/form_reply_mini', lead_id: msg.lead_id, message: msg, ctx: WcoEmail::Context.new({ from_email: msg.to&.downcase, subject: msg.subject, email_template_id: ET.find_by( slug: 'blank').id })

        %td.tags.mini
          - conv.tags.each do |tag|
            .mb-1
              .Chip= tag.slug
        %td.latest-at
          = pp_date conv.latest_at
          = pp_time conv.latest_at

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wco_models-3.1.0.119 app/views/wco_email/conversations/_table.haml
wco_models-3.1.0.118 app/views/wco_email/conversations/_table.haml
wco_models-3.1.0.117 app/views/wco_email/conversations/_table.haml