Search in sources :

Example 1 with RepositoryEntryLifeCycleChangeController

use of org.olat.repository.ui.RepositoryEntryLifeCycleChangeController in project OpenOLAT by OpenOLAT.

the class CourseRuntimeController method doLifeCycleChange.

private void doLifeCycleChange(UserRequest ureq) {
    List<Link> breadCrumbs = toolbarPanel.getBreadCrumbs();
    BreadCrumb lastCrumb = null;
    if (breadCrumbs.size() > 0) {
        lastCrumb = (BreadCrumb) breadCrumbs.get(breadCrumbs.size() - 1).getUserObject();
    }
    if (lastCrumb == null || lastCrumb.getController() != lifeCycleChangeCtr) {
        // only create and add to stack if not already there
        lifeCycleChangeCtr = new RepositoryEntryLifeCycleChangeController(ureq, getWindowControl(), getRepositoryEntry(), reSecurity, handler);
        listenTo(lifeCycleChangeCtr);
        currentToolCtr = lifeCycleChangeCtr;
        toolbarPanel.pushController(translate("details.lifecycle.change"), lifeCycleChangeCtr);
    }
}
Also used : RepositoryEntryLifeCycleChangeController(org.olat.repository.ui.RepositoryEntryLifeCycleChangeController) BreadCrumb(org.olat.core.gui.components.stack.BreadcrumbedStackedPanel.BreadCrumb) Link(org.olat.core.gui.components.link.Link)

Example 2 with RepositoryEntryLifeCycleChangeController

use of org.olat.repository.ui.RepositoryEntryLifeCycleChangeController in project openolat by klemens.

the class CourseRuntimeController method doLifeCycleChange.

private void doLifeCycleChange(UserRequest ureq) {
    List<Link> breadCrumbs = toolbarPanel.getBreadCrumbs();
    BreadCrumb lastCrumb = null;
    if (breadCrumbs.size() > 0) {
        lastCrumb = (BreadCrumb) breadCrumbs.get(breadCrumbs.size() - 1).getUserObject();
    }
    if (lastCrumb == null || lastCrumb.getController() != lifeCycleChangeCtr) {
        // only create and add to stack if not already there
        lifeCycleChangeCtr = new RepositoryEntryLifeCycleChangeController(ureq, getWindowControl(), getRepositoryEntry(), reSecurity, handler);
        listenTo(lifeCycleChangeCtr);
        currentToolCtr = lifeCycleChangeCtr;
        toolbarPanel.pushController(translate("details.lifecycle.change"), lifeCycleChangeCtr);
    }
}
Also used : RepositoryEntryLifeCycleChangeController(org.olat.repository.ui.RepositoryEntryLifeCycleChangeController) BreadCrumb(org.olat.core.gui.components.stack.BreadcrumbedStackedPanel.BreadCrumb) Link(org.olat.core.gui.components.link.Link)

Aggregations

Link (org.olat.core.gui.components.link.Link)2 BreadCrumb (org.olat.core.gui.components.stack.BreadcrumbedStackedPanel.BreadCrumb)2 RepositoryEntryLifeCycleChangeController (org.olat.repository.ui.RepositoryEntryLifeCycleChangeController)2