use of org.olat.core.gui.components.stack.BreadcrumbedStackedPanel in project OpenOLAT by OpenOLAT.
the class OverviewRepositoryListController method doOpenCatalog.
private CatalogNodeController doOpenCatalog(UserRequest ureq) {
if (!repositoryModule.isCatalogEnabled() || !repositoryModule.isCatalogBrowsingEnabled()) {
return null;
}
cleanUp();
List<CatalogEntry> entries = catalogManager.getRootCatalogEntries();
CatalogEntry rootEntry = null;
if (entries.size() > 0) {
rootEntry = entries.get(0);
}
OLATResourceable ores = OresHelper.createOLATResourceableInstance("Catalog", 0l);
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
catalogStackPanel = new BreadcrumbedStackedPanel("catstack", getTranslator(), this);
catalogCtrl = new CatalogNodeController(ureq, bwControl, getWindowControl(), rootEntry, catalogStackPanel, false);
catalogStackPanel.pushController(translate("search.catalog"), catalogCtrl);
listenTo(catalogCtrl);
currentCtrl = catalogCtrl;
addToHistory(ureq, catalogCtrl);
mainVC.put("segmentCmp", catalogStackPanel);
return catalogCtrl;
}
use of org.olat.core.gui.components.stack.BreadcrumbedStackedPanel in project OpenOLAT by OpenOLAT.
the class GenericMainController method init.
/**
* use after optional addChildNodeToAppend() or addChildNodeToPrepend() calls
* to initialize MainController and set Panel
*
* @param ureq
*/
public void init(UserRequest ureq) {
olatMenuTree = new MenuTree("olatMenuTree");
TreeModel tm = buildTreeModel(ureq);
olatMenuTree.setTreeModel(tm);
content = new Panel("content");
TreeNode firstNode = tm.getRootNode();
TreeNode nodeToSelect = getLastDelegate(firstNode);
olatMenuTree.setSelectedNodeId(nodeToSelect.getIdent());
olatMenuTree.addListener(this);
// default is to not display the root element and to let user open/close sub elements
olatMenuTree.setRootVisible(false);
olatMenuTree.setExpandSelectedNode(false);
Object uobject = nodeToSelect.getUserObject();
contentCtr = getContentCtr(uobject, ureq);
// auto dispose later
listenTo(contentCtr);
Component resComp = contentCtr.getInitialComponent();
content.setContent(resComp);
columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), olatMenuTree, content, className);
// auto dispose later
listenTo(columnLayoutCtr);
// create the stack
stackVC = new BreadcrumbedStackedPanel("genericStack", getTranslator(), this);
stackVC.pushController("content", columnLayoutCtr);
putInitialPanel(stackVC);
}
use of org.olat.core.gui.components.stack.BreadcrumbedStackedPanel in project openolat by klemens.
the class OverviewRepositoryListController method doOpenCatalog.
private CatalogNodeController doOpenCatalog(UserRequest ureq) {
if (!repositoryModule.isCatalogEnabled() || !repositoryModule.isCatalogBrowsingEnabled()) {
return null;
}
cleanUp();
List<CatalogEntry> entries = catalogManager.getRootCatalogEntries();
CatalogEntry rootEntry = null;
if (entries.size() > 0) {
rootEntry = entries.get(0);
}
OLATResourceable ores = OresHelper.createOLATResourceableInstance("Catalog", 0l);
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
catalogStackPanel = new BreadcrumbedStackedPanel("catstack", getTranslator(), this);
catalogCtrl = new CatalogNodeController(ureq, bwControl, getWindowControl(), rootEntry, catalogStackPanel, false);
catalogStackPanel.pushController(translate("search.catalog"), catalogCtrl);
listenTo(catalogCtrl);
currentCtrl = catalogCtrl;
addToHistory(ureq, catalogCtrl);
mainVC.put("segmentCmp", catalogStackPanel);
return catalogCtrl;
}
use of org.olat.core.gui.components.stack.BreadcrumbedStackedPanel in project openolat by klemens.
the class OverviewRepositoryListController method doOpenMyCourses.
private RepositoryEntryListController doOpenMyCourses(UserRequest ureq) {
cleanUp();
SearchMyRepositoryEntryViewParams searchParams = new SearchMyRepositoryEntryViewParams(getIdentity(), ureq.getUserSession().getRoles());
searchParams.setMembershipMandatory(true);
searchParams.setClosed(Boolean.FALSE);
OLATResourceable ores = OresHelper.createOLATResourceableInstance("My", 0l);
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
myCoursesStackPanel = new BreadcrumbedStackedPanel("mystack", getTranslator(), this);
myCoursesCtrl = new RepositoryEntryListController(ureq, bwControl, searchParams, true, false, "my", myCoursesStackPanel);
myCoursesStackPanel.pushController(translate("search.mycourses.student"), myCoursesCtrl);
listenTo(myCoursesCtrl);
currentCtrl = myCoursesCtrl;
myDirty = false;
addToHistory(ureq, myCoursesCtrl);
mainVC.put("segmentCmp", myCoursesStackPanel);
return myCoursesCtrl;
}
Aggregations