diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-05-26 15:42:37 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-05-26 15:42:37 +0000 |
commit | f8ef65e8f64111b5bfa45abd42e0e684afd61f07 (patch) | |
tree | f38d893e289b9eb42f7732eeb33c225b8379ad41 /app/controllers/messages_controller.rb | |
parent | 6446c312beab7e23162827a79bd9ab6f9e4d7958 (diff) | |
download | redmine-f8ef65e8f64111b5bfa45abd42e0e684afd61f07.tar.gz redmine-f8ef65e8f64111b5bfa45abd42e0e684afd61f07.zip |
Attachments can now be added to wiki pages (original patch by Pavol Murin). Only authorized users can add/delete attachments.
Attached images can be displayed inline, using textile image tag (for wiki pages, issue descriptions and forum messages).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@541 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/messages_controller.rb')
-rw-r--r-- | app/controllers/messages_controller.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 16a04097f..1b0d2a680 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -22,6 +22,9 @@ class MessagesController < ApplicationController verify :method => :post, :only => [ :reply, :destroy ], :redirect_to => { :action => :show } + helper :attachments + include AttachmentsHelper + def show @reply = Message.new(:subject => "RE: #{@message.subject}") render :action => "show", :layout => false if request.xhr? @@ -48,13 +51,6 @@ class MessagesController < ApplicationController redirect_to :action => 'show', :id => @message end - def download - @attachment = @message.attachments.find(params[:attachment_id]) - send_file @attachment.diskfile, :filename => @attachment.filename - rescue - render_404 - end - private def find_project @board = Board.find(params[:board_id], :include => :project) |