<div
  class="course-publicationcheck"
  data-test-course-publicationcheck
  {{scroll-into-view}}
>
  <LinkTo @route="course" @model={{@course}} data-test-back-to-course>
    {{t "general.backToTitle" title=@course.title}}
  </LinkTo>

  <section class="course-publicationcheck-details">
    <div class="title">
      {{t "general.missingItems"}} ({{@course.allPublicationIssuesLength}})
    </div>
    <div class="course-publicationcheck-content">
      <table>
        <thead>
        <tr>
          <th>
            {{t "general.courseTitle"}}
          </th>
          <th>
            {{t "general.cohorts"}}
          </th>
          <th>
            {{t "general.terms"}}
          </th>
          <th>
            {{t "general.objectives"}}
          </th>
          <th>
            {{t "general.meshTerms"}}
          </th>
        </tr>
        </thead>
        <tbody>
        <tr>
          <td data-test-course-title>
            {{@course.title}}
          </td>
          {{#if @course.cohorts.length}}
            <td class="yes" data-test-cohorts>
              {{t "general.yes"}} ({{@course.cohorts.length}})
            </td>
          {{else}}
            <td class="no" data-test-cohorts>
              {{t "general.no"}}
            </td>
          {{/if}}
          {{#if @course.terms.length}}
            <td class="yes" data-test-terms>
              {{t "general.yes"}} ({{@course.terms.length}})
            </td>
          {{else}}
            <td class="no" data-test-terms>
              {{t "general.no"}}
            </td>
          {{/if}}
          {{#if (has-many-length @course "courseObjectives")}}
            <td class="yes" data-test-objectives>
              {{t "general.yes"}} ({{has-many-length @course "courseObjectives"}})
              {{#if this.showUnlinkIcon}}
                <LinkTo
                  @route="course"
                  @model={{@course}}
                  @query={{hash details=true courseObjectiveDetails=true}}
                  data-test-unlink
                >
                  <FaIcon @icon="link-slash" />
                </LinkTo>
              {{/if}}
            </td>
          {{else}}
            <td class="no" data-test-objectives>
              {{t "general.no"}}
            </td>
          {{/if}}
          {{#if @course.meshDescriptors.length}}
            <td class="yes" data-test-mesh>
              {{t "general.yes"}} ({{@course.meshDescriptors.length}})
            </td>
          {{else}}
            <td class="no" data-test-mesh>
              {{t "general.no"}}
            </td>
          {{/if}}
        </tr>
        </tbody>
      </table>
    </div>
  </section>
</div>
