@wuiDownloadButton(FILE, [LABEL], [TITLE], [MIMETYPE], [NAME], [BUTTONATTRS])

Inserts button to download a specific file.

The following parameters are recognized:

FILE

The path to the file to be downloaded.

[LABEL]

Optional label to appear on button.

[TITLE]

Optional title attribute to appear as a tooltip to the user when their mouse hovers over the button.

[MIMETYPE]

Optional mime type to associate with file to download.

[NAME]

Optional file name you want user to see (if omitted, we will take it from the PATH).

[BUTTONATTRS]

Optional set of attributes to apply to input button entity.

Example of using the macro:

<dt>@wuiDownloadFile("/etc/hosts")</dt>
<dd>Use this button to download the /etc/hosts file.</dd>

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")
<dt>@wuiDownloadFile("/etc/hosts")</dt>
<dd>Use this button to download the /etc/hosts file.</dd>
EOF

This macro is defined as:

<form @htmlAttr("action","@topDir()/cgi-bin/system/download.cgi")>
@wuiInputHidden("path","@param(0)")
@ifEqual("@param(3)","","","@wuiInputHidden("mimetype","@param(3)")")
@ifEqual("@param(4)","","","@wuiInputHidden("name","@param(4)")")
@wuiInputButton("download","@fnb("@param(1)","Download")","@fnb("@param(2)","@ttNSTFileViewer("@param(0)","calcDomTTLen('@param(0)', 60, 340, 1600)","@ttLine1px("@ttEmphasis("Download","false") the selected file to your @ttNote("local") system:")")")","@fnb("@param(5)","@htmlAttr("style","display: inline;")")")

</form>