if (groupEditController != null) groupEditController.dispose();
groupEditController = new GroupController(ureq, getWindowControl(), true, true, false, ownerGroup);
groupEditController.addControllerListener(this);
VelocityContainer groupContainer = createVelocityContainer("groups");
groupContainer.put("groupcomp", groupEditController.getInitialComponent());
CloseableModalController cmc = new CloseableModalController(getWindowControl(), translate("close"), groupContainer);
cmc.activate();
return;
} else if (cmd.equals(ACTION_CLOSE_RESSOURCE)) {
doCloseResource(ureq);
return;
} else if (cmd.equals(ACTION_DELETE)) { // delete
if (!isOwner) throw new OLATSecurityException("Trying to delete, but not allowed: user = " + ureq.getIdentity());
// show how many users are currently using this resource
OLATResourceable ores = repositoryEntry.getOlatResource();
String dialogTitle = translate("del.header", repositoryEntry.getDisplayname());
OLATResourceable courseRunOres = OresHelper.createOLATResourceableInstance(RunMainController.ORES_TYPE_COURSE_RUN, repositoryEntry.getOlatResource().getResourceableId());
int cnt = CoordinatorManager.getCoordinator().getEventBus().getListeningIdentityCntFor(courseRunOres);
String dialogText = translate("del.confirm", String.valueOf(cnt));
deleteDialogController = activateYesNoDialog(ureq, dialogTitle, dialogText, deleteDialogController);
return;
}
} else if (source == wc) {
if (event == Event.CANCELLED_EVENT) {
cmc.deactivate();
wc.dispose();
} else if (event == Event.DONE_EVENT) {
cmc.deactivate();
wc.dispose();
detailsToolC = null; // force recreation of tool controller
updateView(ureq);
fireEvent(ureq, Event.CHANGED_EVENT);
}