Pull upload notice, bookmarklet notice from help:upload_notice wiki page.

This commit is contained in:
evazion
2016-11-21 01:17:15 -06:00
parent 77e06b6c08
commit 5909e8501c
3 changed files with 6 additions and 10 deletions

View File

@@ -5,6 +5,7 @@ class UploadsController < ApplicationController
def new
@upload = Upload.new
@upload_notice_wiki = WikiPage.titled(Danbooru.config.upload_notice_wiki_page).first
if params[:url]
@normalized_url = params[:url]
headers = default_headers()

View File

@@ -4,22 +4,13 @@
<% if CurrentUser.can_upload? %>
<div id="upload-guide-notice">
<p><strong>Before uploading, please read the <%= link_to "how to upload guide", wiki_pages_path(:title => "howto:upload") %></strong>.
If you plan to upload your own art, you should read <%= Danbooru.config.app_name %>'s
<%= link_to "specific policy guidance", wiki_pages_path(:title => "howto:upload", :anchor => "dtext-self-upload") %>
first. More suitable sites to uploading your own artwork include DeviantArt, Tumblr, Twitter, Pixiv, etc.</p>
<%= format_text(@upload_notice_wiki.body) %>
</div>
<% unless CurrentUser.can_upload_free? %>
<p>You can upload <strong><%= pluralize CurrentUser.upload_limit, "more post" %></strong> today.</p>
<% end %>
<% if params[:url].blank? %>
<div id="bookmarklet-notice">
<p><span style="font-weight: bold;">You should be using Danbooru's official <%= link_to "upload bookmarklet", bookmarklet_path %> to upload!</span> It makes uploading more convenient and does several things for you automatically such as fixing incorrect sources and optionally copying the artist's commentary.</p>
</div>
<% end %>
<%= render "image" %>
<%= render "post", :post => @post %>
<%= render "sources/info", :source => @source %>

View File

@@ -241,6 +241,10 @@ module Danbooru
nil
end
def upload_notice_wiki_page
"help:upload_notice"
end
# The number of posts displayed per page.
def posts_per_page
20