<h1><%= t("scaffold.pagetitle_index", model: SuccessCriterion.model_name.human(count: 2)) %></h1>

<table class="table table-striped">
  <thead>
    <tr>
      <th><%= SuccessCriterion.human_attribute_name(:id) %></th>
      
        <th><%= SuccessCriterion.human_attribute_name(:element_id) %></th>
      
        <th><%= SuccessCriterion.human_attribute_name(:title) %></th>
      
        <th><%= SuccessCriterion.human_attribute_name(:level) %></th>
      
        <th><%= SuccessCriterion.human_attribute_name(:result) %></th>
      
        <th><%= SuccessCriterion.human_attribute_name(:test_comment) %></th>
      
  </thead>
  <tbody>
    <% @success_criteria.each do |success_criterion| %>
      <tr>
        <td><%= link_to(success_criterion.id, url_for(success_criterion)) %></td>
        
          <td><%= link_to(success_criterion.element_id, url_for(success_criterion)) %></td>
        
          <td><%= link_to(success_criterion.title, url_for(success_criterion)) %></td>
        
          <td><%= link_to(success_criterion.level, url_for(success_criterion)) %></td>
        
          <td><%= link_to(success_criterion.result, url_for(success_criterion)) %></td>
        
          <td><%= link_to(truncate(success_criterion.test_comment.to_plain_text), url_for(success_criterion)) %></td>
        
      </tr>
    <% end %>
  </tbody>
</table>

<div class="action-row">
  <%= link_to t("scaffold.link_new", model: SuccessCriterion.model_name.human), new_element_success_criterion_path(@element) %>
</div>