<commit_before><%= render :partial => 'survey_page/tabs' %>

<%= pagination_links @responses, :params => {:action => 'list'} %>

<table id='survey_answers' class='pretty'>
  <tr>
    <th>user</th>
    <th>created</th>
    <!-- <th>modified</th> -->
    <th>rating</th>
    <%- (questions=@survey.questions[0..0]).each do |question| -%>
      <th><%= truncate(question.label) %></th>
    <%- end -%>
  </tr>
  <%- @responses.each do |resp| -%>
    <% url = page_url(@page, :action => 'response-show', :id => resp.id) %>
    <tr class="<%= cycle 'odd', 'even' %>">
      <td><%= resp.user.login if resp.user_id %></td>
      <td><%= friendly_date resp.created_at %></td>
      <!-- <td><%# friendly_date resp.updated_at %></td> -->
      <% if may_view_survey_response_ratings?(resp) %>
        <td><%= resp.rating.round(2) %></td>
      <% else %>
        <td>&mdash;</td>
      <% end %>
      <%- questions.each do |question| -%>
      <td>
        <%- if may_view_survey_question?(resp, question) -%>
          <% answer = resp.answers.detect{|a|a.question_id == question.id} %>
          <%= answer && answer.value.any? ? truncate(answer.value, 250, "...") : '&nbsp;' %>
          <span class="more"> <%= link_to('see whole response'.t, url) %></span>
         <%- else -%>
          &mdash;
        <%- end -%>
      </td>
      <%- end -%>
    </tr>
  <%- end -%>
</table>

<%= pagination_links @responses, :params => {:action => 'list'} %>

<br/><commit_msg>fixes #1334 - survey response list pagination should work now<commit_after><%= render :partial => 'survey_page/tabs' %>

<%= pagination_links @responses, :params => {:action => 'response-list'} %>

<table id='survey_answers' class='pretty'>
  <tr>
    <th>user</th>
    <th>created</th>
    <!-- <th>modified</th> -->
    <th>rating</th>
    <%- (questions=@survey.questions[0..0]).each do |question| -%>
      <th><%= truncate(question.label) %></th>
    <%- end -%>
  </tr>
  <%- @responses.each do |resp| -%>
    <% url = page_url(@page, :action => 'response-show', :id => resp.id) %>
    <tr class="<%= cycle 'odd', 'even' %>">
      <td><%= resp.user.login if resp.user_id %></td>
      <td><%= friendly_date resp.created_at %></td>
      <!-- <td><%# friendly_date resp.updated_at %></td> -->
      <% if may_view_survey_response_ratings?(resp) %>
        <td><%= resp.rating.round(2) %></td>
      <% else %>
        <td>&mdash;</td>
      <% end %>
      <%- questions.each do |question| -%>
      <td>
        <%- if may_view_survey_question?(resp, question) -%>
          <% answer = resp.answers.detect{|a|a.question_id == question.id} %>
          <%= answer && answer.value.any? ? truncate(answer.value, 250, "...") : '&nbsp;' %>
          <span class="more"> <%= link_to('see whole response'.t, url) %></span>
         <%- else -%>
          &mdash;
        <%- end -%>
      </td>
      <%- end -%>
    </tr>
  <%- end -%>
</table>

<%= pagination_links @responses, :params => {:action => 'response-list'} %>

<br/>
{'fraction_non_alphanumeric': 0.24649298597194388, 'fraction_numerical': 0.005344021376085505, 'mean_word_length': 2.552787663107948, 'pattern_counts': {'":': 0, '<': 119, '<?xml version=': 0, '>': 133, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '531374', 'n_tokens_mistral': 1184, 'n_tokens_neox': 1093, 'n_words': 199}