use of org.olat.group.ui.main.MemberView in project OpenOLAT by OpenOLAT.
the class MembersTableController method getMembersFromIdentity.
private List<MemberView> getMembersFromIdentity(UserRequest ureq, List<Identity> identities, Map<Long, BusinessGroupMembership> groupmemberships, Map<Long, Date> recentLaunches, Map<Long, Date> initialLaunches) {
if (!deduplicateList) {
duplicateCatcher = new HashSet<>();
}
List<MemberView> memberList = new ArrayList<>();
for (Identity identity : identities) {
MemberView member = new MemberView(identity, userPropertyHandlers, getLocale());
if (userLastTimeVisible) {
if (repoEntry == null) {
BusinessGroupMembership groupmembership = groupmemberships.get(identity.getKey());
if (groupmembership != null) {
member.setFirstTime(groupmembership.getCreationDate());
member.setLastTime(groupmembership.getLastModified());
}
} else {
member.setFirstTime(initialLaunches.get(identity.getKey()));
member.setLastTime(recentLaunches.get(identity.getKey()));
}
}
if (!duplicateCatcher.contains(member)) {
memberList.add(member);
if (!identity.equals(ureq.getIdentity())) {
forgeChatLink(member);
}
}
duplicateCatcher.add(member);
}
return memberList;
}
use of org.olat.group.ui.main.MemberView in project openolat by klemens.
the class MembersTableController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == membersTable) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("vcard".equals(cmd)) {
MemberView row = membersModel.getObject(se.getIndex());
doOpenHomePage(row, ureq);
} else if ("email".equals(cmd)) {
MemberView row = membersModel.getObject(se.getIndex());
doSendEmailToMember(row, ureq);
}
}
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
MemberView row = (MemberView) link.getUserObject();
if ("im".equals(cmd)) {
doOpenChat(row, ureq);
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.group.ui.main.MemberView in project OpenOLAT by OpenOLAT.
the class MembersTableController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == membersTable) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("vcard".equals(cmd)) {
MemberView row = membersModel.getObject(se.getIndex());
doOpenHomePage(row, ureq);
} else if ("email".equals(cmd)) {
MemberView row = membersModel.getObject(se.getIndex());
doSendEmailToMember(row, ureq);
}
}
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
MemberView row = (MemberView) link.getUserObject();
if ("im".equals(cmd)) {
doOpenChat(row, ureq);
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.group.ui.main.MemberView in project openolat by klemens.
the class MembersTableController method getMembersFromIdentity.
private List<MemberView> getMembersFromIdentity(UserRequest ureq, List<Identity> identities, Map<Long, BusinessGroupMembership> groupmemberships, Map<Long, Date> recentLaunches, Map<Long, Date> initialLaunches) {
if (!deduplicateList) {
duplicateCatcher = new HashSet<>();
}
List<MemberView> memberList = new ArrayList<>();
for (Identity identity : identities) {
MemberView member = new MemberView(identity, userPropertyHandlers, getLocale());
if (userLastTimeVisible) {
if (repoEntry == null) {
BusinessGroupMembership groupmembership = groupmemberships.get(identity.getKey());
if (groupmembership != null) {
member.setFirstTime(groupmembership.getCreationDate());
member.setLastTime(groupmembership.getLastModified());
}
} else {
member.setFirstTime(initialLaunches.get(identity.getKey()));
member.setLastTime(recentLaunches.get(identity.getKey()));
}
}
if (!duplicateCatcher.contains(member)) {
memberList.add(member);
if (!identity.equals(ureq.getIdentity())) {
forgeChatLink(member);
}
}
duplicateCatcher.add(member);
}
return memberList;
}
Aggregations