Search in sources :

Example 36 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class PortfolioHomeController method doOpenMyPages.

private MyPageListController doOpenMyPages(UserRequest ureq) {
    removeAsListenerAndDispose(myPageListCtrl);
    stackPanel.popUpToRootController(ureq);
    OLATResourceable pagesOres = OresHelper.createOLATResourceableInstance("MyPages", 0l);
    WindowControl swControl = addToHistory(ureq, pagesOres, null);
    // owners of all pages
    BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getCallbackForMyPageList();
    myPageListCtrl = new MyPageListController(ureq, swControl, stackPanel, secCallback);
    listenTo(myPageListCtrl);
    stackPanel.pushController(translate("my.portfolio.pages.breadcrump"), myPageListCtrl);
    return myPageListCtrl;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) BinderSecurityCallback(org.olat.modules.portfolio.BinderSecurityCallback) WindowControl(org.olat.core.gui.control.WindowControl)

Example 37 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class PortfolioHomeController method doDeletedPages.

private TrashController doDeletedPages(UserRequest ureq) {
    OLATResourceable bindersOres = OresHelper.createOLATResourceableInstance("Trash", 0l);
    WindowControl swControl = addToHistory(ureq, bindersOres, null);
    BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getCallbackForMyPageList();
    deletedItemsCtrl = new TrashController(ureq, swControl, stackPanel, secCallback);
    listenTo(deletedItemsCtrl);
    stackPanel.pushController(translate("deleted.pages.breadcrump"), deletedItemsCtrl);
    return deletedItemsCtrl;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) BinderSecurityCallback(org.olat.modules.portfolio.BinderSecurityCallback) WindowControl(org.olat.core.gui.control.WindowControl)

Example 38 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class PageRunController method doPrint.

private void doPrint(UserRequest ureq) {
    ControllerCreator ctrlCreator = new ControllerCreator() {

        @Override
        public Controller createController(UserRequest lureq, WindowControl lwControl) {
            BinderOnePageController printCtrl = new BinderOnePageController(lureq, lwControl, page, ExtendedMediaRenderingHints.toPrint(), true);
            LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, printCtrl);
            // dispose controller on layout dispose
            layoutCtr.addDisposableChildController(printCtrl);
            return layoutCtr;
        }
    };
    ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createPrintPopupLayout(ctrlCreator);
    openInNewBrowserWindow(ureq, layoutCtrlr);
}
Also used : LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) WindowControl(org.olat.core.gui.control.WindowControl) ControllerCreator(org.olat.core.gui.control.creator.ControllerCreator) UserRequest(org.olat.core.gui.UserRequest)

Example 39 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class VideoListingController method doShowVideo.

/**
 * Launch a single video and add to breadcrumb
 * @param ureq
 * @param id the video resource ID
 */
private void doShowVideo(UserRequest ureq, Long id) {
    RepositoryEntry videoEntry = repositoryManager.lookupRepositoryEntry(id);
    if (repositoryManager.isAllowed(ureq, videoEntry).canLaunch()) {
        boolean readOnly = repositoryManager.createRepositoryEntryStatus(videoEntry.getStatusCode()).isClosed();
        VideoDisplayController videoDisplayCtr = new VideoDisplayController(ureq, getWindowControl(), videoEntry, true, true, true, true, null, false, true, null, readOnly);
        listenTo(videoDisplayCtr);
        toolbarPanel.pushController(videoEntry.getDisplayname(), videoDisplayCtr);
        // Update launch counter
        repositoryService.incrementLaunchCounter(videoEntry);
        // Update business path and URL
        ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(videoEntry);
        ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ce.getOLATResourceable()));
        WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, getWindowControl());
        addToHistory(ureq, bwControl);
    }
}
Also used : RepositoryEntry(org.olat.repository.RepositoryEntry) WindowControl(org.olat.core.gui.control.WindowControl) ContextEntry(org.olat.core.id.context.ContextEntry)

Example 40 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class VideoRuntimeController method doSettings.

private Activateable2 doSettings(UserRequest ureq) {
    removeAsListenerAndDispose(settingsCtr);
    RepositoryEntry entry = getRepositoryEntry();
    OLATResourceable ores = OresHelper.createOLATResourceableType("settings");
    WindowControl swControl = addToHistory(ureq, ores, null);
    VideoSettingsController configCtrl = new VideoSettingsController(ureq, swControl, entry);
    listenTo(configCtrl);
    settingsCtr = pushController(ureq, translate("tab.video.settings"), configCtrl);
    setActiveTool(settingsLink);
    return settingsCtr;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) RepositoryEntry(org.olat.repository.RepositoryEntry) WindowControl(org.olat.core.gui.control.WindowControl)

Aggregations

WindowControl (org.olat.core.gui.control.WindowControl)628 OLATResourceable (org.olat.core.id.OLATResourceable)300 UserRequest (org.olat.core.gui.UserRequest)136 Controller (org.olat.core.gui.control.Controller)70 ControllerCreator (org.olat.core.gui.control.creator.ControllerCreator)68 RepositoryEntry (org.olat.repository.RepositoryEntry)68 StepsMainRunController (org.olat.core.gui.control.generic.wizard.StepsMainRunController)64 ContextEntry (org.olat.core.id.context.ContextEntry)58 Step (org.olat.core.gui.control.generic.wizard.Step)56 StepRunnerCallback (org.olat.core.gui.control.generic.wizard.StepRunnerCallback)56 StepsRunContext (org.olat.core.gui.control.generic.wizard.StepsRunContext)56 BusinessControl (org.olat.core.id.context.BusinessControl)56 LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)46 ArrayList (java.util.ArrayList)42 Identity (org.olat.core.id.Identity)38 StateSite (org.olat.core.id.context.StateSite)32 PopupBrowserWindow (org.olat.core.gui.control.generic.popup.PopupBrowserWindow)28 AssertException (org.olat.core.logging.AssertException)24 QuestionsController (org.olat.modules.qpool.ui.QuestionsController)22 List (java.util.List)20