fixed upload->post converion process

This commit is contained in:
albert
2010-03-17 19:20:44 -04:00
parent ca8be10ab9
commit dcf8d0df4c
20 changed files with 346 additions and 100 deletions

View File

@@ -1,6 +1,6 @@
<% content_for(:secondary_nav_links) do %>
<menu>
<li>Listing</li>
<li><%= link_to "Listing", posts_path %></li>
<li><%= link_to "Upload", new_upload_path %></li>
<li>Popular</li>
<li>Favorites</li>
@@ -10,4 +10,4 @@
<li>Moderate</li>
<li>Help</li>
</menu>
<% end %>
<% end %>

View File

@@ -71,14 +71,10 @@
</section>
<footer>
<%= @post_set.presenter.pagination_html %>
<%= @post_set.presenter.pagination_html(self) %>
</footer>
<% content_for(:page_title) do %>
/<%= @post_set.tags %>
<% end %>
<% content_for(:page_header) do %>
/ <%= @post_set.tags %>
<% end %>

View File

@@ -0,0 +1,87 @@
<aside>
<section>
<h1>Search</h1>
<% form_tag(posts_path, :method => "get") do %>
<%= text_field_tag("tags", params[:tags], :size => 20) %>
<%= submit_tag "Go" %>
<% end %>
</section>
<section>
<h1>Tags</h1>
<%= @post.presenter.tag_list_html %>
</section>
<section>
<h1>Information</h1>
<ul>
<li>Id: <%= @post.id %></li>
<li>Uploaded <%= time_ago_in_words(@post.created_at) %> ago by <%= link_to_unless(@post.uploader.nil?, @post.uploader_name, user_path(@post.uploader)) %></li>
<% if @post.approver %>
<li>Approver: <%= @post.approver.name %></li>
<% end %>
<% if @post.is_image? %>
<li>
[M]
[L]
[O]
</li>
<% end %>
<li><%= link_to "Tag History", post_versions_path(:post_id => @post) %></li>
<li><%= link_to "Note History", note_versions_path(:post_id => @post) %></li>
</ul>
</section>
<section>
<h1>Options</h1>
<menu>
<% if !@post.is_deleted? && @post.is_image? && @post.image_width && @post.image_width > 700 %>
<li><%= link_to "Resize", "#" %></li>
<% end %>
<li><%= link_to "Favorite", "#" %></li>
<li><%= link_to "Unfavorite", "#" %></li>
<li><%= link_to "Add translation", "#" %></li>
<li><%= link_to "Unapprove", "#" %></li>
<% if @current_user.is_janitor? %>
<li><%= link_to "Approve", "#" %></li>
<li><%= link_to "Undelete", "#" %></li>
<li><%= link_to "Delete", "#" %></li>
<% end %>
<li><%= link_to "Add to Pool", "#" %></li>
</menu>
</section>
</aside>
<section>
<h1>Post</h1>
<section>
<h2>Image</h2>
<%= @post.presenter.image_html %>
</section>
<section>
<h2>Notes</h2>
<%= @post.presenter.note_html %>
</section>
<section>
<h2>Comments</h2>
</section>
<section>
<h2>Edit</h2>
</section>
</section>
<% content_for(:page_title) do %>
/ <%= @post.tag_string %>
<% end %>
<% content_for(:html_header) do %>
<meta name="tags" content="<%= @post.tag_string %>">
<meta name="favorites" content="<%= @post.fav_string %>">
<meta name="pools" content="<%= @post.pool_string %>">
<% end %>
<%= render :partial => "posts/common_secondary_nav_links" %>