fixed upload->post converion process
This commit is contained in:
@@ -13,63 +13,43 @@
|
||||
<%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" %>
|
||||
<%= javascript_include_tag "rails" %>
|
||||
<%= Danbooru.config.custom_html_header_content %>
|
||||
<%= yield :html_header_content %>
|
||||
<%= yield :html_header %>
|
||||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
<h1><%= link_to(Danbooru.config.app_name, "/") %><%= yield :page_title %></h1>
|
||||
<menu>
|
||||
<% if @current_user.is_anonymous? %>
|
||||
<%= nav_link_to("Login", new_session_path) %>
|
||||
<% else %>
|
||||
<%= nav_link_to("My Account", user_path(@current_user)) %>
|
||||
<% end %>
|
||||
<%= nav_link_to("Posts", posts_path) %>
|
||||
<%= nav_link_to("Comments", comments_path) %>
|
||||
<%= nav_link_to("Notes", notes_path) %>
|
||||
<%= nav_link_to("Artists", artists_path(:order => "date")) %>
|
||||
<%= nav_link_to("Tags", tags_path(:order => "date")) %>
|
||||
<%= nav_link_to("Pools", pools_path) %>
|
||||
<%= nav_link_to("Wiki", wiki_page_path(:id => "help:home")) %>
|
||||
<%= nav_link_to("Forum", forum_topics_path, :class => (@current_user.has_forum_been_updated? ? "forum-updated" : nil)) %>
|
||||
<%= nav_link_to("»".html_safe, site_map_path) %>
|
||||
</menu>
|
||||
<%= yield :secondary_nav_links %>
|
||||
</nav>
|
||||
|
||||
<header>
|
||||
<nav>
|
||||
<menu>
|
||||
<% if @current_user.is_anonymous? %>
|
||||
<%= nav_link_to("Login", new_session_path) %>
|
||||
<% else %>
|
||||
<%= nav_link_to("My Account", user_path(@current_user)) %>
|
||||
<% end %>
|
||||
<%= nav_link_to("Posts", posts_path) %>
|
||||
<%= nav_link_to("Comments", comments_path) %>
|
||||
<%= nav_link_to("Notes", notes_path) %>
|
||||
<%= nav_link_to("Artists", artists_path(:order => "date")) %>
|
||||
<%= nav_link_to("Tags", tags_path(:order => "date")) %>
|
||||
<%= nav_link_to("Pools", pools_path) %>
|
||||
<%= nav_link_to("Wiki", wiki_page_path(:id => "help:home")) %>
|
||||
<%= nav_link_to("Forum", forum_topics_path, :class => (@current_user.has_forum_been_updated? ? "forum-updated" : nil)) %>
|
||||
<%= nav_link_to("»".html_safe, site_map_path) %>
|
||||
</menu>
|
||||
<%= yield :secondary_nav_links %>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<% if flash[:notice] %>
|
||||
<div id="notice"><%= flash[:notice] %></div>
|
||||
<% else %>
|
||||
<div id="notice" style="display: none;"></div>
|
||||
<% end %>
|
||||
|
||||
<% if @current_user.has_mail? %>
|
||||
<div class="has-mail" id="has-mail-notice">
|
||||
<%= link_to "You have mail", dmails_path %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if !@current_user.is_privileged? %>
|
||||
<div id="upgrade-account" style="display: none;">
|
||||
<%= link_to "Upgrade your account for only $20", wiki_page_path(:id => "help:users") %>
|
||||
<%= link_to "No thanks", "#", :id => "hide-upgrade-account-link" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @current_user.is_banned? %>
|
||||
<div id="ban-reason">
|
||||
You have been banned.
|
||||
<% if @current_user.ban %>
|
||||
Reason: <%= @current_user.ban.reason %>.
|
||||
Expires: <%= @current_user.ban.expires_at.strftime('%Y-%m-%d') %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div id="content">
|
||||
<%= yield :layout %>
|
||||
</div>
|
||||
|
||||
<%= yield :page_footer_content %>
|
||||
|
||||
<footer>
|
||||
<%= yield :page_footer_content %>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
|
||||
@@ -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" %>
|
||||
|
||||
24
app/views/uploads/index.html.erb
Normal file
24
app/views/uploads/index.html.erb
Normal file
@@ -0,0 +1,24 @@
|
||||
<table width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Uploader</th>
|
||||
<th>Status</th>
|
||||
<th>Date</th>
|
||||
<th>Tags</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @uploads.each do |upload| %>
|
||||
<tr>
|
||||
<td><%= link_to upload.id, upload_path(upload) %></td>
|
||||
<td><%= link_to upload.uploader.name, user_path(upload.uploader) %></td>
|
||||
<td><%= upload.presenter.status(self) %></td>
|
||||
<td><%= upload.created_at %></td>
|
||||
<td><%= upload.tag_string %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= render :partial => "posts/common_secondary_nav_links" %>
|
||||
@@ -52,3 +52,5 @@
|
||||
<% content_for(:page_title) do %>
|
||||
/ Upload
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "posts/common_secondary_nav_links" %>
|
||||
|
||||
@@ -13,3 +13,7 @@
|
||||
<% else %>
|
||||
<p>An error occurred: <%= @upload.status %></p>
|
||||
<% end %>
|
||||
|
||||
<p>You can <%= link_to "upload another file", new_upload_path %> or <%= link_to "view your current uploads", uploads_path %>.</p>
|
||||
|
||||
<%= render :partial => "posts/common_secondary_nav_links" %>
|
||||
|
||||
Reference in New Issue
Block a user