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 34 34: def to_html(args) 35: if args.nil? || (id = args['id']).nil? 36: error('rtp_report_id', 37: "Argument 'id' missing to specify the report to be used.") 38: return nil 39: end 40: unless (report = @project.report(id)) 41: error('rtp_report_unknown_id', "Unknown report #{id}") 42: return nil 43: end 44: 45: # The URL for interactive reports is different than for static reports. 46: if report.interactive? 47: # The project and report ID must be provided as query. 48: url = "taskjuggler?project=#{@project['projectid']};" + 49: "report=#{report.fullId}" 50: 51: if args['attributes'] 52: url += ";attributes=" + URLParameter.encode(args['attributes']) 53: end 54: else 55: # The report name just gets a '.html' extension. 56: url = report.name + ".html" 57: end 58: a = XMLElement.new('a', 'href'=> url) 59: a << XMLText.new(report.name) 60: a 61: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.