Search in sources :

Example 1 with DownloadLinkImpl

use of org.olat.core.gui.components.form.flexible.impl.elements.DownloadLinkImpl in project OpenOLAT by OpenOLAT.

the class FormUIFactory method addDownloadLink.

/**
 * Add a download link
 * @param name
 * @param linkTitle
 * @param i18nLabel
 * @param file
 * @param formLayout
 * @return
 */
public DownloadLink addDownloadLink(String name, String linkTitle, String i18nLabel, VFSLeaf file, FormItemContainer formLayout) {
    DownloadLinkImpl fte = new DownloadLinkImpl(name);
    fte.setLinkText(linkTitle);
    fte.setDownloadItem(file);
    String css = CSSHelper.createFiletypeIconCssClassFor(file.getName());
    fte.setIconLeftCSS("o_icon o_icon-fw " + css);
    setLabelIfNotNull(i18nLabel, fte);
    if (formLayout != null) {
        formLayout.add(fte);
    }
    return fte;
}
Also used : DownloadLinkImpl(org.olat.core.gui.components.form.flexible.impl.elements.DownloadLinkImpl)

Example 2 with DownloadLinkImpl

use of org.olat.core.gui.components.form.flexible.impl.elements.DownloadLinkImpl in project OpenOLAT by OpenOLAT.

the class FormUIFactory method addDownloadLink.

/**
 * Add a download link
 * @param name
 * @param linkTitle
 * @param i18nLabel
 * @param file
 * @param formLayout
 * @return
 */
public DownloadLink addDownloadLink(String name, String linkTitle, String i18nLabel, VFSLeaf file, FlexiTableElement formLayout) {
    DownloadLinkImpl fte = new DownloadLinkImpl(name);
    fte.setLinkText(linkTitle);
    fte.setDownloadItem(file);
    String css = CSSHelper.createFiletypeIconCssClassFor(file.getName());
    fte.setIconLeftCSS("o_icon o_icon-fw " + css);
    setLabelIfNotNull(i18nLabel, fte);
    if (formLayout != null) {
        ((FlexiTableElementImpl) formLayout).addFormItem(fte);
    }
    return fte;
}
Also used : DownloadLinkImpl(org.olat.core.gui.components.form.flexible.impl.elements.DownloadLinkImpl) FlexiTableElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableElementImpl)

Example 3 with DownloadLinkImpl

use of org.olat.core.gui.components.form.flexible.impl.elements.DownloadLinkImpl in project openolat by klemens.

the class FormUIFactory method addDownloadLink.

public DownloadLink addDownloadLink(String name, String linkTitle, String i18nLabel, File file, FlexiTableElement formLayout) {
    DownloadLinkImpl fte = new DownloadLinkImpl(name);
    fte.setLinkText(linkTitle);
    fte.setDownloadItem(file);
    String css = CSSHelper.createFiletypeIconCssClassFor(file.getName());
    fte.setIconLeftCSS("o_icon o_icon-fw " + css);
    setLabelIfNotNull(i18nLabel, fte);
    if (formLayout != null) {
        ((FlexiTableElementImpl) formLayout).addFormItem(fte);
    }
    return fte;
}
Also used : DownloadLinkImpl(org.olat.core.gui.components.form.flexible.impl.elements.DownloadLinkImpl) FlexiTableElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableElementImpl)

Example 4 with DownloadLinkImpl

use of org.olat.core.gui.components.form.flexible.impl.elements.DownloadLinkImpl in project openolat by klemens.

the class FormUIFactory method addDownloadLink.

/**
 * Add a download link
 * @param name
 * @param linkTitle
 * @param i18nLabel
 * @param file
 * @param formLayout
 * @return
 */
public DownloadLink addDownloadLink(String name, String linkTitle, String i18nLabel, VFSLeaf file, FlexiTableElement formLayout) {
    DownloadLinkImpl fte = new DownloadLinkImpl(name);
    fte.setLinkText(linkTitle);
    fte.setDownloadItem(file);
    String css = CSSHelper.createFiletypeIconCssClassFor(file.getName());
    fte.setIconLeftCSS("o_icon o_icon-fw " + css);
    setLabelIfNotNull(i18nLabel, fte);
    if (formLayout != null) {
        ((FlexiTableElementImpl) formLayout).addFormItem(fte);
    }
    return fte;
}
Also used : DownloadLinkImpl(org.olat.core.gui.components.form.flexible.impl.elements.DownloadLinkImpl) FlexiTableElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableElementImpl)

Example 5 with DownloadLinkImpl

use of org.olat.core.gui.components.form.flexible.impl.elements.DownloadLinkImpl in project OpenOLAT by OpenOLAT.

the class FormUIFactory method addDownloadLink.

public DownloadLink addDownloadLink(String name, String linkTitle, String i18nLabel, File file, FlexiTableElement formLayout) {
    DownloadLinkImpl fte = new DownloadLinkImpl(name);
    fte.setLinkText(linkTitle);
    fte.setDownloadItem(file);
    String css = CSSHelper.createFiletypeIconCssClassFor(file.getName());
    fte.setIconLeftCSS("o_icon o_icon-fw " + css);
    setLabelIfNotNull(i18nLabel, fte);
    if (formLayout != null) {
        ((FlexiTableElementImpl) formLayout).addFormItem(fte);
    }
    return fte;
}
Also used : DownloadLinkImpl(org.olat.core.gui.components.form.flexible.impl.elements.DownloadLinkImpl) FlexiTableElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableElementImpl)

Aggregations

DownloadLinkImpl (org.olat.core.gui.components.form.flexible.impl.elements.DownloadLinkImpl)6 FlexiTableElementImpl (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableElementImpl)4