<% if (offset + index - 1) != 1 %>
  1. <%= link_to("Move First", {:action => 'move_first', :id => object}.update(extra_params), {:title => "Move to the first position", :post => true }) %>
  2. <%= link_to("Move Up", {:action => 'move_up', :id => object}.update(extra_params), {:title => "Move up", :post => true }) %>
  3. <% else %>
  4. Move First
  5. Move Up
  6. <% end %> <% if (offset + index - 1) != object_count %>
  7. <%= link_to("Move Down", {:action => 'move_down', :id => object}.update(extra_params), {:title => "Move down", :post => true }) %>
  8. <%= link_to("Move Last", {:action => 'move_last', :id => object}.update(extra_params), {:title => "Move to the last position", :post => true }) %>
  9. <% else %>
  10. Move Down
  11. Move Last
  12. <% end %>