use of org.olat.core.gui.components.form.flexible.impl.elements.table.BooleanCellRenderer in project OpenOLAT by OpenOLAT.
the class AuthorListController method initActionsColumns.
protected void initActionsColumns(FlexiTableColumnModel columnsModel) {
DefaultFlexiColumnModel detailsColumn = new DefaultFlexiColumnModel(Cols.detailsSupported.i18nKey(), Cols.detailsSupported.ordinal(), "details", new StaticFlexiCellRenderer("", "details", "o_icon o_icon-lg o_icon_details", translate("details")));
detailsColumn.setExportable(false);
columnsModel.addFlexiColumnModel(detailsColumn);
if (hasAuthorRight) {
DefaultFlexiColumnModel editColumn = new DefaultFlexiColumnModel(Cols.editionSupported.i18nKey(), Cols.editionSupported.ordinal(), "edit", new BooleanCellRenderer(new StaticFlexiCellRenderer("", "edit", "o_icon o_icon-lg o_icon_edit", translate("edit")), null));
editColumn.setExportable(false);
columnsModel.addFlexiColumnModel(editColumn);
DefaultFlexiColumnModel toolsColumn = new DefaultFlexiColumnModel(Cols.tools.i18nKey(), Cols.tools.ordinal());
toolsColumn.setExportable(false);
columnsModel.addFlexiColumnModel(toolsColumn);
}
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.BooleanCellRenderer in project OpenOLAT by OpenOLAT.
the class GoToOrganizerListAdminController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
addOrganizerButton = uifactory.addFormLink("add.organizer", formLayout, Link.BUTTON);
addOrganizerButton.setDomReplacementWrapperRequired(false);
addOrganizerButton.setIconLeftCSS("o_icon o_icon-fw o_icon_add");
// add the table
FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(OrganizerCols.key.i18nHeaderKey(), OrganizerCols.key.ordinal(), true, OrganizerCols.key.name()));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(OrganizerCols.firstName.i18nHeaderKey(), OrganizerCols.firstName.ordinal(), true, OrganizerCols.firstName.name()));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(OrganizerCols.lastName.i18nHeaderKey(), OrganizerCols.lastName.ordinal(), true, OrganizerCols.lastName.name()));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(OrganizerCols.email.i18nHeaderKey(), OrganizerCols.email.ordinal(), true, OrganizerCols.email.name()));
FlexiCellRenderer renderer = new StaticFlexiCellRenderer("owner", new TextFlexiCellRenderer());
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(OrganizerCols.owner.i18nHeaderKey(), OrganizerCols.owner.ordinal(), "owner", true, OrganizerCols.owner.name(), renderer));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(OrganizerCols.renewDate.i18nHeaderKey(), OrganizerCols.renewDate.ordinal(), true, OrganizerCols.renewDate.name()));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("renew.organizer", translate("renew.organizer"), "renew"));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(OrganizerCols.remove.i18nHeaderKey(), OrganizerCols.remove.ordinal(), "remove", new BooleanCellRenderer(new StaticFlexiCellRenderer(translate("remove"), "remove"), null)));
tableModel = new GoToOrganizerTableModel(columnsModel, userManager);
tableEl = uifactory.addTableElement(getWindowControl(), "organizerList", tableModel, getTranslator(), formLayout);
updateModel();
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.BooleanCellRenderer in project OpenOLAT by OpenOLAT.
the class BusinessGroupListController method initColumnModel.
@Override
protected FlexiTableColumnModel initColumnModel() {
FlexiTableColumnModel columnsModel = super.initColumnModel();
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.allowDelete.i18n(), Cols.allowDelete.ordinal(), TABLE_ACTION_DELETE, new BooleanCellRenderer(new StaticFlexiCellRenderer(translate("table.header.delete"), TABLE_ACTION_DELETE), null)));
return columnsModel;
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.BooleanCellRenderer in project OpenOLAT by OpenOLAT.
the class ExportOverviewController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(true, "exportable", Cols.exportable.ordinal(), false, null, FlexiColumnModel.ALIGNMENT_LEFT, new BooleanCellRenderer(new CSSIconFlexiCellRenderer("o_icon_accept"), new CSSIconFlexiCellRenderer("o_icon_failed"))));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("general.title", Cols.title.ordinal()));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("technical.format", Cols.format.ordinal()));
itemsModel = new QItemDataModel(columnsModel, format);
uifactory.addTableElement(getWindowControl(), "shares", itemsModel, getTranslator(), formLayout);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.BooleanCellRenderer in project OpenOLAT by OpenOLAT.
the class LifecycleAdminController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
// add the table
FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(LCCols.softkey.i18nKey(), LCCols.softkey.ordinal()));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(LCCols.label.i18nKey(), LCCols.label.ordinal()));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(LCCols.validFrom.i18nKey(), LCCols.validFrom.ordinal()));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(LCCols.validTo.i18nKey(), LCCols.validTo.ordinal()));
FlexiCellRenderer delRenderer = new BooleanCellRenderer(new StaticFlexiCellRenderer(translate("delete"), "delete-cycle"), null);
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("delete", LCCols.delete.ordinal(), "delete-cycle", delRenderer));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("edit", translate(LCCols.edit.i18nKey()), "edit-lifecycle"));
model = new LifecycleDataModel(columnsModel);
tableEl = uifactory.addTableElement(getWindowControl(), "cycles", model, getTranslator(), formLayout);
tableEl.setRendererType(FlexiTableRendererType.classic);
tableEl.setCustomizeColumns(false);
createLifeCycle = uifactory.addFormLink("create.lifecycle", formLayout, Link.BUTTON);
}
Aggregations