Пример #1
0
  @Override
  protected void initRuntimeTools(Dropdown toolsDropdown) {
    if (reSecurity.isEntryAdmin()) {
      membersLink =
          LinkFactory.createToolLink(
              "members", translate("details.members"), this, "o_sel_repo_members");
      membersLink.setIconLeftCSS("o_icon o_icon-fw o_icon_membersmanagement");
      toolsDropdown.addComponent(membersLink);
    }

    if (reSecurity.isEntryAdmin() || reSecurity.isCourseCoach() || reSecurity.isGroupCoach()) {
      assessmentLink =
          LinkFactory.createToolLink(
              "assessment", translate("command.openassessment"), this, "o_icon_assessment_tool");
      assessmentLink.setElementCssClass("o_sel_course_assessment_tool");
      toolsDropdown.addComponent(assessmentLink);
    }

    if (reSecurity.isEntryAdmin()) {
      RepositoryEntry re = getRepositoryEntry();
      ordersLink =
          LinkFactory.createToolLink(
              "bookings", translate("details.orders"), this, "o_sel_repo_booking");
      ordersLink.setIconLeftCSS("o_icon o_icon-fw o_icon_booking");
      boolean booking = acService.isResourceAccessControled(re.getOlatResource(), null);
      ordersLink.setEnabled(booking);
      toolsDropdown.addComponent(ordersLink);
    }
  }
Пример #2
0
  @Override
  protected void initEditionTools(Dropdown settingsDropdown) {
    super.initEditionTools(settingsDropdown);
    if (reSecurity.isEntryAdmin()) {
      settingsLink =
          LinkFactory.createToolLink("metaDataConfig", translate("tab.video.settings"), this);
      settingsLink.setIconLeftCSS("o_icon o_icon-fw o_icon_quota o_icon_settings");
      settingsDropdown.addComponent(4, settingsLink);

      changeVideoLink =
          LinkFactory.createToolLink("changeVideo", translate("tab.video.exchange"), this);
      changeVideoLink.setIconLeftCSS("o_icon o_icon_refresh o_icon-fw");
      settingsDropdown.addComponent(3, changeVideoLink);

      settingsDropdown.addComponent(new Spacer("metadata-poster"));
    }
  }
Пример #3
0
  @Override
  protected void initSettingsTools(Dropdown settingsDropdown) {
    super.initSettingsTools(settingsDropdown);
    if (reSecurity.isEntryAdmin()) {
      settingsDropdown.addComponent(new Spacer(""));

      deliveryOptionsLink =
          LinkFactory.createToolLink("layout", translate("tab.layout"), this, "o_sel_repo_layout");
      deliveryOptionsLink.setIconLeftCSS("o_icon o_icon-fw o_icon_options");
      settingsDropdown.addComponent(deliveryOptionsLink);
    }
  }