@sourceFile(ABS_FILE_PATH, [DISP])

Inserts HTML to view contents of any source file (user can click to view).

The following parameters are recognized:

ABS_FILE_PATH

The absolute file path (on the system) or URL to the source file like: "/etc/hosts".

[DISP]

If you want to display something other than the ABS_FILE_PATH.

This macro inserts HTML into the page which will be DOM activated such that if the user clicks on the file name they will get to view the source code.

Example of using the macro:

@sourceFile("/etc/hosts")
@sourceFile("/etc/hosts","hosts")

Assuming the com.ccg.macros.at.All class is within your CLASSPATH and the config/html.at macros file has been generated (Hint: run make atmacros in the wui directory), a developer should be able to run the above example by copy/pasting from below:

[root@probe root]# java com.ccg.macros.at.All <<EOF
@include("config/html.at",,"d")

@sourceFile("/etc/hosts")
@sourceFile("/etc/hosts","hosts")

EOF

This macro is defined as:

<span@htmlAttr("class","sourceFile")@htmlAttr("title","@param(0)")>@fnb("@param(1)","@param(0)")</span>