Search in sources :

Example 1 with RepositorySearchController

use of org.olat.repository.controllers.RepositorySearchController in project OpenOLAT by OpenOLAT.

the class CatalogNodeManagerController method doAddResource.

private void doAddResource(UserRequest ureq) {
    removeAsListenerAndDispose(entrySearchCtrl);
    removeAsListenerAndDispose(cmc);
    entrySearchCtrl = new RepositorySearchController(translate("choose"), ureq, getWindowControl(), true, false, new String[0], null);
    listenTo(entrySearchCtrl);
    // OLAT-Admin has search form
    if (ureq.getUserSession().getRoles().isOLATAdmin()) {
        entrySearchCtrl.displaySearchForm();
    } else // an Author gets the list of his repository
    {
        // admin is responsible for not inserting wrong visibility entries!!
        entrySearchCtrl.doSearchByOwnerLimitAccess(ureq.getIdentity());
    }
    // open form in dialog
    cmc = new CloseableModalController(getWindowControl(), "close", entrySearchCtrl.getInitialComponent(), true, translate("tools.add.catalog.link"));
    listenTo(cmc);
    cmc.activate();
}
Also used : RepositorySearchController(org.olat.repository.controllers.RepositorySearchController) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)

Example 2 with RepositorySearchController

use of org.olat.repository.controllers.RepositorySearchController in project OpenOLAT by OpenOLAT.

the class BinderListController method doNewBinderFromTemplate.

private void doNewBinderFromTemplate(UserRequest ureq) {
    if (searchTemplateCtrl != null)
        return;
    String title = translate("create.empty.binder.from.template");
    String commandLabel = translate("create.binder.selectTemplate");
    removeAsListenerAndDispose(searchTemplateCtrl);
    searchTemplateCtrl = new RepositorySearchController(commandLabel, ureq, getWindowControl(), false, false, new String[] { BinderTemplateResource.TYPE_NAME }, null);
    searchTemplateCtrl.enableSearchforAllXXAbleInSearchForm(Can.all);
    searchTemplateCtrl.doSearchByTypeLimitAccess(new String[] { BinderTemplateResource.TYPE_NAME }, ureq);
    listenTo(searchTemplateCtrl);
    cmc = new CloseableModalController(getWindowControl(), title, searchTemplateCtrl.getInitialComponent(), true, title);
    listenTo(cmc);
    cmc.activate();
}
Also used : RepositorySearchController(org.olat.repository.controllers.RepositorySearchController) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)

Example 3 with RepositorySearchController

use of org.olat.repository.controllers.RepositorySearchController in project openolat by klemens.

the class CatalogNodeManagerController method doAddResource.

private void doAddResource(UserRequest ureq) {
    removeAsListenerAndDispose(entrySearchCtrl);
    removeAsListenerAndDispose(cmc);
    entrySearchCtrl = new RepositorySearchController(translate("choose"), ureq, getWindowControl(), true, false, new String[0], null);
    listenTo(entrySearchCtrl);
    // OLAT-Admin has search form
    if (ureq.getUserSession().getRoles().isOLATAdmin()) {
        entrySearchCtrl.displaySearchForm();
    } else // an Author gets the list of his repository
    {
        // admin is responsible for not inserting wrong visibility entries!!
        entrySearchCtrl.doSearchByOwnerLimitAccess(ureq.getIdentity());
    }
    // open form in dialog
    cmc = new CloseableModalController(getWindowControl(), "close", entrySearchCtrl.getInitialComponent(), true, translate("tools.add.catalog.link"));
    listenTo(cmc);
    cmc.activate();
}
Also used : RepositorySearchController(org.olat.repository.controllers.RepositorySearchController) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)

Example 4 with RepositorySearchController

use of org.olat.repository.controllers.RepositorySearchController in project openolat by klemens.

the class BinderListController method doNewBinderFromTemplate.

private void doNewBinderFromTemplate(UserRequest ureq) {
    if (searchTemplateCtrl != null)
        return;
    String title = translate("create.empty.binder.from.template");
    String commandLabel = translate("create.binder.selectTemplate");
    removeAsListenerAndDispose(searchTemplateCtrl);
    searchTemplateCtrl = new RepositorySearchController(commandLabel, ureq, getWindowControl(), false, false, new String[] { BinderTemplateResource.TYPE_NAME }, null);
    searchTemplateCtrl.enableSearchforAllXXAbleInSearchForm(Can.all);
    searchTemplateCtrl.doSearchByTypeLimitAccess(new String[] { BinderTemplateResource.TYPE_NAME }, ureq);
    listenTo(searchTemplateCtrl);
    cmc = new CloseableModalController(getWindowControl(), title, searchTemplateCtrl.getInitialComponent(), true, title);
    listenTo(cmc);
    cmc.activate();
}
Also used : RepositorySearchController(org.olat.repository.controllers.RepositorySearchController) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)

Aggregations

CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)4 RepositorySearchController (org.olat.repository.controllers.RepositorySearchController)4