2016-02-18 11:00:03 +01:00
|
|
|
- if pagination
|
|
|
|
- if Message.pub.count > 20
|
|
|
|
= items_per_page
|
|
|
|
= pagination_links_remote message_threads
|
|
|
|
|
|
|
|
- unless message_threads.empty?
|
|
|
|
%table.table.table-striped
|
2016-03-04 17:24:28 +01:00
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th= heading_helper Message, :subject
|
|
|
|
%th= t '.started_at'
|
|
|
|
%th= t '.started_by'
|
|
|
|
%th= t '.last_reply_at'
|
|
|
|
%th= t '.last_reply_by'
|
2016-02-18 11:00:03 +01:00
|
|
|
%tbody
|
|
|
|
- for message in message_threads
|
|
|
|
%tr
|
|
|
|
%td
|
2016-03-04 17:24:28 +01:00
|
|
|
%b= link_to message.subject, thread_message_path(message)
|
|
|
|
%td= format_time message.created_at
|
|
|
|
%td= show_user message.sender
|
2016-02-18 11:00:03 +01:00
|
|
|
- if message.last_reply
|
2016-03-04 17:24:28 +01:00
|
|
|
%td= format_time message.last_reply.created_at
|
|
|
|
%td= show_user message.last_reply.sender
|
2016-02-18 11:00:03 +01:00
|
|
|
- else
|
|
|
|
%td{:colspan => "2"}
|
|
|
|
// %td= link_to t('.reply'), new_message_path(:message => {:reply_to => message.id}), class: 'btn'
|