This class is a specialized RichTextFunctionHandler that generates a link to another report. It’s not available on all output formats.
Return a HTML tree for the report.
# File lib/RTFReportLink.rb, line 37 37: def to_html(args) 38: if args.nil? || (id = args['id']).nil? 39: error('rtp_report_id', 40: "Argument 'id' missing to specify the report to be used.") 41: return nil 42: end 43: unless (report = @project.report(id)) 44: error('rtp_report_unknown_id', "Unknown report #{id}") 45: return nil 46: end 47: 48: # The URL for interactive reports is different than for static reports. 49: if report.interactive? 50: # The project and report ID must be provided as query. 51: url = "taskjuggler?project=#{@project['projectid']};" + 52: "report=#{report.fullId}" 53: 54: if args['attributes'] 55: qEx = SimpleQueryExpander.new(args['attributes'], @query, 56: @project.messageHandler, 57: @sourceFileInfo) 58: url += ";attributes=" + URLParameter.encode(qEx.expand) 59: end 60: else 61: # The report name just gets a '.html' extension. 62: url = report.name + ".html" 63: end 64: a = XMLElement.new('a', 'href'=> url) 65: a << XMLText.new(report.name) 66: a 67: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.