Search in sources :

Example 1 with ConfirmCloseController

use of org.olat.repository.ui.author.ConfirmCloseController in project OpenOLAT by OpenOLAT.

the class RepositoryEntryLifeCycleChangeController method doConfirmCloseResource.

private void doConfirmCloseResource(UserRequest ureq) {
    if (!reSecurity.isEntryAdmin()) {
        throw new OLATSecurityException("Trying to close, but not allowed: user = " + ureq.getIdentity());
    }
    List<RepositoryEntry> entryToClose = Collections.singletonList(re);
    confirmCloseCtrl = new ConfirmCloseController(ureq, getWindowControl(), entryToClose);
    listenTo(confirmCloseCtrl);
    String title = translate("read.only.header", re.getDisplayname());
    cmc = new CloseableModalController(getWindowControl(), "close", confirmCloseCtrl.getInitialComponent(), true, title);
    listenTo(cmc);
    cmc.activate();
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) OLATSecurityException(org.olat.core.logging.OLATSecurityException) RepositoryEntry(org.olat.repository.RepositoryEntry) ConfirmCloseController(org.olat.repository.ui.author.ConfirmCloseController)

Example 2 with ConfirmCloseController

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

the class RepositoryEntryLifeCycleChangeController method doConfirmCloseResource.

private void doConfirmCloseResource(UserRequest ureq) {
    if (!reSecurity.isEntryAdmin()) {
        throw new OLATSecurityException("Trying to close, but not allowed: user = " + ureq.getIdentity());
    }
    List<RepositoryEntry> entryToClose = Collections.singletonList(re);
    confirmCloseCtrl = new ConfirmCloseController(ureq, getWindowControl(), entryToClose);
    listenTo(confirmCloseCtrl);
    String title = translate("read.only.header", re.getDisplayname());
    cmc = new CloseableModalController(getWindowControl(), "close", confirmCloseCtrl.getInitialComponent(), true, title);
    listenTo(cmc);
    cmc.activate();
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) OLATSecurityException(org.olat.core.logging.OLATSecurityException) RepositoryEntry(org.olat.repository.RepositoryEntry) ConfirmCloseController(org.olat.repository.ui.author.ConfirmCloseController)

Aggregations

CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)2 OLATSecurityException (org.olat.core.logging.OLATSecurityException)2 RepositoryEntry (org.olat.repository.RepositoryEntry)2 ConfirmCloseController (org.olat.repository.ui.author.ConfirmCloseController)2