<% if book_collection.any? %>
  <table class="table table-striped">
  	<thead>
  		<tr>
  			<th class="reading-title">Title</th>
  			<th class="reading-author">Author</th>
  			<th class="reading-pages">Pages</th>
        <% if logged_in? %>
          <th class="reading-edit"></th>
        <% end %>
  		</tr>
  	</thead>
  	<tbody>
      <% book_collection.each do |book| %>
        <tr>
          <td class="reading-title">
          	<p class="title">
              <% if book.amazon_link %>
          		  <%= link_to book.title, book.amazon_link %>
            	<% else %>
            		<%= book.title %>
            	<% end %>
            </p>
          	<% if book.subtitle %>
          		<p class="subtitle"><%= book.subtitle %></p>
          	<% end %>
          </td>
          <td class="reading-author"><ul class="list-unstyled"><%= book.author.split("\n").map{|a| "<li>#{a}</li>"}.join.html_safe %></ul></td>
          <td class="reading-pages">
            <%= number_with_delimiter(book.page_count, delimeter: ",") %>
          </td>
          <% if logged_in? %>
            <td class="reading-edit">
              <%= link_to("<span class=\"glyphicon glyphicon-pencil\"></span>".html_safe, edit_book_path(book), title: "Edit #{book.title}", class: "btn btn-default") %>
            </td>
          <% end %>
        </tr>
      <% end %>
    </tbody>
  </table>
<% end %>
<% if book_collection.any? %>
  <table class="table table-striped">
  	<thead>
  		<tr>
  			<th class="reading-title">Title</th>
  			<th class="reading-author">Author</th>
  			<th class="reading-pages">Pages</th>
        <% if logged_in? %>
          <th class="reading-edit"></th>
        <% end %>
  		</tr>
  	</thead>
  	<tbody>
      <% book_collection.each do |book| %>
        <tr>
          <td class="reading-title">
          	<p class="title">
            	<%= book.title %>
            </p>
          	<% if book.subtitle %>
          		<p class="subtitle"><%= book.subtitle %></p>
          	<% end %>
          </td>
          <td class="reading-author"><ul class="list-unstyled"><%= book.author.split("\n").map{|a| "<li>#{a}</li>"}.join.html_safe %></ul></td>
          <td class="reading-pages">
            <%= number_with_delimiter(book.page_count, delimeter: ",") %>
          </td>
          <% if logged_in? %>
            <td class="reading-edit">
              <%= link_to("<span class=\"glyphicon glyphicon-pencil\"></span>".html_safe, edit_book_path(book), title: "Edit #{book.title}", class: "btn btn-default") %>
            </td>
          <% end %>
        </tr>
      <% end %>
    </tbody>
  </table>
<% end %>
Remove Amazon link from Books index
Remove Amazon link from Books index
