diff --git a/app/models/tag.rb b/app/models/tag.rb index ae6dd2407..84a1c94bb 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -124,10 +124,10 @@ class Tag < ActiveRecord::Base def trending Cache.get("popular-tags-v3", 1.hour) do CurrentUser.scoped(User.admins.first, "127.0.0.1") do - n = 8 + n = 24 counts = {} - while counts.empty? && n < 256 + while counts.empty? && n < 1000 tag_strings = Post.select_values_sql("select tag_string from posts where created_at >= ?", n.hours.ago) tag_strings.each do |tag_string| tag_string.scan(/\S+/).each do |tag| diff --git a/app/presenters/post_presenter.rb b/app/presenters/post_presenter.rb index 74ad40f02..afa9ff7d1 100644 --- a/app/presenters/post_presenter.rb +++ b/app/presenters/post_presenter.rb @@ -1,4 +1,6 @@ class PostPresenter < Presenter + attr_reader :pool, :next_post_in_pool + def self.preview(post, options = {}) if post.is_deleted? && options[:tags] !~ /status:(?:all|any|deleted|banned)/ && !options[:raw] return "" @@ -231,6 +233,7 @@ class PostPresenter < Presenter pool_html << ' ' if pool.neighbors(@post).next + @next_post_in_pool = pool.neighbors(@post).next pool_html << template.link_to("next ›".html_safe, template.post_path(pool.neighbors(@post).next, :pool_id => pool.id), :rel => next_rel, :class => "#{klass} next", :title => "to page #{pool.page_number(pool.neighbors(@post).next)}") match_found = true else diff --git a/app/views/forum_topics/index.html.erb b/app/views/forum_topics/index.html.erb index 14e838df6..c14969da5 100644 --- a/app/views/forum_topics/index.html.erb +++ b/app/views/forum_topics/index.html.erb @@ -2,6 +2,11 @@

Forum

+

+ Categories: + <%= link_to "All", forum_topics_path %>, <%= ForumTopic::CATEGORIES.map {|id, name| link_to_unless_current(name, forum_topics_path(:search => {:category_id => id}))}.join(", ").html_safe %> +

+ @@ -13,7 +18,7 @@ <% @forum_topics.each do |topic| %> - + <% if CurrentUser.user.is_janitor? %> - - + + <% end %> @@ -41,8 +41,8 @@ <% if CurrentUser.user.is_janitor? %> - + <% end %> diff --git a/config/danbooru_default_config.rb b/config/danbooru_default_config.rb index 05c49feb5..794596b9b 100644 --- a/config/danbooru_default_config.rb +++ b/config/danbooru_default_config.rb @@ -4,7 +4,7 @@ module Danbooru class Configuration # The version of this Danbooru. def version - "2.25.0" + "2.26.0" end # The name of this Danbooru.
<% if topic.is_sticky? %> Sticky: diff --git a/app/views/posts/show.html.erb b/app/views/posts/show.html.erb index 3b9e3b69a..440d4d8b2 100644 --- a/app/views/posts/show.html.erb +++ b/app/views/posts/show.html.erb @@ -116,6 +116,11 @@ <% end %> + + <% if @post.presenter.next_post_in_pool %> + + + <% end %> <% end %> <%= render "posts/partials/common/secondary_links" %> diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 8fd57ed6a..0b96da77f 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -15,8 +15,8 @@ Posts Deleted1+ FBCI5+ FBCI5+ SBCI10+ SBCINotes Edits<%= link_to user.posts.count, posts_path(:tags => "user:#{user.name}") %> <%= user.posts.deleted.count %><%= number_to_percentage Reports::UserPromotions.confidence_interval_for(user, 1), :precision => 0 %> <%= number_to_percentage Reports::UserPromotions.confidence_interval_for(user, 5), :precision => 0 %><%= number_to_percentage Reports::UserPromotions.confidence_interval_for(user, 10), :precision => 0 %><%= link_to user.note_versions.count, note_versions_path(:search => {:updater_id => user.id}) %> <%= link_to user.post_update_count, post_versions_path(:search => {:updater_id => user.id}) %>