fixed pool sidebar in post/show

This commit is contained in:
albert
2011-03-13 18:12:42 -04:00
parent 90a41a334b
commit 7571280d72
6 changed files with 1349 additions and 12 deletions

View File

@@ -1,5 +1,17 @@
<ul>
<% post.pools.each do |pool| %>
<li><span class="ui-icon ui-icon-circle-arrow-w"></span><span class="ui-icon ui-icon-circle-arrow-e"></span> <%= link_to pool_path(pool), pool.name %></li>
<li>
<% if pool.neighbor_posts(post)[:previous] %>
<%= link_to "&laquo;".html_safe, post_path(pool.neighbor_posts(post)[:previous]) %>
<% else %>
&laquo;
<% end %>
<% if pool.neighbor_posts(post)[:next] %>
<%= link_to "&raquo;".html_safe, post_path(pool.neighbor_posts(post)[:next]) %>
<% else %>
&raquo;
<% end %>
<%= link_to pool.name, pool_path(pool) %>
</li>
<% end %>
</ul>

View File

@@ -7,9 +7,9 @@
</section>
<% if @post.pools.any? %>
<section>
<section id="pool-sidebar">
<h1>Pools</h1>
<%= render "posts/partials/show/pools", :locals => {:post => @post} %>
<%= render :partial => "posts/partials/show/pools", :locals => {:post => @post} %>
</section>
<% end %>