links on message page (back to list, reply, forward)

This commit is contained in:
Eugene Korbut 2009-02-08 06:06:12 +10:00
parent a997c9d97a
commit 9c9ccc429d
4 changed files with 11 additions and 10 deletions

1
.gitignore vendored
View file

@ -3,3 +3,4 @@ config/database.yml
.*.sw? .*.sw?
config/site.rb config/site.rb
tmp tmp
mail_temp

View file

@ -124,7 +124,7 @@ class WebmailController < ApplicationController
@mail = prepare_mail @mail = prepare_mail
@mail.reply(@tmail, fb, get_mail_prefs.mail_type) @mail.reply(@tmail, fb, get_mail_prefs.mail_type)
render_action("compose") render :action => 'compose'
end end
def forward def forward
@ -136,7 +136,7 @@ class WebmailController < ApplicationController
@mail = prepare_mail @mail = prepare_mail
@mail.forward(@tmail, fb) @mail.forward(@tmail, fb)
render_action("compose") render :action => 'compose'
end end
def compose def compose

View file

@ -30,7 +30,7 @@
<div id="topmenu"> <div id="topmenu">
<ul class="actionmenu"> <ul class="actionmenu">
<li> <li>
<%= link_to(_("&#171; Back to list"), :controller=>"/webmail/webmail", :action=>"messages") %> <%= link_to(_("&#171; Back to list"), :controller=>"webmail", :action=>"messages") %>
</li> </li>
<li><%=link_reply_to_sender(@msg_id)%></li> <li><%=link_reply_to_sender(@msg_id)%></li>
<li><%=link_forward_message(@msg_id)%></li> <li><%=link_forward_message(@msg_id)%></li>

View file

@ -140,13 +140,13 @@ class CDF::Mail
end end
def reply(tmail, fb, type) def reply(tmail, fb, type)
decoded_subject = mime_encoded?(tmail.subject) ? mime_decode(tmail.subject) : tmail.subject decoded_subject = mime_encoded?(tmail.subject) ? mime_decode(tmail.subject) : tmail.subject
self.subject = "[Re: #{decoded_subject}]" self.subject = "Re: #{decoded_subject}"
tm = tmail.setup_reply(tmail) tm = tmail.create_reply
self.to = tm.to self.to = tm.to
footer = "" footer = ""
msg_id = "" msg_id = ""
mt = MailTransform.new mt = MailTransform.new
self.body = mt.get_body(tmail, type) self.body = mt.get_body(tmail, type)
end end