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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user