Search in sources :

Example 31 with Activateable2

use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project OpenOLAT by OpenOLAT.

the class UserInfoMainController method activate.

@Override
public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) {
    if (entries == null || entries.isEmpty())
        return;
    String type = entries.get(0).getOLATResourceable().getResourceableTypeName();
    if (StringHelper.containsNonWhitespace(type)) {
        Controller controller = createComponent(ureq, type);
        if (controller != null) {
            if (controller instanceof Activateable2) {
                List<ContextEntry> subEntries = entries.subList(1, entries.size());
                ((Activateable2) controller).activate(ureq, subEntries, entries.get(0).getTransientState());
            }
            main.setContent(controller.getInitialComponent());
            TreeNode selectedNode = TreeHelper.findNodeByUserObject(type, menuTree.getTreeModel().getRootNode());
            if (selectedNode != null) {
                menuTree.setSelectedNode(selectedNode);
            }
        }
    }
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) GenericTreeNode(org.olat.core.gui.components.tree.GenericTreeNode) TreeNode(org.olat.core.gui.components.tree.TreeNode) WeeklyCalendarController(org.olat.commons.calendar.ui.WeeklyCalendarController) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) FolderRunController(org.olat.core.commons.modules.bc.FolderRunController) Controller(org.olat.core.gui.control.Controller) ContactFormController(org.olat.modules.co.ContactFormController) MainLayoutBasicController(org.olat.core.gui.control.controller.MainLayoutBasicController) EPMapRunController(org.olat.portfolio.ui.EPMapRunController) ContextEntry(org.olat.core.id.context.ContextEntry)

Example 32 with Activateable2

use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project OpenOLAT by OpenOLAT.

the class BusinessGroupMainRunController method doPortfolio.

private Activateable2 doPortfolio(UserRequest ureq) {
    addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLPORTFOLIO, OlatResourceableType.portfolio));
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLPORTFOLIO);
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, getWindowControl());
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapPortfolioOres(ce.getOLATResourceable()));
    addToHistory(ureq, bwControl);
    CollaborationTools collabTools = CollaborationToolsFactory.getInstance().getOrCreateCollaborationTools(businessGroup);
    collabToolCtr = collabTools.createPortfolioController(ureq, bwControl, toolbarPanel, businessGroup);
    listenTo(collabToolCtr);
    toolbarPanel.popUpToRootController(ureq);
    toolbarPanel.pushController("Portfolio", collabToolCtr);
    List<ContextEntry> entries = BusinessControlFactory.getInstance().createCEListFromResourceType("Toc");
    ((Activateable2) collabToolCtr).activate(ureq, entries, null);
    return (Activateable2) collabToolCtr;
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) CollaborationTools(org.olat.collaboration.CollaborationTools) WindowControl(org.olat.core.gui.control.WindowControl) ContextEntry(org.olat.core.id.context.ContextEntry)

Example 33 with Activateable2

use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project OpenOLAT by OpenOLAT.

the class BusinessGroupMainRunController method doAccessControlHistory.

private Activateable2 doAccessControlHistory(UserRequest ureq) {
    removeAsListenerAndDispose(bgACHistoryCtrl);
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ORES_TOOLBOOKING, null, getWindowControl());
    addToHistory(ureq, bwControl);
    OLATResource resource = businessGroup.getResource();
    bgACHistoryCtrl = new OrdersAdminController(ureq, bwControl, toolbarPanel, resource);
    listenTo(bgACHistoryCtrl);
    mainPanel.setContent(bgACHistoryCtrl.getInitialComponent());
    return (Activateable2) bgACHistoryCtrl;
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) OrdersAdminController(org.olat.resource.accesscontrol.ui.OrdersAdminController) OLATResource(org.olat.resource.OLATResource) WindowControl(org.olat.core.gui.control.WindowControl)

Example 34 with Activateable2

use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project OpenOLAT by OpenOLAT.

the class BusinessGroupMainRunController method doCalendar.

private Activateable2 doCalendar(UserRequest ureq) {
    addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLCAL, OlatResourceableType.calendar));
    // calculate the new businesscontext for the forum clicked
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLCAL);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ce.getOLATResourceable()));
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, getWindowControl());
    addToHistory(ureq, bwControl);
    CollaborationTools collabTools = CollaborationToolsFactory.getInstance().getOrCreateCollaborationTools(businessGroup);
    collabToolCtr = collabTools.createCalendarController(ureq, bwControl, businessGroup, isAdmin, true);
    listenTo(collabToolCtr);
    mainPanel.setContent(collabToolCtr.getInitialComponent());
    return (Activateable2) collabToolCtr;
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) CollaborationTools(org.olat.collaboration.CollaborationTools) WindowControl(org.olat.core.gui.control.WindowControl) ContextEntry(org.olat.core.id.context.ContextEntry)

Example 35 with Activateable2

use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project OpenOLAT by OpenOLAT.

the class BusinessGroupMainRunController method doWiki.

private Activateable2 doWiki(UserRequest ureq) {
    addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLWIKI, OlatResourceableType.wiki));
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLWIKI);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapWikiOres(ce.getOLATResourceable()));
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, getWindowControl());
    addToHistory(ureq, bwControl);
    CollaborationTools collabTools = CollaborationToolsFactory.getInstance().getOrCreateCollaborationTools(businessGroup);
    collabToolCtr = collabTools.createWikiController(ureq, bwControl);
    listenTo(collabToolCtr);
    mainPanel.setContent(collabToolCtr.getInitialComponent());
    return (Activateable2) collabToolCtr;
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) CollaborationTools(org.olat.collaboration.CollaborationTools) WindowControl(org.olat.core.gui.control.WindowControl) ContextEntry(org.olat.core.id.context.ContextEntry)

Aggregations

Activateable2 (org.olat.core.gui.control.generic.dtabs.Activateable2)78 ContextEntry (org.olat.core.id.context.ContextEntry)44 Controller (org.olat.core.gui.control.Controller)28 LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)22 TreeNode (org.olat.core.gui.components.tree.TreeNode)16 WindowControl (org.olat.core.gui.control.WindowControl)16 BasicController (org.olat.core.gui.control.controller.BasicController)14 CourseNode (org.olat.course.nodes.CourseNode)12 CollaborationTools (org.olat.collaboration.CollaborationTools)10 SelectionEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent)10 MainLayoutBasicController (org.olat.core.gui.control.controller.MainLayoutBasicController)10 AssessableCourseNode (org.olat.course.nodes.AssessableCourseNode)10 GTACourseNode (org.olat.course.nodes.GTACourseNode)10 FlexiTableSearchEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent)8 GenericTreeNode (org.olat.core.gui.components.tree.GenericTreeNode)8 FormLink (org.olat.core.gui.components.form.flexible.elements.FormLink)6 ChiefController (org.olat.core.gui.control.ChiefController)6 VetoableCloseController (org.olat.core.gui.control.VetoableCloseController)6 BornSiteInstance (org.olat.core.gui.control.navigation.BornSiteInstance)6 OLATResourceable (org.olat.core.id.OLATResourceable)5