This commit is contained in:
albert 2012-09-21 15:41:05 -04:00
parent 5512e0bb79
commit 964f74d6cd
8 changed files with 294 additions and 372 deletions

View File

@ -23,7 +23,7 @@ div.comments-for-post {
menu {
li {
margin-right: 0.5em;
margin-right: 1em;
}
}
}

View File

@ -220,7 +220,7 @@ class Upload < ActiveRecord::Base
"#{Rails.root}/public/data/preview/#{prefix}#{md5}.jpg"
when Danbooru.config.large_image_width
"#{Rails.root}/public/data/sample/#{prefix}#{md5}.jpg"
"#{Rails.root}/public/data/sample/#{Danbooru.config.large_image_prefix}#{prefix}#{md5}.jpg"
end
end

View File

@ -43,6 +43,17 @@ class PostPresenter < Presenter
@tag_set_presenter.tag_list_html(template, options.merge(:show_extra_links => CurrentUser.user.is_privileged?))
end
def post_footer_for_pool_html(template)
if template.params[:pool_id]
pool = Pool.where(:id => template.params[:pool_id]).first
return if pool.nil?
return if pool.neighbors(@post).next.nil?
template.link_to("Next in #{pool.name}", template.post_path(pool.neighbors(@post).next))
else
nil
end
end
def pool_html(template)
html = ["<ul>"]

View File

@ -1,5 +1,5 @@
<!doctype html>
<html>
<html xmlns:fb="http://ogp.me/ns/fb#">
<head>
<title><%= yield :page_title %></title>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">

View File

@ -7,7 +7,14 @@
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4f8dbf8a41066ac7"></script>
<script type="text/javascript">
var addthis_config = {"data_track_addressbar":true};
var addthis_share = {
"url":"<%= j post_path(post, :only_path => false, :host => Danbooru.config.hostname) %>",
"title": "Check it out: <%= j post.essential_tag_string %>"
};
</script>
<script type="text/javascript" src="http://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4f8dbf8a41066ac7"></script>
<!-- AddThis Button END -->
</div>

View File

@ -93,8 +93,8 @@
<meta name="post-is-deleted" content="<%= @post.is_deleted? %>">
<meta name="post-is-flagged" content="<%= @post.is_flagged? %>">
<meta name="config-large-width" content="<%= Danbooru.config.large_image_width %>">
<meta property="og:title" content="<%= @post.essential_tag_string %>">
<meta property="og:description" content="<%= @post.tag_string %>">
<meta property="og:title" content="Check out this image on <%= Danbooru.config.app_name %>: <%= @post.essential_tag_string %>">
<meta property="og:description" content="Check out this image on <%= Danbooru.config.app_name %>: <%= @post.essential_tag_string %>">
<meta property="og:image" content="<%= @post.preview_file_url %>">
<% end %>

View File

@ -1,3 +1,5 @@
CurrentUser.ip_addr = "127.0.0.1"
if User.count == 0
puts "Creating users"
user = User.create(
@ -15,11 +17,10 @@ if User.count == 0
end
else
puts "Skipping users"
user = User.first
user = User.find_by_name("albert")
end
CurrentUser.user = user
CurrentUser.ip_addr = "127.0.0.1"
if Upload.count == 0
puts "Creating uploads"
@ -28,7 +29,7 @@ if Upload.count == 0
color2 = rand(4096).to_s(16)
width = rand(2000) + 100
height = rand(2000) + 100
url = "http://dummyimage.com/#{width}x#{height}/#{color1}/#{color2}"
url = "http://ipsumimage.appspot.com/#{width}x#{height}"
tags = (i * i * i).to_s.scan(/./).uniq.join(" ")
Upload.create(:source => url, :content_type => "image/gif", :rating => "q", :tag_string => tags)

File diff suppressed because it is too large Load Diff