Search in sources :

Example 1 with RepositoryEntryFilter

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

the class CourseOverviewController method doSearchRepoEntries.

private void doSearchRepoEntries(UserRequest ureq, SearchType type, String title) {
    removeAsListenerAndDispose(repoSearchCtr);
    removeAsListenerAndDispose(cmc);
    RepositoryEntryFilter filter = new ManagedEntryfilter();
    repoSearchCtr = new ReferencableEntriesSearchController(getWindowControl(), ureq, new String[] { CourseModule.getCourseTypeName() }, filter, translate("choose"), false, false, true, true, Can.all);
    repoSearchCtr.setUserObject(type);
    listenTo(repoSearchCtr);
    cmc = new CloseableModalController(getWindowControl(), translate("close"), repoSearchCtr.getInitialComponent(), true, title);
    listenTo(cmc);
    cmc.activate();
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) RepositoryEntryFilter(org.olat.repository.controllers.RepositoryEntryFilter) ReferencableEntriesSearchController(org.olat.repository.controllers.ReferencableEntriesSearchController)

Example 2 with RepositoryEntryFilter

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

the class CourseOverviewController method doSearchRepoEntries.

private void doSearchRepoEntries(UserRequest ureq, SearchType type, String title) {
    removeAsListenerAndDispose(repoSearchCtr);
    removeAsListenerAndDispose(cmc);
    RepositoryEntryFilter filter = new ManagedEntryfilter();
    repoSearchCtr = new ReferencableEntriesSearchController(getWindowControl(), ureq, new String[] { CourseModule.getCourseTypeName() }, filter, translate("choose"), false, false, true, true, Can.all);
    repoSearchCtr.setUserObject(type);
    listenTo(repoSearchCtr);
    cmc = new CloseableModalController(getWindowControl(), translate("close"), repoSearchCtr.getInitialComponent(), true, title);
    listenTo(cmc);
    cmc.activate();
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) RepositoryEntryFilter(org.olat.repository.controllers.RepositoryEntryFilter) ReferencableEntriesSearchController(org.olat.repository.controllers.ReferencableEntriesSearchController)

Example 3 with RepositoryEntryFilter

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

the class BusinessGroupEditResourceController method event.

/**
 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
 *      org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
 */
@Override
public void event(UserRequest ureq, Component source, Event event) {
    if (source == addTabResourcesButton) {
        removeAsListenerAndDispose(repoSearchCtr);
        removeAsListenerAndDispose(cmc);
        RepositoryEntryFilter filter = new ManagedEntryfilter();
        repoSearchCtr = new ReferencableEntriesSearchController(getWindowControl(), ureq, new String[] { CourseModule.getCourseTypeName() }, filter, translate("resources.add"), true, true, true, true, Can.referenceable);
        listenTo(repoSearchCtr);
        cmc = new CloseableModalController(getWindowControl(), translate("close"), repoSearchCtr.getInitialComponent(), true, translate("resources.add.title"));
        listenTo(cmc);
        cmc.activate();
    }
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) RepositoryEntryFilter(org.olat.repository.controllers.RepositoryEntryFilter) ReferencableEntriesSearchController(org.olat.repository.controllers.ReferencableEntriesSearchController)

Example 4 with RepositoryEntryFilter

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

the class BusinessGroupEditResourceController method event.

/**
 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
 *      org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
 */
@Override
public void event(UserRequest ureq, Component source, Event event) {
    if (source == addTabResourcesButton) {
        removeAsListenerAndDispose(repoSearchCtr);
        removeAsListenerAndDispose(cmc);
        RepositoryEntryFilter filter = new ManagedEntryfilter();
        repoSearchCtr = new ReferencableEntriesSearchController(getWindowControl(), ureq, new String[] { CourseModule.getCourseTypeName() }, filter, translate("resources.add"), true, true, true, true, Can.referenceable);
        listenTo(repoSearchCtr);
        cmc = new CloseableModalController(getWindowControl(), translate("close"), repoSearchCtr.getInitialComponent(), true, translate("resources.add.title"));
        listenTo(cmc);
        cmc.activate();
    }
}
Also used : CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) RepositoryEntryFilter(org.olat.repository.controllers.RepositoryEntryFilter) ReferencableEntriesSearchController(org.olat.repository.controllers.ReferencableEntriesSearchController)

Aggregations

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