Search in sources :

Example 1 with OrdersAdminController

use of org.olat.resource.accesscontrol.ui.OrdersAdminController in project OpenOLAT by OpenOLAT.

the class MembersManagementMainController method selectMenuItem.

private Controller selectMenuItem(UserRequest ureq, String cmd) {
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(cmd, 0l);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
    addToHistory(ureq, bwControl);
    Controller selectedCtrl = null;
    if (CMD_MEMBERS.equals(cmd)) {
        if (entryAdmin || memberManagementRight) {
            if (membersOverviewCtrl == null) {
                membersOverviewCtrl = new MembersOverviewController(ureq, bwControl, toolbarPanel, repoEntry, coachCourseEnv);
                listenTo(membersOverviewCtrl);
            } else if (membersDirty) {
                membersOverviewCtrl.reloadMembers();
            }
            mainVC.put("content", membersOverviewCtrl.getInitialComponent());
            selectedCtrl = membersOverviewCtrl;
        }
    } else if (CMD_GROUPS.equals(cmd)) {
        if (entryAdmin || memberManagementRight || groupManagementRight) {
            if (groupsCtrl == null) {
                groupsCtrl = new CourseBusinessGroupListController(ureq, bwControl, repoEntry, entryAdmin || groupManagementRight, coachCourseEnv.isCourseReadOnly());
                listenTo(groupsCtrl);
            }
            groupsCtrl.reloadModel();
            mainVC.put("content", groupsCtrl.getInitialComponent());
            selectedCtrl = groupsCtrl;
        }
    } else if (CMD_BOOKING.equals(cmd)) {
        if (acModule.isEnabled() && (entryAdmin || memberManagementRight)) {
            if (ordersController == null) {
                ordersController = new OrdersAdminController(ureq, bwControl, toolbarPanel, repoEntry.getOlatResource());
                listenTo(ordersController);
            }
            mainVC.put("content", ordersController.getInitialComponent());
            selectedCtrl = ordersController;
        }
    } else if (CMD_RIGHTS.equals(cmd)) {
        if (entryAdmin) {
            if (rightsController == null) {
                rightsController = new GroupsAndRightsController(ureq, bwControl, repoEntry, coachCourseEnv.isCourseReadOnly());
                listenTo(rightsController);
            }
            mainVC.put("content", rightsController.getInitialComponent());
            selectedCtrl = rightsController;
        }
    }
    TreeNode selTreeNode = TreeHelper.findNodeByUserObject(cmd, menuTree.getTreeModel().getRootNode());
    if (selTreeNode != null && !selTreeNode.getIdent().equals(menuTree.getSelectedNodeId())) {
        menuTree.setSelectedNodeId(selTreeNode.getIdent());
    }
    return selectedCtrl;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) GenericTreeNode(org.olat.core.gui.components.tree.GenericTreeNode) TreeNode(org.olat.core.gui.components.tree.TreeNode) OrdersAdminController(org.olat.resource.accesscontrol.ui.OrdersAdminController) GroupsAndRightsController(org.olat.course.groupsandrights.GroupsAndRightsController) WindowControl(org.olat.core.gui.control.WindowControl) GroupsAndRightsController(org.olat.course.groupsandrights.GroupsAndRightsController) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) Controller(org.olat.core.gui.control.Controller) MainLayoutBasicController(org.olat.core.gui.control.controller.MainLayoutBasicController) OrdersAdminController(org.olat.resource.accesscontrol.ui.OrdersAdminController)

Example 2 with OrdersAdminController

use of org.olat.resource.accesscontrol.ui.OrdersAdminController in project OpenOLAT by OpenOLAT.

the class RepositoryEntryRuntimeController method doOrders.

protected void doOrders(UserRequest ureq) {
    if (!reSecurity.isEntryAdmin())
        return;
    WindowControl bwControl = getSubWindowControl("Booking");
    OrdersAdminController ctrl = new OrdersAdminController(ureq, addToHistory(ureq, bwControl), toolbarPanel, re.getOlatResource());
    listenTo(ctrl);
    ordersCtlr = pushController(ureq, translate("details.orders"), ctrl);
    currentToolCtr = ordersCtlr;
    setActiveTool(ordersLink);
}
Also used : OrdersAdminController(org.olat.resource.accesscontrol.ui.OrdersAdminController) WindowControl(org.olat.core.gui.control.WindowControl)

Example 3 with OrdersAdminController

use of org.olat.resource.accesscontrol.ui.OrdersAdminController in project openolat by klemens.

the class RepositoryEntryRuntimeController method doOrders.

protected void doOrders(UserRequest ureq) {
    if (!reSecurity.isEntryAdmin())
        return;
    WindowControl bwControl = getSubWindowControl("Booking");
    OrdersAdminController ctrl = new OrdersAdminController(ureq, addToHistory(ureq, bwControl), toolbarPanel, re.getOlatResource());
    listenTo(ctrl);
    ordersCtlr = pushController(ureq, translate("details.orders"), ctrl);
    currentToolCtr = ordersCtlr;
    setActiveTool(ordersLink);
}
Also used : OrdersAdminController(org.olat.resource.accesscontrol.ui.OrdersAdminController) WindowControl(org.olat.core.gui.control.WindowControl)

Example 4 with OrdersAdminController

use of org.olat.resource.accesscontrol.ui.OrdersAdminController in project openolat by klemens.

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 5 with OrdersAdminController

use of org.olat.resource.accesscontrol.ui.OrdersAdminController 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)

Aggregations

WindowControl (org.olat.core.gui.control.WindowControl)6 OrdersAdminController (org.olat.resource.accesscontrol.ui.OrdersAdminController)6 LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)2 GenericTreeNode (org.olat.core.gui.components.tree.GenericTreeNode)2 TreeNode (org.olat.core.gui.components.tree.TreeNode)2 Controller (org.olat.core.gui.control.Controller)2 MainLayoutBasicController (org.olat.core.gui.control.controller.MainLayoutBasicController)2 Activateable2 (org.olat.core.gui.control.generic.dtabs.Activateable2)2 OLATResourceable (org.olat.core.id.OLATResourceable)2 GroupsAndRightsController (org.olat.course.groupsandrights.GroupsAndRightsController)2 OLATResource (org.olat.resource.OLATResource)2