<% if @papers.any? %>
  <table class="toc-table">
    <tbody>
      <% @papers.each do |paper| %>
      <tr>
        <td>
          <%= link_to paper.title, paper.seo_url, title: paper.title, class: "d-inline-block text-truncate", style: "max-width: 450px;" %>
        </td>
        <td>
          <div class="time">Published <%= paper.accepted_at.strftime("%Y-%m-%d") %> </div>
        </td>
        <td>
          <%= image_tag 'doi.svg' %><%= link_to paper.doi, paper.seo_url %>
        </td>
      </tr>
      <% end %>
    </tbody>
  </table>

  <div class="row">
    <div class="pagination_helper">
      <%== pagy_info(@pagy, item_name: t("paper", count: @papers.size)) %>
    </div>
    <%= pagy_pagination(@pagy) if @pagy.pages > 1 %>
  </div>
<% else %>
  <table class="toc-table">
    <tbody><tr><td>No papers</td></tr></tbody>
  </table>
<% end %>
