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