Exemplo n.º 1
0
 private void header(SafeHtmlBuilder sb) {
   sb.openTr()
       .openTh()
       .setStyleName(style.legacy_id())
       .append(Resources.C.patchSet())
       .closeTh()
       .openTh()
       .append(Resources.C.commit())
       .closeTh()
       .openTh()
       .append(Resources.C.date())
       .closeTh()
       .openTh()
       .append(Resources.C.author())
       .closeTh()
       .closeTr();
 }
Exemplo n.º 2
0
  private void revision(SafeHtmlBuilder sb, int index, RevisionInfo r) {
    CommitInfo c = r.commit();
    sb.openTr();
    if (revision.equals(r.name())) {
      sb.setStyleName(style.current());
    }

    sb.openTd().setStyleName(style.legacy_id());
    if (r.draft()) {
      sb.append(Resources.C.draft()).append(' ');
    }
    sb.append(r.id());
    sb.closeTd();

    sb.openTd()
        .setStyleName(style.commit())
        .openAnchor()
        .setAttribute("href", "#" + url(r))
        .setAttribute("onclick", OPEN + "(event," + index + ")")
        .append(r.name().substring(0, 10))
        .closeAnchor()
        .closeTd();

    sb.openTd().append(FormatUtil.shortFormatDayTime(c.committer().date())).closeTd();

    String an = c.author() != null ? c.author().name() : "";
    String cn = c.committer() != null ? c.committer().name() : "";
    sb.openTd();
    sb.append(an);
    if (!"".equals(an) && !"".equals(cn) && !an.equals(cn)) {
      sb.append(" / ").append(cn);
    }
    sb.closeTd();

    sb.closeTr();
  }