use of org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel in project openolat by klemens.
the class CreateTestOverviewController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(true, "export.overview.accept", Cols.accept.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);
FormLayoutContainer buttonLayout = FormLayoutContainer.createButtonLayout("buttons", getTranslator());
formLayout.add("buttons", buttonLayout);
uifactory.addFormSubmitButton("create.test", buttonLayout);
uifactory.addFormCancelButton("cancel", buttonLayout, ureq, getWindowControl());
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel in project openolat by klemens.
the class VideoAdminTranscodingController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
setFormTitle("manage.transcodings.title");
setFormDescription("manage.transcodings.description");
setFormContextHelp("Portfolio template: Administration and editing#configuration");
FlexiTableColumnModel transcodingModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
transcodingModel.addFlexiColumnModel(new DefaultFlexiColumnModel(TranscodingCols.resolutions));
transcodingModel.addFlexiColumnModel(new DefaultFlexiColumnModel(TranscodingCols.sumVideos));
transcodingModel.addFlexiColumnModel(new DefaultFlexiColumnModel(TranscodingCols.numberTranscodings));
transcodingModel.addFlexiColumnModel(new DefaultFlexiColumnModel(TranscodingCols.failedTranscodings));
transcodingModel.addFlexiColumnModel(new DefaultFlexiColumnModel(TranscodingCols.missingTranscodings));
transcodingModel.addFlexiColumnModel(new DefaultFlexiColumnModel(TranscodingCols.transcode, "quality.transcode", new BooleanCellRenderer(new StaticFlexiCellRenderer(translate("quality.transcode"), "quality.transcode", "", "o_icon o_icon_refresh o_icon-fw"), null)));
transcodingModel.addFlexiColumnModel(new DefaultFlexiColumnModel(TranscodingCols.delete, "quality.delete", new BooleanCellRenderer(new StaticFlexiCellRenderer(translate("quality.delete"), "quality.delete", "", "o_icon o_icon_delete_item o_icon-fw"), null)));
tableModel = new TranscodingTableModel(transcodingModel, getTranslator());
transcodingTable = uifactory.addTableElement(getWindowControl(), "table", tableModel, getTranslator(), formLayout);
transcodingTable.setCustomizeColumns(false);
transcodingTable.setNumOfRowsEnabled(false);
loadTable();
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel in project openolat by klemens.
the class TaxonomyLevelRelationsController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(RelationsCols.key));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(RelationsCols.type, new TaxonomyLevelRelationTypeRenderer(getTranslator())));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(RelationsCols.displayName));
tableModel = new TaxonomyLevelRelationsTableModel(columnsModel);
tableEl = uifactory.addTableElement(getWindowControl(), "table", tableModel, 20, false, getTranslator(), formLayout);
tableEl.setCustomizeColumns(true);
tableEl.setEmtpyTableMessageKey("table.relations.empty");
tableEl.setAndLoadPersistedPreferences(ureq, "tax-level-relations");
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel in project openolat by klemens.
the class TaxonomyLevelTypesEditController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
addRootTypeButton = uifactory.addFormLink("add.root.type", formLayout, Link.BUTTON);
FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(TypesCols.identifier));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(TypesCols.displayName));
DefaultFlexiColumnModel editColumn = new DefaultFlexiColumnModel("table.header.edit", -1, "edit", new StaticFlexiCellRenderer("", "edit", "o_icon o_icon-lg o_icon_edit", translate("edit")));
editColumn.setExportable(false);
columnsModel.addFlexiColumnModel(editColumn);
DefaultFlexiColumnModel toolsColumn = new DefaultFlexiColumnModel(TypesCols.tools);
toolsColumn.setExportable(false);
columnsModel.addFlexiColumnModel(toolsColumn);
model = new TaxonomyLevelTypesTableModel(columnsModel);
tableEl = uifactory.addTableElement(getWindowControl(), "types", model, 25, false, getTranslator(), formLayout);
tableEl.setEmtpyTableMessageKey("table.taxonomy.level.type.empty");
tableEl.setAndLoadPersistedPreferences(ureq, "tax-level-types-competences");
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel in project openolat by klemens.
the class TaxonomyListAdminController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
createTaxonomyButton = uifactory.addFormLink("create.taxonomy", formLayout, Link.BUTTON);
FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(false, TaxonomyCols.key, "select"));
columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(TaxonomyCols.displayName, "select"));
model = new TaxonomyListDataModel(columnsModel);
tableEl = uifactory.addTableElement(getWindowControl(), "table", model, 20, false, getTranslator(), formLayout);
tableEl.setAvailableRendererTypes(FlexiTableRendererType.custom);
tableEl.setRendererType(FlexiTableRendererType.custom);
tableEl.setSearchEnabled(false);
tableEl.setCustomizeColumns(false);
tableEl.setElementCssClass("o_taxonomy_listing");
tableEl.setEmtpyTableMessageKey("table.taxonomy.empty");
tableEl.setNumOfRowsEnabled(false);
tableEl.setPageSize(24);
VelocityContainer row = createVelocityContainer("taxonomy_row");
// sets its own DOM id in velocity container
row.setDomReplacementWrapperRequired(false);
tableEl.setRowRenderer(row, this);
tableEl.setCssDelegate(new TaxonomyCssDelegate());
}
Aggregations