Search in sources :

Example 11 with BreadcrumbedStackedPanel

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;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) CatalogEntry(org.olat.repository.CatalogEntry) WindowControl(org.olat.core.gui.control.WindowControl) BreadcrumbedStackedPanel(org.olat.core.gui.components.stack.BreadcrumbedStackedPanel) CatalogNodeController(org.olat.repository.ui.catalog.CatalogNodeController)

Example 12 with BreadcrumbedStackedPanel

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);
}
Also used : MenuTree(org.olat.core.gui.components.tree.MenuTree) TreeModel(org.olat.core.gui.components.tree.TreeModel) GenericTreeModel(org.olat.core.gui.components.tree.GenericTreeModel) BreadcrumbPanel(org.olat.core.gui.components.stack.BreadcrumbPanel) Panel(org.olat.core.gui.components.panel.Panel) BreadcrumbedStackedPanel(org.olat.core.gui.components.stack.BreadcrumbedStackedPanel) GenericTreeNode(org.olat.core.gui.components.tree.GenericTreeNode) TreeNode(org.olat.core.gui.components.tree.TreeNode) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) Component(org.olat.core.gui.components.Component) BreadcrumbedStackedPanel(org.olat.core.gui.components.stack.BreadcrumbedStackedPanel)

Example 13 with BreadcrumbedStackedPanel

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;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) CatalogEntry(org.olat.repository.CatalogEntry) WindowControl(org.olat.core.gui.control.WindowControl) BreadcrumbedStackedPanel(org.olat.core.gui.components.stack.BreadcrumbedStackedPanel) CatalogNodeController(org.olat.repository.ui.catalog.CatalogNodeController)

Example 14 with BreadcrumbedStackedPanel

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;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) SearchMyRepositoryEntryViewParams(org.olat.repository.model.SearchMyRepositoryEntryViewParams) WindowControl(org.olat.core.gui.control.WindowControl) BreadcrumbedStackedPanel(org.olat.core.gui.components.stack.BreadcrumbedStackedPanel)

Aggregations

BreadcrumbedStackedPanel (org.olat.core.gui.components.stack.BreadcrumbedStackedPanel)14 WindowControl (org.olat.core.gui.control.WindowControl)10 OLATResourceable (org.olat.core.id.OLATResourceable)10 SearchMyRepositoryEntryViewParams (org.olat.repository.model.SearchMyRepositoryEntryViewParams)8 Component (org.olat.core.gui.components.Component)4 CourseOverviewController (org.olat.admin.user.course.CourseOverviewController)2 GroupOverviewController (org.olat.admin.user.groups.GroupOverviewController)2 LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)2 NotificationSubscriptionController (org.olat.core.commons.services.notifications.ui.NotificationSubscriptionController)2 UserRequest (org.olat.core.gui.UserRequest)2 Panel (org.olat.core.gui.components.panel.Panel)2 BreadcrumbPanel (org.olat.core.gui.components.stack.BreadcrumbPanel)2 TabCreator (org.olat.core.gui.components.tabbedpane.TabCreator)2 TabbedPane (org.olat.core.gui.components.tabbedpane.TabbedPane)2 GenericTreeModel (org.olat.core.gui.components.tree.GenericTreeModel)2 GenericTreeNode (org.olat.core.gui.components.tree.GenericTreeNode)2 MenuTree (org.olat.core.gui.components.tree.MenuTree)2 TreeModel (org.olat.core.gui.components.tree.TreeModel)2 TreeNode (org.olat.core.gui.components.tree.TreeNode)2 Controller (org.olat.core.gui.control.Controller)2