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;
}
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);
}
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);
}
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;
}
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;
}
Aggregations