foodsoft/plugins/messages/app/views/message_threads/_message_threads.html.haml

28 lines
921 B
Text
Raw Normal View History

- if pagination
- if Message.readable_for(current_user).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'
%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
- 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
- else
%td{:colspan => "2"}
// %td= link_to t('.reply'), new_message_path(:message => {:reply_to => message.id}), class: 'btn'