Search in sources :

Example 41 with VelocityContainer

use of org.olat.core.gui.components.velocity.VelocityContainer in project OpenOLAT by OpenOLAT.

the class LoginAuthprovidersController method showBrowserCheckPage.

protected void showBrowserCheckPage(UserRequest ureq) {
    VelocityContainer browserCheck = createVelocityContainer("browsercheck");
    browserCheck.contextPut("isBrowserAjaxReady", Boolean.valueOf(!Settings.isBrowserAjaxBlacklisted(ureq)));
    dmzPanel.pushContent(browserCheck);
}
Also used : VelocityContainer(org.olat.core.gui.components.velocity.VelocityContainer)

Example 42 with VelocityContainer

use of org.olat.core.gui.components.velocity.VelocityContainer in project OpenOLAT by OpenOLAT.

the class LoginAuthprovidersController method showAccessibilityPage.

protected void showAccessibilityPage() {
    VelocityContainer accessibilityVC = createVelocityContainer("accessibility");
    dmzPanel.pushContent(accessibilityVC);
}
Also used : VelocityContainer(org.olat.core.gui.components.velocity.VelocityContainer)

Example 43 with VelocityContainer

use of org.olat.core.gui.components.velocity.VelocityContainer in project OpenOLAT by OpenOLAT.

the class LoginAuthprovidersController method showAboutPage.

protected void showAboutPage() {
    VelocityContainer aboutVC = createVelocityContainer("about");
    // Add version info and licenses
    aboutVC.contextPut("version", Settings.getFullVersionInfo());
    // Add translator and languages info
    I18nManager i18nMgr = I18nManager.getInstance();
    Collection<String> enabledKeysSet = i18nModule.getEnabledLanguageKeys();
    Map<String, String> langNames = new HashMap<String, String>();
    Map<String, String> langTranslators = new HashMap<String, String>();
    String[] enabledKeys = ArrayHelper.toArray(enabledKeysSet);
    String[] names = new String[enabledKeys.length];
    for (int i = 0; i < enabledKeys.length; i++) {
        String key = enabledKeys[i];
        String langName = i18nMgr.getLanguageInEnglish(key, i18nModule.isOverlayEnabled());
        langNames.put(key, langName);
        names[i] = langName;
        String author = i18nMgr.getLanguageAuthor(key);
        langTranslators.put(key, author);
    }
    ArrayHelper.sort(enabledKeys, names, true, true, true);
    aboutVC.contextPut("enabledKeys", enabledKeys);
    aboutVC.contextPut("langNames", langNames);
    aboutVC.contextPut("langTranslators", langTranslators);
    dmzPanel.pushContent(aboutVC);
}
Also used : HashMap(java.util.HashMap) VelocityContainer(org.olat.core.gui.components.velocity.VelocityContainer) I18nManager(org.olat.core.util.i18n.I18nManager)

Example 44 with VelocityContainer

use of org.olat.core.gui.components.velocity.VelocityContainer in project OpenOLAT by OpenOLAT.

the class TaxonomyListAdminController method initForm.

@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    createTaxonomyButton = uifactory.addFormLink("create.taxonomy", formLayout, Link.BUTTON);
    FlexiTableColumnModel columnsModel = FlexiTableDataModelFactory.createFlexiTableColumnModel();
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(false, TaxonomyCols.key, "select"));
    columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(TaxonomyCols.displayName, "select"));
    model = new TaxonomyListDataModel(columnsModel);
    tableEl = uifactory.addTableElement(getWindowControl(), "table", model, 20, false, getTranslator(), formLayout);
    tableEl.setAvailableRendererTypes(FlexiTableRendererType.custom);
    tableEl.setRendererType(FlexiTableRendererType.custom);
    tableEl.setSearchEnabled(false);
    tableEl.setCustomizeColumns(false);
    tableEl.setElementCssClass("o_taxonomy_listing");
    tableEl.setEmtpyTableMessageKey("table.taxonomy.empty");
    tableEl.setNumOfRowsEnabled(false);
    tableEl.setPageSize(24);
    VelocityContainer row = createVelocityContainer("taxonomy_row");
    // sets its own DOM id in velocity container
    row.setDomReplacementWrapperRequired(false);
    tableEl.setRowRenderer(row, this);
    tableEl.setCssDelegate(new TaxonomyCssDelegate());
}
Also used : FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel) VelocityContainer(org.olat.core.gui.components.velocity.VelocityContainer)

Example 45 with VelocityContainer

use of org.olat.core.gui.components.velocity.VelocityContainer in project OpenOLAT by OpenOLAT.

the class AssessmentTestDisplayController method doSuspend.

private void doSuspend(UserRequest ureq) {
    VelocityContainer suspendedVC = createVelocityContainer("suspended");
    mainPanel.setContent(suspendedVC);
    suspendAssessmentTest(ureq.getRequestTimestamp());
    fireEvent(ureq, new Event("suspend"));
}
Also used : FormEvent(org.olat.core.gui.components.form.flexible.impl.FormEvent) Event(org.olat.core.gui.control.Event) RetrieveAssessmentTestSessionEvent(org.olat.ims.qti21.ui.event.RetrieveAssessmentTestSessionEvent) CandidateEvent(org.olat.ims.qti21.model.audit.CandidateEvent) VelocityContainer(org.olat.core.gui.components.velocity.VelocityContainer)

Aggregations

VelocityContainer (org.olat.core.gui.components.velocity.VelocityContainer)162 Component (org.olat.core.gui.components.Component)22 ArrayList (java.util.ArrayList)16 DefaultFlexiColumnModel (org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel)14 FlexiTableColumnModel (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel)14 CloseableCalloutWindowController (org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController)14 Link (org.olat.core.gui.components.link.Link)12 Panel (org.olat.core.gui.components.panel.Panel)12 UserRequest (org.olat.core.gui.UserRequest)10 JSAndCSSComponent (org.olat.core.gui.components.htmlheader.jscss.JSAndCSSComponent)10 List (java.util.List)8 LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)8 WindowControl (org.olat.core.gui.control.WindowControl)8 CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)8 Translator (org.olat.core.gui.translator.Translator)8 OLATResourceable (org.olat.core.id.OLATResourceable)8 HashMap (java.util.HashMap)6 Collectors (java.util.stream.Collectors)6 Mapper (org.olat.core.dispatcher.mapper.Mapper)6 BarSeries (org.olat.core.gui.components.chart.BarSeries)6