Project

General

Profile

add PDF-Link without history

Added by TheName ofMe about 11 years ago

Hi there
Im not a ruby(onrails) developer so it might be a very simple problem.

I want the to add a Link to an Issue to export it as PDF without the history.
I managed to deactivate the history on the existing PDF-Link but i want two links: 1 with history, 1 without history.

Redmine Version 1.2.1

my changes so far:
./app/views/issues/show.rhtml
line 113 changed, and added 1 line:
<%= f.link_to 'PDF' , {:show_history => 'true'} >
<
= f.link_to 'PDF' , {:show_history => 'false'} %>

./app/controllers/issues_controller.rb
line 121 added:
@show_history = params[:show_history] == 'true'
line 126 changed:
format.pdf { send_data(issue_to_pdf(@issue, @show_history) ... # added show_history

then in the ./lib/redmine/export/pdf.rb i have an if statement to check @show_history. My problem is the parameter isn't passed from show.rhtml to issues_conrtoller.rb
When i set the @show_history in the issues_controller.rb fixed to true or false it works.

would be very nice if someone has a tip for me

greez and by the way Redmine rocks :)