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:
Jean-Philippe Lang
2007-05-26 15:42:37 +00:00
parent 6446c312be
commit f8ef65e8f6
19 changed files with 183 additions and 56 deletions
+2 -8
View File
@@ -29,6 +29,8 @@ class IssuesController < ApplicationController
include IssueRelationsHelper
helper :watchers
include WatchersHelper
helper :attachments
include AttachmentsHelper
def show
@status_options = @issue.status.find_new_statuses_allowed_to(logged_in_user.role_for_project(@project), @issue.tracker) if logged_in_user
@@ -146,14 +148,6 @@ class IssuesController < ApplicationController
redirect_to :action => 'show', :id => @issue
end
# Send the file in stream mode
def download
@attachment = @issue.attachments.find(params[:attachment_id])
send_file @attachment.diskfile, :filename => @attachment.filename
rescue
render_404
end
private
def find_project
@issue = Issue.find(params[:id], :include => [:project, :tracker, :status, :author, :priority, :category])