use of org.olat.modules.portfolio.ui.model.BinderRow in project openolat by klemens.
the class BinderListController method doOpenBinder.
protected BinderController doOpenBinder(UserRequest ureq, BinderRef row) {
SynchedBinder binder = portfolioService.loadAndSyncBinder(row);
if (binder.isChanged()) {
showInfo("warning.binder.synched");
}
BinderController selectedBinderCtrl = doOpenBinder(ureq, binder.getBinder());
if (row instanceof BinderRow) {
VFSLeaf image = portfolioService.getPosterImageLeaf(binder.getBinder());
((BinderRow) row).setBackgroundImage(image);
}
return selectedBinderCtrl;
}
use of org.olat.modules.portfolio.ui.model.BinderRow in project openolat by klemens.
the class BinderListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (newBinderDropdown == source) {
doNewBinderCallout(ureq);
} else if (newBinderFromCourseButton == source) {
doNewBinderFromCourse(ureq);
} else if (tableEl == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("select".equals(cmd)) {
BinderRow row = model.getObject(se.getIndex());
Activateable2 activateable = doOpenBinder(ureq, row);
if (activateable != null) {
activateable.activate(ureq, null, null);
}
}
}
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("open".equals(cmd)) {
BinderRow row = (BinderRow) link.getUserObject();
Activateable2 activateable = doOpenBinder(ureq, row);
if (activateable != null) {
activateable.activate(ureq, null, null);
}
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.modules.portfolio.ui.model.BinderRow in project openolat by klemens.
the class DeletedBinderController method loadModel.
@Override
protected void loadModel() {
List<BinderStatistics> binderRows = portfolioService.searchOwnedDeletedBinders(getIdentity());
List<BinderRow> rows = new ArrayList<>(binderRows.size());
for (BinderStatistics binderRow : binderRows) {
rows.add(forgePortfolioRow(binderRow));
}
model.setObjects(rows);
tableEl.reset();
tableEl.reloadData();
}
use of org.olat.modules.portfolio.ui.model.BinderRow in project OpenOLAT by OpenOLAT.
the class BinderListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (newBinderDropdown == source) {
doNewBinderCallout(ureq);
} else if (newBinderFromCourseButton == source) {
doNewBinderFromCourse(ureq);
} else if (tableEl == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("select".equals(cmd)) {
BinderRow row = model.getObject(se.getIndex());
Activateable2 activateable = doOpenBinder(ureq, row);
if (activateable != null) {
activateable.activate(ureq, null, null);
}
}
}
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("open".equals(cmd)) {
BinderRow row = (BinderRow) link.getUserObject();
Activateable2 activateable = doOpenBinder(ureq, row);
if (activateable != null) {
activateable.activate(ureq, null, null);
}
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.modules.portfolio.ui.model.BinderRow in project OpenOLAT by OpenOLAT.
the class BinderListController method getComponents.
@Override
public Iterable<Component> getComponents(int row, Object rowObject) {
BinderRow elRow = model.getObject(row);
List<Component> components = new ArrayList<>(2);
if (elRow.getOpenLink() != null) {
components.add(elRow.getOpenLink().getComponent());
}
return components;
}
Aggregations