<div class="test-case-table">
  <div class="section-header">
    <h4>
      <text class="title">
        <%= header %> Examples (<%= test_cases.count %>)
      </text>
      <span class="glyphicon glyphicon-menu-down results-dropdown" data-toggle="collapse"
            data-target="#<%=header%>_results"
            title="Toggle Display of Results"></span>
    </h4>
  </div>

  <div class="test-case-listings collapse in" id="<%=header%>_results">
    <ui>
      <% test_cases.each do |test_case_result| %>
        <div class="test-case-listing">
          <% if (defined? linkable_test_cases) && (linkable_test_cases == true) %>
            <!--If linkable_test_cases var defined and is true, link to the TestCaseResult-->
            <!--Failures make more sense to link as they provide more data-->
            <%= link_to(test_case_result.test_case.name,
                        test_case_result,
                        data: { 'result_id' => test_case_result.id },
                        class: 'test-case-listing-url'
                ) %>
            <%= render 'smoca_build/quick_exception_view/quick_exception_view',
                       test_case_result: test_case_result %>
          <% else %>
            <!--Non-Link to the test case-->
            <text><%= test_case_result.test_case.name %></text>
          <% end %>
        </div>
      <% end %>
    </ui>
  </div>
</div>
