Class Index [+]

Quicksearch

TaskJuggler::RTFReportLink

This class is a specialized RichTextFunctionHandler that generates a link to another report. It’s not available on all output formats.

Public Class Methods

new(project, sourceFileInfo = nil) click to toggle source
    # File lib/RTFReportLink.rb, line 23
23:     def initialize(project, sourceFileInfo = nil)
24:       super(project, 'reportlink', sourceFileInfo)
25:       @blockFunction = false
26:     end

Public Instance Methods

to_html(args) click to toggle source

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
to_s(args) click to toggle source

Not supported for this function

    # File lib/RTFReportLink.rb, line 29
29:     def to_s(args)
30:       ''
31:     end
to_tagged(args) click to toggle source

Not supported for this function.

    # File lib/RTFReportLink.rb, line 64
64:     def to_tagged(args)
65:       nil
66:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.