Export a version as changelog text (#36679).

Patch by Mizuki ISHIKAWA.


git-svn-id: https://svn.redmine.org/redmine/trunk@22179 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2023-04-13 04:20:25 +00:00
parent cba427ec25
commit 2d7d01e633
5 changed files with 59 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ class VersionsController < ApplicationController
accept_api_auth :index, :show, :create, :update, :destroy
include VersionsHelper
helper :custom_fields
helper :projects
@@ -73,6 +74,9 @@ class VersionsController < ApplicationController
to_a
end
format.api
format.text do
send_data(version_to_text(@version), type: 'text/plain', filename: "#{@version.name}.txt")
end
end
end