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

@@ -1,6 +0,0 @@
<%= simple_form_for(@pool) do |f| %>
<h2>Edit Pool: <%= @pool.name %></h2>
<p>If you know the precise ordering of posts that you want, you can just enter them here instead of sorting each post manually. Enter a list of post ids separated by spaces.</p>
<%= f.input :post_ids, :label => "Posts" %>
<%= f.button :submit %>
<% end %>

View File

@@ -1,5 +0,0 @@
<%= simple_form_for(pool) do |f| %>
<%= f.input :name %>
<%= f.input :description %>
<%= f.button :submit %>
<% end %>

View File

@@ -7,8 +7,8 @@
<li>|</li>
<li><%= link_to "Show", pool_path(@pool) %></li>
<li><%= link_to "Posts", posts_path(:tags => "pool:#{@pool.id}") %></li>
<li><%= link_to "Simple Edit", edit_pool_path(@pool) %></li>
<li><%= link_to "Advanced Edit", edit_pool_path(@pool, :advanced => true) %></li>
<li><%= link_to "Edit", edit_pool_path(@pool) %></li>
<li><%= link_to "Order", edit_pool_order_path(@pool) %></li>
<% end %>
</menu>
<% end %>

View File

@@ -1,17 +0,0 @@
<h2>Edit Pool: <%= @pool.name %></h2>
<p>Drag and drop the list below to determine ordering.</p>
<ul id="sortable">
<% posts.each do |post| %>
<li class="ui-state-default" id="pool[post_id_array]_<%= post.id %>">
<%= link_to(image_tag(post.preview_file_url), post_path(post)) %>
<span class="ui-icon ui-icon-closethick delete" title="Remove post"></span>
</li>
<% end %>
</ul>
<%= simple_form_for(@pool, :format => :js, :html => {:id => "ordering-form"}) do |f| %>
<%= f.input :name %>
<%= f.input :description %>
<%= submit_tag "Save" %>
<% end %>

View File

@@ -1,10 +1,12 @@
<div id="c-pools">
<div id="a-edit">
<% if params[:advanced] %>
<%= render "advanced_edit" %>
<% else %>
<%= render :partial => "simple_edit", :locals => {:posts => @pool.posts} %>
<% end %>
<%= simple_form_for(@pool) do |f| %>
<h1>Edit Pool: <%= @pool.name %></h1>
<%= f.input :name %>
<%= f.input :description %>
<%= f.input :post_ids, :label => "Posts" %>
<%= f.button :submit %>
<% end %>
</div>
</div>

View File

@@ -1,9 +1,10 @@
<div id="c-pools">
<div id="a-show">
<aside id="sidebar">
<h2>Pool: <%= @pool.name %></h2>
<p><%= format_text(@pool.description) %></p>
</aside>
<h1>Pool: <%= @pool.name %></h1>
<div id="description">
<%= format_text(@pool.description) %>
</div>
<section id="content">
<%= @post_set.presenter.post_previews_html %>
@@ -11,7 +12,9 @@
<div class="clearfix"></div>
<div class="paginator">
<%= @post_set.presenter.pagination_html(self) %>
<%= numbered_paginator(@post_set) do |page| %>
<%= link_to(page, pool_path(@pool, :page => page)) %>
<% end %>
</div>
</section>
</div>