@Override
  protected void createFinalCells(HtmlTableRow tableRow, BlockResumeResult blockResumeResult) {
    CurricularCourseResumeResult courseResumeResult =
        (CurricularCourseResumeResult) blockResumeResult;

    HtmlInlineContainer container = new HtmlInlineContainer();
    HtmlTableCell linksCell = tableRow.createCell();
    HtmlMenu menu = new HtmlMenu();
    menu.setOnChange(
        "var value=this.options[this.selectedIndex].value; this.selectedIndex=0; if(value!= ''){ window.open(value,'_blank'); }");
    menu.setStyle("width: 150px");
    HtmlMenuOption optionEmpty =
        menu.createOption(
            RenderUtils.getResourceString("INQUIRIES_RESOURCES", "label.inquiry.emptyOption"));

    createResultsGroup(courseResumeResult, menu);
    createReportsGroup(courseResumeResult, menu);

    container.addChild(menu);
    ResultClassification forAudit =
        ResultClassification.getForAudit(
            courseResumeResult.getExecutionCourse(), courseResumeResult.getExecutionDegree());
    createCommentLink(courseResumeResult, container, forAudit);

    linksCell.setBody(container);
    linksCell.setClasses("col-actions");
  }
  @Override
  public HtmlComponent render(Object object, Class type) {
    HtmlInlineContainer container = new HtmlInlineContainer();

    String prefix =
        HtmlComponent.getValidIdOrName(
            ((MetaSlot) getInputContext().getMetaObject())
                .getKey()
                .toString()
                .replaceAll("\\.", "_")
                .replaceAll("\\:", "_"));

    HtmlHiddenField hidden = new HtmlHiddenField(prefix + HIDDEN_NAME, "");

    HtmlMenu menu = (HtmlMenu) super.render(object, type);
    menu.setOnChange("this.form." + prefix + HIDDEN_NAME + ".value='true';this.form.submit();");
    menu.setController(new PostBackController(hidden, getDestination()));

    container.addChild(hidden);
    container.addChild(menu);

    return container;
  }
  protected void createCommentLink(
      CurricularCourseResumeResult courseResumeResult,
      HtmlInlineContainer container,
      ResultClassification forAudit) {
    container.addChild(new HtmlText(" | ", false));

    String commentLinkText =
        RenderUtils.getResourceString("INQUIRIES_RESOURCES", "link.inquiry.comment");
    if (courseResumeResult.isShowAllComments() || !courseResumeResult.isAllowComment()) {
      commentLinkText =
          RenderUtils.getResourceString("INQUIRIES_RESOURCES", "link.inquiry.viewResults");
    } else if (hasQucGlobalCommentsMadeBy(
        courseResumeResult.getExecutionCourse(),
        courseResumeResult.getPerson(),
        courseResumeResult.getExecutionDegree(),
        courseResumeResult.getPersonCategory())) {
      commentLinkText =
          RenderUtils.getResourceString("INQUIRIES_RESOURCES", "link.inquiry.viewComment");
    }

    String fillInParameters = buildFillInParameters(courseResumeResult);
    HtmlLink commentLink = new HtmlLink();
    commentLink.setUrl(getAction() + "?method=" + getMethod() + fillInParameters);
    commentLink.setText(commentLinkText);
    container.addChild(commentLink);

    if (courseResumeResult.getExecutionCourse().getExecutionCourseAudit() != null
        && courseResumeResult.getExecutionCourse().getExecutionCourseAudit().isProcessAvailable()) {
      container.addChild(new HtmlText(" | ", false));
      HtmlLink auditLink = new HtmlLink();
      auditLink.setUrl(
          "/auditResult.do?method=viewProcessDetails&"
              + buildParametersForAudit(courseResumeResult));
      auditLink.setText("Ver processo auditoria");
      container.addChild(auditLink);

    } else {
      if (forAudit != null) {
        if (forAudit.equals(ResultClassification.RED)) {
          container.addChild(
              new HtmlText(
                  " ("
                      + RenderUtils.getResourceString("INQUIRIES_RESOURCES", "label.inquiry.audit")
                      + ")"));
        } else if (forAudit.equals(ResultClassification.YELLOW)) {
          container.addChild(
              new HtmlText(
                  " ("
                      + RenderUtils.getResourceString(
                          "INQUIRIES_RESOURCES", "label.inquiry.inObservation")
                      + ")"));
        }
      }
    }
  }