Beispiel #1
0
  @Override
  public Component getContent(Project project, ExtensionUtil util) {
    Layout layout = new CssLayout();
    layout.addStyleName(STYLE_TEAM_INFOBOX);
    layout.setSizeFull();
    PeopleExtension ext = project.getExtension(PeopleExtension.class);
    if (ext != null) {
      if (ext.getLeads().size() > 0) {
        Label projectLeadHeaderLabel = new Label("Project Lead");
        projectLeadHeaderLabel.addStyleName(STYLE_TEAMLABEL);
        layout.addComponent(projectLeadHeaderLabel);
        Component peopleComponent = PeopleComponent.getPeopleListComponentForMember(ext.getLeads());
        peopleComponent.addStyleName(InformationBox.STYLE);
        layout.addComponent(peopleComponent);
      }

      if (ext.getMembers().size() > 0) {
        Label projectTeamHeaderLabel = new Label("Project Team/Committers");
        projectTeamHeaderLabel.addStyleName(STYLE_TEAMLABEL);
        layout.addComponent(projectTeamHeaderLabel);

        Component peopleComponent =
            PeopleComponent.getPeopleListComponentForMember(ext.getMembers());
        peopleComponent.addStyleName(InformationBox.STYLE);
        layout.addComponent(peopleComponent);
      }

      String mailToTeamHtml = new MailToTeam(ext).composeMailToTeamLabel();
      createLabel(layout, mailToTeamHtml);
    }
    return layout;
  }
Beispiel #2
0
 @Override
 public boolean isVisible(Project project, String loggedInUserId) {
   PeopleExtension ext = project.getExtension(PeopleExtension.class);
   if (ext == null || ext.getMembers().isEmpty() && ext.getLeads().isEmpty()) {
     return false;
   } else {
     return true;
   }
 }
 @Override
 public boolean isVisible(Project project, String loggedInUserId) {
   LinkGroupsProjectExt ext = project.getExtension(LinkGroupsProjectExt.class);
   if (ext == null || ext.getLinkGroups().isEmpty()) {
     return false;
   } else {
     return true;
   }
 }
  @Override
  public Component getContent(Project project, ExtensionUtil util) {
    Layout layout = new CssLayout();
    layout.addStyleName(SYTLE_LINKGROUPS_INFOBOX);
    layout.setSizeFull();
    LinkGroupsProjectExt ext = project.getExtension(LinkGroupsProjectExt.class);
    if (ext != null && !ext.getLinkGroups().isEmpty()) {
      for (LinkGroup linkGroup : ext.getLinkGroups()) {
        Label linkGroupHeaderLabel = new Label(linkGroup.getCaption());
        linkGroupHeaderLabel.addStyleName(STYLE_LABEL_GROUP);
        layout.addComponent(linkGroupHeaderLabel);

        for (Link link : linkGroup.getItems()) {
          com.vaadin.ui.Link uiLink =
              new com.vaadin.ui.Link(link.getLabel(), new ExternalResource(link.getUrl()));
          uiLink.setDescription(link.getUrl());
          uiLink.addStyleName(STYLE_LABEL_LINK);
          uiLink.setTargetName("_blank"); // $NON-NLS-1$
          layout.addComponent(uiLink);
        }
      }
    }
    return layout;
  }