Search in sources :

Example 1 with ConfirmDeleteSoftlyController

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

the class RepositoryEntryRuntimeController method doDelete.

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

Example 2 with ConfirmDeleteSoftlyController

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

the class RepositoryEntryLifeCycleChangeController method doDelete.

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

Example 3 with ConfirmDeleteSoftlyController

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

the class RepositoryEntryRuntimeController method doDelete.

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

Example 4 with ConfirmDeleteSoftlyController

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

the class RepositoryEntryLifeCycleChangeController method doDelete.

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

Aggregations

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