Column width for Issue To PDF Export via CustomQuery
Added by Tim Nüchel about 13 years ago
Hi Guys,
based on http://github.com/edavis10/question_plugin/blob/master/lib/question_query_patch.rb I implemented following code to get the description of an issue on the issuelist.
But the description is centered in its cell and the pdf export looks terrible. (Because of the centered view and the small column width).
Where should the cell-width and the text-format be configured?
Thank's for a hint!
redmine-1.2/lib/description_patch.rb
require_dependency 'query' module QueryPatch def self.included(base) # :nodoc: base.extend(ClassMethods) # Same as typing in the class base.class_eval do unloadable # Send unloadable so it will not be unloaded in development base.add_available_column(QueryColumn.new(:description)) end end module ClassMethods unless Query.respond_to?(:available_columns=) # Setter for +available_columns+ that isn't provided by the core. def available_columns=(v) self.available_columns = (v) end end unless Query.respond_to?(:add_available_column) # Method to add a column to the +available_columns+ that isn't provided by the core. def add_available_column(column) self.available_columns << (column) end end end end
redmine-1.2/config/initializer/description_patch.rb
require 'description_patch' Query.class_eval do include QueryPatch end