use of org.olat.group.ui.main.BGTableItem in project OpenOLAT by OpenOLAT.
the class CourseBusinessGroupListController method searchTableItems.
@Override
protected List<BGTableItem> searchTableItems(BusinessGroupQueryParams params) {
List<StatisticsBusinessGroupRow> rows = businessGroupService.findBusinessGroupsFromRepositoryEntry(params, getIdentity(), getResource());
List<BGTableItem> items = new ArrayList<>(rows.size());
for (StatisticsBusinessGroupRow row : rows) {
BusinessGroupMembership membership = row.getMember();
Boolean allowLeave = membership != null;
Boolean allowDelete = isAdmin() ? Boolean.TRUE : (membership == null ? null : new Boolean(membership.isOwner()));
FormLink markLink = uifactory.addFormLink("mark_" + row.getKey(), "mark", "", null, null, Link.NONTRANSLATED);
markLink.setIconLeftCSS(row.isMarked() ? Mark.MARK_CSS_LARGE : Mark.MARK_ADD_CSS_LARGE);
BGTableItem item = new BGTableItem(row, markLink, allowLeave, allowDelete);
item.setNumOfOwners(row.getNumOfCoaches());
item.setNumOfParticipants(row.getNumOfParticipants());
item.setNumWaiting(row.getNumWaiting());
item.setNumOfPendings(row.getNumPending());
items.add(item);
}
return items;
}
use of org.olat.group.ui.main.BGTableItem in project openolat by klemens.
the class CourseBusinessGroupListController method searchTableItems.
@Override
protected List<BGTableItem> searchTableItems(BusinessGroupQueryParams params) {
List<StatisticsBusinessGroupRow> rows = businessGroupService.findBusinessGroupsFromRepositoryEntry(params, getIdentity(), getResource());
List<BGTableItem> items = new ArrayList<>(rows.size());
for (StatisticsBusinessGroupRow row : rows) {
BusinessGroupMembership membership = row.getMember();
Boolean allowLeave = membership != null;
Boolean allowDelete = isAdmin() ? Boolean.TRUE : (membership == null ? null : new Boolean(membership.isOwner()));
FormLink markLink = uifactory.addFormLink("mark_" + row.getKey(), "mark", "", null, null, Link.NONTRANSLATED);
markLink.setIconLeftCSS(row.isMarked() ? Mark.MARK_CSS_LARGE : Mark.MARK_ADD_CSS_LARGE);
BGTableItem item = new BGTableItem(row, markLink, allowLeave, allowDelete);
item.setNumOfOwners(row.getNumOfCoaches());
item.setNumOfParticipants(row.getNumOfParticipants());
item.setNumWaiting(row.getNumWaiting());
item.setNumOfPendings(row.getNumPending());
items.add(item);
}
return items;
}
Aggregations