Improve message threads (by @paroga)

This commit is contained in:
wvengen 2016-03-04 17:24:28 +01:00
parent 673448a5ac
commit 6b32d0c960
13 changed files with 89 additions and 27 deletions

View file

@ -1,16 +1,7 @@
- if @messages.first.group
- title @messages.first.subject + ' (' + @messages.first.group.name + ')'
- if @group.nil?
- title t '.other'
- else
- title @messages.first.subject
- title @group.name
- for message in @messages
.panel.panel-default{:style => "width:40em"}
.panel-heading
%b= h(message.sender_name)
= format_time(message.created_at)
.panel-body= simple_format(h(message.body))
%p
= link_to t('.reply'), new_message_path(:message => {:reply_to => @messages.first.id}), class: 'btn'
|
= link_to t('.all_message_threads'), message_threads_path
#message_threads
= render 'message_threads', message_threads: @message_threads, pagination: true