fixed pool deletion logic

This commit is contained in:
albert
2012-03-15 18:26:39 -04:00
parent 1736ed17a9
commit 779d83e253
7 changed files with 48 additions and 8 deletions

View File

@@ -9,7 +9,11 @@
<li><%= link_to "Posts", posts_path(:tags => "pool:#{@pool.id}") %></li>
<li><%= link_to "Edit", edit_pool_path(@pool) %></li>
<% if @pool.deletable_by?(CurrentUser.user) %>
<li><%= link_to "Delete", pool_path(@pool), :method => :delete, :confirm => "Are you sure you want to delete this pool?", :remote => true %></li>
<% if @pool.is_deleted? %>
<li><%= link_to "Undelete", undelete_pool_path(@pool), :method => :post, :remote => true %></li>
<% else %>
<li><%= link_to "Delete", pool_path(@pool), :method => :delete, :confirm => "Are you sure you want to delete this pool?", :remote => true %></li>
<% end %>
<% end %>
<li><%= link_to "Order", edit_pool_order_path(@pool) %></li>
<% end %>

View File

@@ -46,6 +46,8 @@
<menu id="post-sections">
<li><a href="#comments">Comments</a></li>
<li><a href="#edit" id="post-edit-link">Edit</a></li>
<li><a href="#favorite-tab">Favorite</a></li>
<li><a href="#share">Share</a></li>
</menu>
<section id="comments">
@@ -59,6 +61,14 @@
<section id="edit" style="display: none;">
<%= render "posts/partials/show/edit", :post => @post %>
</section>
<section id="favorite-tab" style="display: none;">
<p>Favoriting...</p>
</section>
<section id="share-tab" style="display: none;">
<h1>Share</h1>
</section>
</section>
</div>