Complete refactoring of messaging module. From now messages are saved only once and send afterwards via a the 'send_emails'-rake-task.

This commit is contained in:
Benjamin Meichsner 2009-01-15 18:26:37 +01:00
parent 6ce6c2c75a
commit e8d55e50c0
30 changed files with 220 additions and 349 deletions

View file

@ -1,28 +1,21 @@
%h1 Nachricht anzeigen
- title "Nachricht anzeigen"
%div{:style => "width:40em"}
- if @message
%table{:style => "width:25em"}
%tr
%td Von:
%td=h @message.system_message? ? 'FoodSoft' : @message.sender.nick
%tr
%td An:
%td=h @message.recipients
%tr
%td Betreff:
%td
%b=h @message.subject
%tr
%td Gesendet:
%td= format_time(@message.created_on)
%hr/
%p= simple_format(h(@message.body))
%hr/
%p
= link_to('Antworten', :action => 'reply', :id => @message) + ' | ' unless @message.system_message?
= link_to('Löschen', {:action => 'destroy', :id => @message}, :method => "post")
|
= link_to 'Nachrichteneingang', :action => 'inbox'
- else
%p Nachricht kann nicht angezeigt werden.
%table{:style => "width:25em"}
%tr
%td Von:
%td=h @message.sender_name
%tr
%td Betreff:
%td
%b=h @message.subject
%tr
%td Gesendet:
%td= format_time(@message.created_at)
%hr/
%p= simple_format(h(@message.body))
%hr/
%p
= link_to('Antworten', reply_message_path(@message))
|
= link_to 'Nachricht im Überblick', messages_path