refactored source code, work on pixiv integration

This commit is contained in:
albert
2011-09-26 16:47:22 -04:00
parent 11b623c66b
commit 284141aace
19 changed files with 201 additions and 45 deletions

View File

@@ -0,0 +1,4 @@
<% if params[:url] %>
<%= image_tag(params[:url], :title => "Preview", :id => "image") %>
<p id="scale"></p>
<% end %>

View File

@@ -0,0 +1,6 @@
<!--
- post
-->
<% if post %>
<p>This post was probably already uploaded (<%= link_to "post ##{post.id}", posts_path(post), :target => "_blank" %>).</p>
<% end %>

View File

@@ -6,18 +6,11 @@
<p>Before uploading, please read the <%= link_to "how to upload guide", wiki_pages_path(:title => "howto:upload") %>.</p>
</div>
<%= render "image" %>
<%= render "post" %>
<%= render "sources/info", :source => @source %>
<%= form_for(@upload, :html => {:multipart => true, :class => "simple_form"}) do |f| %>
<% if params[:url] %>
<div id="image-preview">
<%= image_tag(params[:url], :title => "Preview") %>
<p id="scale"></p>
</div>
<% if @post %>
<p>This post was probably already uploaded (<%= link_to "post ##{@post.id}", posts_path(@post), :target => "_blank" %>).</p>
<% end %>
<% end %>
<div class="input">
<%= f.label :file %>
<%= f.file_field :file, :size => 50 %>