Search in sources :

Example 1 with TaskStatusRenderer

use of org.olat.core.commons.services.taskexecutor.ui.TaskStatusRenderer in project OpenOLAT by OpenOLAT.

the class BulkAssessmentOverviewController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    newButton = uifactory.addFormLink("new.bulk", formLayout, Link.BUTTON);
    newButton.setElementCssClass("o_sel_assessment_tool_new_bulk_assessment");
    FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.header.taskStatus", Cols.taskStatus.ordinal(), new TaskStatusRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.header.scheduledDate", Cols.scheduledDate.ordinal()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.header.node", Cols.courseNode.ordinal(), new CourseNodeRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.header.score", Cols.score.ordinal()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.header.passed", Cols.status.ordinal()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.header.comment", Cols.comment.ordinal()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.header.returnFiles", Cols.returnFile.ordinal()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.header.numOfAssessedUsers", Cols.numOfAssessedUsers.ordinal()));
    FlexiCellRenderer renderer = new StaticFlexiCellRenderer("select-owner", new TextFlexiCellRenderer());
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.header.owner", Cols.owner.ordinal(), "select-owner", renderer));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("edit", translate("edit"), "edit"));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("delete", translate("delete"), "delete"));
    taskModel = new TaskDataModel(Collections.<TaskData>emptyList(), columnsModel);
    taskListEl = uifactory.addTableElement(getWindowControl(), "taskList", taskModel, getTranslator(), formLayout);
    reloadTaskModel();
}
Also used : TaskStatusRenderer(org.olat.core.commons.services.taskexecutor.ui.TaskStatusRenderer) StaticFlexiCellRenderer(org.olat.core.gui.components.form.flexible.impl.elements.table.StaticFlexiCellRenderer) StaticFlexiCellRenderer(org.olat.core.gui.components.form.flexible.impl.elements.table.StaticFlexiCellRenderer) TextFlexiCellRenderer(org.olat.core.gui.components.form.flexible.impl.elements.table.TextFlexiCellRenderer) FlexiCellRenderer(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiCellRenderer) FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) TextFlexiCellRenderer(org.olat.core.gui.components.form.flexible.impl.elements.table.TextFlexiCellRenderer) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel)

Example 2 with TaskStatusRenderer

use of org.olat.core.commons.services.taskexecutor.ui.TaskStatusRenderer in project openolat by klemens.

the class BulkAssessmentOverviewController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    newButton = uifactory.addFormLink("new.bulk", formLayout, Link.BUTTON);
    newButton.setElementCssClass("o_sel_assessment_tool_new_bulk_assessment");
    FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.header.taskStatus", Cols.taskStatus.ordinal(), new TaskStatusRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.header.scheduledDate", Cols.scheduledDate.ordinal()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.header.node", Cols.courseNode.ordinal(), new CourseNodeRenderer()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.header.score", Cols.score.ordinal()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.header.passed", Cols.status.ordinal()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.header.comment", Cols.comment.ordinal()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.header.returnFiles", Cols.returnFile.ordinal()));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.header.numOfAssessedUsers", Cols.numOfAssessedUsers.ordinal()));
    FlexiCellRenderer renderer = new StaticFlexiCellRenderer("select-owner", new TextFlexiCellRenderer());
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("table.header.owner", Cols.owner.ordinal(), "select-owner", renderer));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("edit", translate("edit"), "edit"));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel("delete", translate("delete"), "delete"));
    taskModel = new TaskDataModel(Collections.<TaskData>emptyList(), columnsModel);
    taskListEl = uifactory.addTableElement(getWindowControl(), "taskList", taskModel, getTranslator(), formLayout);
    reloadTaskModel();
}
Also used : TaskStatusRenderer(org.olat.core.commons.services.taskexecutor.ui.TaskStatusRenderer) StaticFlexiCellRenderer(org.olat.core.gui.components.form.flexible.impl.elements.table.StaticFlexiCellRenderer) StaticFlexiCellRenderer(org.olat.core.gui.components.form.flexible.impl.elements.table.StaticFlexiCellRenderer) TextFlexiCellRenderer(org.olat.core.gui.components.form.flexible.impl.elements.table.TextFlexiCellRenderer) FlexiCellRenderer(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiCellRenderer) FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) TextFlexiCellRenderer(org.olat.core.gui.components.form.flexible.impl.elements.table.TextFlexiCellRenderer) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel)

Aggregations

TaskStatusRenderer (org.olat.core.commons.services.taskexecutor.ui.TaskStatusRenderer)2 DefaultFlexiColumnModel (org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel)2 FlexiCellRenderer (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiCellRenderer)2 FlexiTableColumnModel (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel)2 StaticFlexiCellRenderer (org.olat.core.gui.components.form.flexible.impl.elements.table.StaticFlexiCellRenderer)2 TextFlexiCellRenderer (org.olat.core.gui.components.form.flexible.impl.elements.table.TextFlexiCellRenderer)2