refactored source code, work on pixiv integration
This commit is contained in:
4
app/views/uploads/_image.html.erb
Normal file
4
app/views/uploads/_image.html.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
<% if params[:url] %>
|
||||
<%= image_tag(params[:url], :title => "Preview", :id => "image") %>
|
||||
<p id="scale"></p>
|
||||
<% end %>
|
||||
6
app/views/uploads/_post.html.erb
Normal file
6
app/views/uploads/_post.html.erb
Normal 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 %>
|
||||
@@ -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 %>
|
||||
|
||||
Reference in New Issue
Block a user