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/taskjuggler/RichText/RTFReportLink.rb, line 25
25:     def initialize(project, sourceFileInfo = nil)
26:       @project = project
27:       super(project.messageHandler, 'reportlink', sourceFileInfo)
28:       @blockFunction = false
29:       @query = nil
30:     end

Public Instance Methods

to_html(args) click to toggle source

Return a HTML tree for the report.

    # File lib/taskjuggler/RichText/RTFReportLink.rb, line 38
38:     def to_html(args)
39:       if args.nil? || (id = args['id']).nil?
40:         error('rtp_report_id',
41:               "Argument 'id' missing to specify the report to be used.")
42:         return nil
43:       end
44:       unless (report = @project.report(id))
45:         error('rtp_report_unknown_id', "Unknown report #{id}")
46:         return nil
47:       end
48: 
49:       # The URL for interactive reports is different than for static reports.
50:       if report.interactive?
51:         # The project and report ID must be provided as query.
52:         url = "taskjuggler?project=#{@project['projectid']};" +
53:               "report=#{report.fullId}"
54: 
55:         if args['attributes']
56:           qEx = SimpleQueryExpander.new(args['attributes'], @query,
57:                                         @project.messageHandler,
58:                                         @sourceFileInfo)
59:           url += ";attributes=" + URLParameter.encode(qEx.expand)
60:         end
61:       else
62:         # The report name just gets a '.html' extension.
63:         url = report.name + ".html"
64:       end
65:       a = XMLElement.new('a', 'href'=> url)
66:       a << XMLText.new(report.name)
67:       a
68:     end
to_s(args) click to toggle source

Not supported for this function

    # File lib/taskjuggler/RichText/RTFReportLink.rb, line 33
33:     def to_s(args)
34:       ''
35:     end
to_tagged(args) click to toggle source

Not supported for this function.

    # File lib/taskjuggler/RichText/RTFReportLink.rb, line 71
71:     def to_tagged(args)
72:       nil
73:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.