<table class="table table-bordered">
  <tbody>
    <tr>
      <th style="width: 80px"></th>
      <th>Nazwa</th>
    </tr>
    <% for pp in @published_pages %>
      <tr>
        <td>
          <% if !@pp_first.blank? && @pp_first.id == pp.id %>
            <%= link_to raw('<i class="fa fa-caret-square-o-up"></i>'), '#', class: 'btn btn-xs btn-success', remote: true, title: 'Do góry', disabled: 'disabled' %>
          <% else %>
            <%= link_to raw('<i class="fa fa-caret-square-o-up"></i>'), {controller: '/admin/all_page', action: 'pp_priority_up', id: pp.id}, class: 'btn btn-xs btn-success', remote: true, title: 'Do góry' %>
          <% end %>
          <% if !@pp_last.blank? && @pp_last.id == pp.id %>
            <%= link_to raw('<i class="fa fa-caret-square-o-down"></i>'), '#', class: 'btn btn-xs btn-primary', remote: true, title: 'W dół', disabled: 'disabled' %>

          <% else %>
            <%= link_to raw('<i class="fa fa-caret-square-o-down"></i>'), {controller: '/admin/all_page', action: 'pp_priority_down', id: pp.id}, class: 'btn btn-xs btn-primary', remote: true, title: 'W dół' %>
          <% end %>

        </td>
        <td>
          <%= pp.name %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>
