Package org.olat.core.gui.components.velocity

Examples of org.olat.core.gui.components.velocity.VelocityContainer


  /**
   * adds a area-to-group tab to the tabbed pane
   */
  private VelocityContainer createTabAreas() {
    VelocityContainer tmp = createVelocityContainer("tab_bgAreas");
    this.allAreas = areaManager.findBGAreasOfBGContext(this.bgContext);
    this.selectedAreas = areaManager.findBGAreasOfBusinessGroup(this.currBusinessGroup);
    this.areaDataModel = new AreasToGroupDataModel(this.allAreas, this.selectedAreas);

    areasChoice = new Choice("areasChoice", getTranslator());
    areasChoice.setSubmitKey("submit");
    areasChoice.setCancelKey("cancel");
    areasChoice.setTableDataModel(this.areaDataModel);
    areasChoice.addListener(this);
    tmp.put("areasChoice", areasChoice);
    tmp.contextPut("noAreasFound", (allAreas.size() > 0 ? Boolean.FALSE : Boolean.TRUE));
    tmp.contextPut("isGmAdmin", Boolean.valueOf(flags.isEnabled(BGConfigFlags.IS_GM_ADMIN)));
    tmp.contextPut("type", this.currBusinessGroup.getType());
    return tmp;
  }
View Full Code Here


  /**
   * adds a right-to-group tab to the tabbed pane
   */
  private VelocityContainer createTabRights() {
    VelocityContainer tmp = createVelocityContainer("tab_bgRights");
    this.selectedRights = rightManager.findBGRights(this.currBusinessGroup);
    this.rightDataModel = new RightsToGroupDataModel(bgRights, this.selectedRights);

    rightsChoice = new Choice("rightsChoice", getTranslator());
    rightsChoice.setSubmitKey("submit");
    rightsChoice.setCancelKey("cancel");
    rightsChoice.setTableDataModel(this.rightDataModel);
    rightsChoice.addListener(this);
    tmp.put("rightsChoice", rightsChoice);
    tmp.contextPut("type", this.currBusinessGroup.getType());
    return tmp;
  }
View Full Code Here

  /**
   * @param businessGroup
   */
  private VelocityContainer createTabDetails(UserRequest ureq, BusinessGroup businessGroup) {
    VelocityContainer tmp = createVelocityContainer("tab_bgDetail");
   
    if (this.modifyBusinessGroupController != null) {
      removeAsListenerAndDispose(this.modifyBusinessGroupController);
    }
    this.modifyBusinessGroupController = new BusinessGroupFormController(ureq, getWindowControl(), businessGroup, this.flags
        .isEnabled(BGConfigFlags.GROUP_MINMAX_SIZE));
    listenTo(this.modifyBusinessGroupController);
   
    tmp.put("businessGroupForm", this.modifyBusinessGroupController.getInitialComponent());
    tmp.contextPut("BuddyGroup", businessGroup);
    tmp.contextPut("type", this.currBusinessGroup.getType());
    tmp.contextPut("groupid", this.currBusinessGroup.getKey());
    return tmp;
  }
View Full Code Here

  private VelocityContainer createTabGroupManagement(UserRequest ureq) {
    boolean hasOwners = flags.isEnabled(BGConfigFlags.GROUP_OWNERS);
    boolean hasPartips = true;//
    boolean hasWaitingList = currBusinessGroup.getWaitingListEnabled().booleanValue();
    //
    VelocityContainer tmp = createVelocityContainer("tab_bgGrpMngmnt");
    // Member Display Form, allows to enable/disable that others partips see
    // partips and/or owners
    //
    BusinessGroupPropertyManager bgpm = new BusinessGroupPropertyManager(currBusinessGroup);
    // configure the form with checkboxes for owners and/or partips according
    // the booleans
    dmsForm = new DisplayMemberSwitchForm("dmsForm", getTranslator(), hasOwners, hasPartips, hasWaitingList);
    // set if the checkboxes are checked or not.
    if (hasOwners) dmsForm.setShowOwnersChecked(bgpm.showOwners());
    if (hasPartips) dmsForm.setShowPartipsChecked(bgpm.showPartips());
    if (hasWaitingList) dmsForm.setShowWaitingListChecked(bgpm.showWaitingList());
    bgpm = null;
    dmsForm.addListener(this);
    tmp.put("displayMembers", dmsForm);
    boolean enableTablePreferences = flags.isEnabled(BGConfigFlags.ADMIN_SEE_ALL_USER_DATA);

    if (hasOwners) {
      boolean requiresOwner = flags.isEnabled(BGConfigFlags.GROUP_OWNER_REQURED);
      // groupcontroller which allows to remove all members depending on
      // configuration.
      ownerGrpCntrllr = new GroupController(ureq, getWindowControl(), true, requiresOwner, enableTablePreferences, currBusinessGroup
          .getOwnerGroup());
      listenTo(ownerGrpCntrllr);
      // add mail templates used when adding and removing users
      MailTemplate ownerAddUserMailTempl = BGMailHelper.createAddParticipantMailTemplate(currBusinessGroup, ureq.getIdentity());
      ownerGrpCntrllr.setAddUserMailTempl(ownerAddUserMailTempl);
      MailTemplate ownerAremoveUserMailTempl = BGMailHelper.createRemoveParticipantMailTemplate(currBusinessGroup, ureq.getIdentity());
      ownerGrpCntrllr.setRemoveUserMailTempl(ownerAremoveUserMailTempl);
      // expose to velocity
      tmp.put("ownerGrpMngmnt", ownerGrpCntrllr.getInitialComponent());
      tmp.contextPut("hasOwnerGrp", Boolean.TRUE);
    } else {
      tmp.contextPut("hasOwnerGrp", Boolean.FALSE);
    }
    // groupcontroller which allows to remove all members
    partipGrpCntrllr = new GroupController(ureq, getWindowControl(), true, false, enableTablePreferences, currBusinessGroup
        .getPartipiciantGroup());
    listenTo(partipGrpCntrllr);
    // add mail templates used when adding and removing users
    MailTemplate partAddUserMailTempl = BGMailHelper.createAddParticipantMailTemplate(currBusinessGroup, ureq.getIdentity());
    partipGrpCntrllr.setAddUserMailTempl(partAddUserMailTempl);
    MailTemplate partAremoveUserMailTempl = BGMailHelper.createRemoveParticipantMailTemplate(currBusinessGroup, ureq.getIdentity());
    partipGrpCntrllr.setRemoveUserMailTempl(partAremoveUserMailTempl);
    // expose to velocity
    tmp.put("partipGrpMngmnt", partipGrpCntrllr.getInitialComponent());
    tmp.contextPut("type", this.currBusinessGroup.getType())
   
    // Show waiting list only if enabled
    if (hasWaitingList) {
      // waitinglist-groupcontroller which allows to remove all members
      SecurityGroup waitingList = currBusinessGroup.getWaitingGroup();
      waitingGruppeController = new WaitingGroupController(ureq, getWindowControl(), true, false, enableTablePreferences, waitingList );
      listenTo(waitingGruppeController);

      // add mail templates used when adding and removing users
      MailTemplate waitAddUserMailTempl = BGMailHelper.createAddWaitinglistMailTemplate(currBusinessGroup, ureq.getIdentity());
      waitingGruppeController.setAddUserMailTempl(waitAddUserMailTempl);
      MailTemplate waitRemoveUserMailTempl = BGMailHelper.createRemoveWaitinglistMailTemplate(currBusinessGroup, ureq.getIdentity());
      waitingGruppeController.setRemoveUserMailTempl(waitRemoveUserMailTempl);
      MailTemplate waitTransferUserMailTempl = BGMailHelper.createWaitinglistTransferMailTemplate(currBusinessGroup, ureq.getIdentity());
      waitingGruppeController.setTransferUserMailTempl(waitTransferUserMailTempl);
      // expose to velocity
      tmp.put("waitingGrpMngmnt", waitingGruppeController.getInitialComponent());
      tmp.contextPut("hasWaitingGrp", Boolean.TRUE);
    } else {
      tmp.contextPut("hasWaitingGrp", Boolean.FALSE);
    }
    return tmp;
  }
View Full Code Here

    super(control);
    this.addedEntry = addedEntry;
    // translator for this class
    translator = new PackageTranslator(PACKAGE, ureq.getLocale());

    descVC = new VelocityContainer("vcDesc", VELOCITY_ROOT + "/csc_main.html", translator, this);
    descVC.contextPut("disabledforwardreason", translator.translate("disabledforwardreason"));
    // chooser form
    chooser = new ChooseStepsForm("chooser", translator, modus);
    chooser.addListener(this);
    descVC.put("chooser", chooser);
View Full Code Here

    super(control);
    this.addedEntry = addedEntry;
    // translator for this class
    translator = new PackageTranslator(PACKAGE, ureq.getLocale());

    descVC = new VelocityContainer("vcDesc", VELOCITY_ROOT + "/csc_main.html", translator, this);
    descVC.contextPut("disabledforwardreason", translator.translate("disabledforwardreason"));
    // chooser form
    chooser = new ChooseStepsForm("chooser", translator);
    chooser.addListener(this);
    descVC.put("chooser", chooser);
View Full Code Here

    super(ureq, wControl);
   
    this.userlist = userlist;
    this.reason = reason;
   
    vc = new VelocityContainer("bulkdelete", VELOCITY_ROOT + "/bulkdelete.html", getTranslator(), this);
   
    processUserList(this.userlist);
   
    if(toDelete != null && toDelete.size() > 0) {
      tblCtrFound = UserControllerFactory.createTableControllerFor(new TableGuiConfiguration(), toDelete, ureq, getWindowControl(), this, null);
View Full Code Here

   * @param learningObjectives The learning objective
   * @param ureq The user request
   * @return the wrapper component
   */
  public static Component createLearningObjectivesComponent(String learningObjectives, UserRequest ureq) {
    VelocityContainer vc = new VelocityContainer("learningObjs", VELOCITY_ROOT + "/objectives.html", new PackageTranslator(PACKAGE, ureq
        .getLocale()), null);
    vc.contextPut("learningObjectives", learningObjectives);
    return vc;
  }
View Full Code Here

 
    translator = new PackageTranslator(PACKAGE, ureq.getLocale());

    Boolean canDelete = (Boolean) BaseSecurityModule.getConfiguration().get(BaseSecurityModule.CONFIG_USERMANAGER_CAN_DELETE_USER);
    if ( canDelete.booleanValue() || ureq.getUserSession().getRoles().isOLATAdmin() ) {
      myContent = new VelocityContainer("deleteTabbedPane", VELOCITY_ROOT + "/deleteTabbedPane.html", translator, this);
      initTabbedPane(ureq);
      setInitialComponent(myContent);
    } else {
      String supportAddr = WebappHelper.getMailConfig("mailSupport");
      getWindowControl().setWarning(translator.translate(NLS_ERROR_NOACCESS_TO_USER, new String[]{supportAddr}));
View Full Code Here

   
    owners = new ArrayList<Identity>();
    repoEntries = new ArrayList<RepositoryEntry>();
   
    translator = new PackageTranslator(PACKAGE, ureq.getLocale());
    mainVc = new VelocityContainer("import", VELOCITY_ROOT + "/wizard.html", translator, this);
    LinkFactory.createLinkBack(mainVc, this);
    panel = new Panel("panel");
    // step 1
    buildStep1(ureq);
    mainVc.put("panel", panel);
View Full Code Here

TOP

Related Classes of org.olat.core.gui.components.velocity.VelocityContainer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.