Package org.olat.core.commons.services.commentAndRating.impl.ui

Examples of org.olat.core.commons.services.commentAndRating.impl.ui.UserCommentsAndRatingsController


    if (commentAndRatingService != null) {       
      Roles roles = ureq.getUserSession().getRoles();
      OLATResourceable helpOres = OresHelper.createOLATResourceableType("contexthelp");
      String key = ContextHelpManager.getInstance().calculateCombinedKey(pageTranslator.getLocale(), bundleName, page);
      commentAndRatingService.init(getIdentity(), helpOres, key, roles.isOLATAdmin(), roles.isGuestOnly());
      UserCommentsAndRatingsController commentsAndRatingCtr = commentAndRatingService.createUserCommentsAndRatingControllerExpandable(ureq, getWindowControl());
      listenTo(commentsAndRatingCtr);
      contextHelpWrapperVC.put("commentsAndRatingCtr", commentsAndRatingCtr.getInitialComponent());   
    }
  }
View Full Code Here


  public UserCommentsAndRatingsController createUserCommentsControllerMinimized(UserRequest ureq, WindowControl wControl) {
    if (ores == null || secCallback == null) {
      throw new AssertException(
          "CommentAndRatingService must be initialized first, call init method");
    }
    return new UserCommentsAndRatingsController(ureq, wControl, ores, oresSubPath, secCallback, true, false, false);
  }
View Full Code Here

  public UserCommentsAndRatingsController createUserCommentsControllerExpandable(UserRequest ureq, WindowControl wControl) {
    if (ores == null || secCallback == null) {
      throw new AssertException(
          "CommentAndRatingService must be initialized first, call init method");
    }
    return new UserCommentsAndRatingsController(ureq, wControl, ores, oresSubPath, secCallback, true, false, true);
  }
View Full Code Here

      UserRequest ureq, WindowControl wControl) {
    if (ores == null || secCallback == null) {
      throw new AssertException(
          "CommentAndRatingService must be initialized first, call init method");
    }
    return new UserCommentsAndRatingsController(ureq, wControl, ores, oresSubPath, secCallback, true, true, true);
  }
View Full Code Here

      UserRequest ureq, WindowControl wControl) {
    if (ores == null || secCallback == null) {
      throw new AssertException(
          "CommentAndRatingService must be initialized first, call init method");
    }
    return new UserCommentsAndRatingsController(ureq, wControl, ores, oresSubPath, secCallback, true, true, false);
  }
View Full Code Here

      UserRequest ureq, WindowControl wControl) {
    if (ores == null || secCallback == null) {
      throw new AssertException(
          "CommentAndRatingService must be initialized first, call init method");
    }
    return new UserCommentsAndRatingsController(ureq, wControl, ores, oresSubPath, secCallback, false, true, false);
  }
View Full Code Here

   */
  private void createCommentsAndRatingsLink(UserRequest ureq, Feed feed, Item item) {
    CommentAndRatingService commentAndRatingService = (CommentAndRatingService) ServiceFactory.getServiceOrNull(CommentAndRatingService.class);
    if (commentAndRatingService != null) {       
      commentAndRatingService.init(getIdentity(), feed, item.getGuid(), callback.mayEditMetadata(), ureq.getUserSession().getRoles().isGuestOnly());
      UserCommentsAndRatingsController commentsAndRatingCtr = commentAndRatingService.createUserCommentsAndRatingControllerMinimized(ureq, getWindowControl());
      commentsAndRatingCtr.addUserObject(item);
      listenTo(commentsAndRatingCtr);
      String guid = item.getGuid();
      vcItems.put("commentsAndRating." + guid, commentsAndRatingCtr.getInitialComponent());
    }
  }
View Full Code Here

      if (event == Event.BACK_EVENT) {
        mainPanel.setContent(vcItems);
      }
     
    } else if (source instanceof UserCommentsAndRatingsController) {
      UserCommentsAndRatingsController commentsRatingsCtr = (UserCommentsAndRatingsController) source;
      if (event == UserCommentsAndRatingsController.EVENT_COMMENT_LINK_CLICKED) {
        // go to details page
        Item item = (Item) commentsRatingsCtr.getUserObject();
        ItemController myItemCtr = displayItemController(ureq, item);
        myItemCtr.activate(ureq, ItemController.ACTIVATION_KEY_COMMENTS);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.olat.core.commons.services.commentAndRating.impl.ui.UserCommentsAndRatingsController

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.