<h1><%= @book.name %> Contents:</h1>

<ol>
  <% for chapter in @chapters %>
    <li>    
      <%= chapter.name %>
      <i>[ move: 
      <% unless chapter.first? %>
        <%= link_to "up", { :action => "move", 
                            :method => "move_higher", 
                            :id => params["id"],
                            :ch_id => chapter.id } %> 

        <%= link_to "top", { :action => "move", 
                             :method => "move_to_top",
                             :id => params["id"],
                             :ch_id => chapter.id } %> 
      <% end %>

      <% unless chapter.last? %>
        <%= link_to "down", { :action => "move", 
                              :method => "move_lower", 
                              :id => params["id"],
                              :ch_id => chapter.id } %> 

        <%= link_to "bottom", { :action => "move", 
                                :method => "move_to_bottom",
                                :id => params["id"],
                                :ch_id => chapter.id } %> 
      <% end %>
      ]</i>   
    </li>   
  <% end %>
</ol>