{{#if view.jobs.length}}
  <section id={{view.jobTableId}}>

  {{#if view.required}}
    <h2 class="build-title">Build Jobs</h2>
  {{else}}
    <h2 class="build-title">Allowed Failures
      <div class="tooltip--jobs">
        <span class="icon icon--question"></span>
        <p class="tooltip-bubble">These are jobs are allowed to fail, without failing your entire build.</p>
      </div>
    </h2>
  {{/if}}

    {{#each view.jobs as |job|}}
      {{#view 'jobs-item' context=job}}
        <div class="tile tile--jobs row {{job.state}}">
          {{#if job.config}}
            {{#link-to "job" job.repo job}}

              <div class="tile-status tile-status--job">
                <span class="icon icon--job {{job.state}}"></span>
              </div>

              <p class="job-id jobs-item build-status">
                <span class="icon icon--hash-dark"></span>
                {{#if job.id}}
                  {{#if job.repo.slug}}
                    {{number}}
                  {{/if}}
                {{/if}}
              </p>

            <p class="job-os jobs-item build-os {{config.os}}">
              <span class="icon {{config.os}}"></span>
              {{!-- {{config.os}} --}}
            </p>

            {{#if view.languages}}
              <p class="job-lang jobs-item build-lang">
                <span class="icon icon--lang"></span>
                {{view.languages}}
              </p>
            {{else}}
              <p class="job-lang jobs-item build-lang is-empty">
                <span class="icon icon--lang"></span>
                no language set
              </p>
            {{/if}}

            <div class="job-anchor jobs-item">
              {{#if config.env}}
                <p class="job-env jobs-item build-env">
                  <span class="icon icon--env"></span>
                  {{config.env}}
                </p>
              {{else}}
                <p class="job-env jobs-item build-env is-empty">
                  <span class="icon icon--env"></span>
                  no environment variables set
                </p>
              {{/if}}

              <p class="job-duration jobs-item" title={{startedAt}}>
                <span class="icon icon--clock-dark"></span>
                {{format-duration duration}}
              </p>

            </div>

              {{!-- <p class="" title={{formattedFinishedAt}}>
                <span class="icon icon--cal"></span>
                {{format-time finishedAt}}
              </p> --}}

            {{/link-to}}
          {{else}}
            {{loading-indicator}}
          {{/if}}
        </div>
      {{/view}}
      {{!-- {{job.configKeys}} --}}
    {{/each}}
  </section>
{{/if}}
