refactoring

This commit is contained in:
albert
2011-06-12 16:41:23 -04:00
parent 033f0fc266
commit d6e4283cc7
41 changed files with 197 additions and 429 deletions

View File

@@ -22,8 +22,6 @@
</ul>
</section>
<%= render :partial => "posts/partials/index/explore", :locals => {:post_set => @post_set} %>
<section id="tag-box">
<h1>Tags</h1>
<%= @post_set.presenter.tag_list_html(self) %>

View File

@@ -7,7 +7,7 @@
<li>Subscriptions</li>
<li><%= link_to "Changes", post_versions_path %></li>
<li>Approvals</li>
<li><%= link_to "Moderate", post_moderation_moderate_path %></li>
<li><%= link_to "Moderate", moderation_post_dashboard_path %></li>
<li>Help</li>
</menu>
<% end %>

View File

@@ -1,10 +0,0 @@
<% if post_set.date_tag %>
<section>
<h1>Explore</h1>
<ul>
<li>&laquo; Day &raquo;</li>
<li>&laquo; Week &raquo;</li>
<li>&laquo; Month &raquo;</li>
</ul>
</section>
<% end %>

View File

@@ -6,12 +6,12 @@
<li><%= link_to "Flag", new_post_flag_path(:post_id => post.id), :id => "flag" %></li>
<li><%= link_to "Appeal", new_post_appeal_path(:post_id => post.id), :id => "appeal" %></li>
<% if CurrentUser.is_janitor? %>
<li><%= link_to "Approve", post_moderation_approve_path(:post_id => post.id), :remote => true, :method => :put, :id => "approve" %></li>
<li><%= link_to "Disapprove", post_moderation_disapprove_path(:post_id => post.id), :remote => true, :method => :put, :id => "disapprove" %></li>
<li><%= link_to "Approve", moderation_post_approval_path(:post_id => post.id), :remote => true, :method => :post, :id => "approve" %></li>
<li><%= link_to "Disapprove", moderation_post_approval_path(:post_id => post.id), :remote => true, :method => :destroy, :id => "disapprove" %></li>
<% end %>
<% if CurrentUser.is_moderator? %>
<li><%= link_to "Undelete", post_moderation_undelete_path(:post_id => post.id), :remote => true, :method => :post, :id => "undelete" %></li>
<li><%= link_to "Delete", post_moderation_delete_path(:post_id => post.id), :remote => true, :method => :post, :id => "delete" %></li>
<li><%= link_to "Undelete", moderation_post_deletion_path(:post_id => post.id), :remote => true, :method => :destroy, :id => "undelete" %></li>
<li><%= link_to "Delete", moderation_post_deletion_path(:post_id => post.id), :remote => true, :method => :post, :id => "delete" %></li>
<% end %>
<li><%= link_to "Pool", "#", :id => "pool" %></li>
</ul>

View File

@@ -1,13 +1,13 @@
<ul>
<% post.pools.each do |pool| %>
<li>
<% if pool.neighbor_posts(post)[:previous] %>
<%= link_to "&laquo;".html_safe, post_path(pool.neighbor_posts(post)[:previous]) %>
<% if pool.neighbors(post).previous %>
<%= link_to "&laquo;".html_safe, post_path(pool.neighbors(post).previous) %>
<% else %>
&laquo;
<% end %>
<% if pool.neighbor_posts(post)[:next] %>
<%= link_to "&raquo;".html_safe, post_path(pool.neighbor_posts(post)[:next]) %>
<% if pool.neighbors(post).next %>
<%= link_to "&raquo;".html_safe, post_path(pool.neighbors(post).next) %>
<% else %>
&raquo;
<% end %>

View File

@@ -57,6 +57,10 @@
</section>
<section id="notes">
<% if @post.notes.active.empty? %>
<p>There are no notes.</p>
<% end %>
<%= render :partial => "notes/note", :collection => @post.notes.active %>
</section>
@@ -75,7 +79,7 @@
</div>
<div id="add-to-pool-dialog" title="Add to Pool">
<%= render :template => "pools_posts/new" %>
<%= render :template => "pool_elements/new" %>
</div>
</div>