use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class QuickstartPortletRunController method event.
public void event(UserRequest ureq, Component source, Event event) {
if (source == quickstartVC) {
String cmd = event.getCommand();
String businessPath = null;
if (cmd.equals("cmd.repo.course")) {
businessPath = "[MyCoursesSite:0]";
} else if (cmd.equals("cmd.repo.catalog")) {
businessPath = "[MyCoursesSite:0][Catalog:0]";
} else if (cmd.equals("cmd.settings")) {
businessPath = "[HomeSite:" + ureq.getIdentity().getKey() + "][mysettings:0]";
} else if (cmd.equals("cmd.buddygroup.new")) {
businessPath = "[GroupsSite:0]";
}
if (StringHelper.containsNonWhitespace(businessPath)) {
NewControllerFactory.getInstance().launch(businessPath, ureq, getWindowControl());
}
} else if (source == helpLink) {
ControllerCreator ctrlCreator = new ControllerCreator() {
public Controller createController(UserRequest lureq, WindowControl lwControl) {
return CourseFactory.createHelpCourseLaunchController(lureq, lwControl);
}
};
// wrap the content controller into a full header layout
ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
// open in new browser window
PopupBrowserWindow pbw = getWindowControl().getWindowBackOffice().getWindowManager().createNewPopupBrowserWindowFor(ureq, layoutCtrlr);
pbw.open(ureq);
//
}
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class UserInfoMainController method doOpenContact.
private ContactFormController doOpenContact(UserRequest ureq) {
removeAsListenerAndDispose(contactFormController);
ContactMessage cmsg = new ContactMessage(ureq.getIdentity());
ContactList emailList = new ContactList(firstLastName);
emailList.add(chosenIdentity);
cmsg.addEmailTo(emailList);
OLATResourceable ores = OresHelper.createOLATResourceableType(CMD_CONTACT);
WindowControl bwControl = addToHistory(ureq, ores, null);
contactFormController = new ContactFormController(ureq, bwControl, true, false, false, cmsg);
listenTo(contactFormController);
return contactFormController;
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class UserInfoMainController method doOpenCalendar.
private WeeklyCalendarController doOpenCalendar(UserRequest ureq) {
removeAsListenerAndDispose(calendarController);
KalendarRenderWrapper calendarWrapper = calendarManager.getPersonalCalendar(chosenIdentity);
CalendarUserConfiguration config = calendarManager.findCalendarConfigForIdentity(calendarWrapper.getKalendar(), getIdentity());
if (config != null) {
calendarWrapper.setConfiguration(config);
}
calendarWrapper.setPrivateEventsVisible(chosenIdentity.equals(ureq.getIdentity()));
if (chosenIdentity.equals(ureq.getIdentity())) {
calendarWrapper.setAccess(KalendarRenderWrapper.ACCESS_READ_WRITE);
} else {
calendarWrapper.setAccess(KalendarRenderWrapper.ACCESS_READ_ONLY);
}
List<KalendarRenderWrapper> calendars = new ArrayList<KalendarRenderWrapper>();
calendars.add(calendarWrapper);
OLATResourceable ores = OresHelper.createOLATResourceableType(CMD_CALENDAR);
WindowControl bwControl = addToHistory(ureq, ores, null);
OLATResourceable callerOres = OresHelper.createOLATResourceableInstance(chosenIdentity.getName(), chosenIdentity.getKey());
calendarController = new WeeklyCalendarController(ureq, bwControl, calendars, WeeklyCalendarController.CALLER_PROFILE, callerOres, false);
listenTo(calendarController);
return calendarController;
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class UserInfoMainController method doOpenFolder.
private FolderRunController doOpenFolder(UserRequest ureq) {
removeAsListenerAndDispose(folderRunController);
String chosenUserFolderRelPath = FolderConfig.getUserHome(chosenIdentity.getName()) + "/public";
OlatRootFolderImpl rootFolder = new OlatRootFolderImpl(chosenUserFolderRelPath, null);
OlatNamedContainerImpl namedFolder = new OlatNamedContainerImpl(firstLastName, rootFolder);
// decided in plenum to have read only view in the personal visiting card, even for admin
VFSSecurityCallback secCallback = new ReadOnlyCallback();
namedFolder.setLocalSecurityCallback(secCallback);
OLATResourceable ores = OresHelper.createOLATResourceableType("userfolder");
WindowControl bwControl = addToHistory(ureq, ores, null);
folderRunController = new FolderRunController(namedFolder, false, true, false, ureq, bwControl);
folderRunController.setResourceURL("[Identity:" + chosenIdentity.getKey() + "][userfolder:0]");
listenTo(folderRunController);
return folderRunController;
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class UserInterestsElement method doEdit.
private void doEdit(UserRequest ureq) {
ChiefController chief = Windows.getWindows(ureq).getChiefController();
WindowControl wControl = chief.getWindowControl();
if (wControl != null) {
List<UserInterestsCategory> availableUserInterests = UserInterestsPropertyHandler.loadAvailableUserInterests();
userInterestsController = new UserInterestsController(ureq, wControl, getSelectedInterestsIDs(), availableUserInterests);
userInterestsController.addControllerListener(this);
String title = getTranslator().translate("userinterests.title");
modalController = new CloseableModalController(wControl, "close", userInterestsController.getInitialComponent(), true, title);
modalController.activate();
}
}
Aggregations