fixes in draft folder

This commit is contained in:
Wojciech Todryk 2012-07-08 14:18:19 +02:00
parent 0a2bbed2a0
commit 11cd31cdee
4 changed files with 12 additions and 5 deletions

View file

@ -1,5 +1,9 @@
## Changes ## Changes
#### 0.9.2
* fixes in handling draft folder
#### 0.9.1 #### 0.9.1
* nowrap to edit column in contacts & links * nowrap to edit column in contacts & links

View file

@ -250,7 +250,7 @@ class MessagesOpsController < ApplicationController
flash[:error] = t(:general_error,:scope=>:internal) + " (" + e.class.name + " " + e.to_s + ")" flash[:error] = t(:general_error,:scope=>:internal) + " (" + e.class.name + " " + e.to_s + ")"
else else
@attachments.each do |filename| @attachments.each do |filename|
path = File.join(Rails.root,filename) path = File.join(Rails.root,filename[:name])
File.delete(path) if File.exist?(path) File.delete(path) if File.exist?(path)
end end
flash[:success] = t(:was_saved,:scope => :compose) flash[:success] = t(:was_saved,:scope => :compose)
@ -260,7 +260,10 @@ class MessagesOpsController < ApplicationController
#FIXME edit does not support attachments #FIXME edit does not support attachments
def edit def edit
old_message = @current_user.messages.where('folder_id = ? and uid = ?',@current_folder,params[:uids].first).first #logger.info @current_folder.inspect
#logger.info params.inspect
old_message = @current_user.messages.where('folder_id = ? and uid = ?',@current_folder,params[:id]).first
@message = Message.new @message = Message.new
@message.to_addr = old_message.to_addr @message.to_addr = old_message.to_addr
@message.subject = old_message.subject @message.subject = old_message.subject

View file

@ -15,13 +15,13 @@
%td{:class=>"field_name"} %td{:class=>"field_name"}
= humanize_attr(@message,'cc_addr') + ':' = humanize_attr(@message,'cc_addr') + ':'
%td %td
= @cc.join('; ') = address_formatter(@cc,:show)
- if not @bcc.nil? - if not @bcc.nil?
%tr %tr
%td{:class=>"field_name"} %td{:class=>"field_name"}
= humanize_attr(@message,'bcc_addr') + ':' = humanize_attr(@message,'bcc_addr') + ':'
%td %td
= @bcc.join('; ') = address_formatter(@bcc,:show)
%tr %tr
%td{:class=>"field_name"} %td{:class=>"field_name"}
= humanize_attr(@message,'subject') + ':' = humanize_attr(@message,'subject') + ':'

View file

@ -1,4 +1,4 @@
version: 0.9.1 version: 0.9.2
theme: olive theme: olive
locale: pl locale: pl