<%#
Copyright 2009 Timothy Fisher

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
%>
<%= stylesheet_link_tag 'book_reviews' %>

<div id="book_review_links">
	<% if logged_in? %>
		<div id="book_reviews_all"><%= link_to 'All Book Reviews' %></div>
		<div id="book_reviews_my"><%= link_to 'My Book Reviews', user_book_reviews_path(current_user) %></div>
		<div id="book_reviews_add"><%= link_to 'Add a Book Review', new_book_review_path %></div>
	<% end %>
</div>

<div id="book_reviews_table">
	<% @book_reviews.each do |review| %>
		<%= render :partial => 'book_review_brief', :locals=>{:review=>review} %>
	<% end %>
	<% if @book_reviews.length == 0 %>
		No reviews exist.
	<% end %>
</div>
<div style="clear:both;"></div>

