move recommended tab to second position

This commit is contained in:
r888888888 2018-07-21 12:09:16 -07:00
parent 9cfb629891
commit 93c074c15b
3 changed files with 6 additions and 10 deletions

View File

@ -467,13 +467,8 @@
$("#notes").hide();
$("#edit").hide();
if ($("#recommended").data("available")) {
$("#post-sections li:first-child").addClass("active");
$("#comments").hide();
} else {
$("#post-sections li:nth-child(2)").addClass("active");
$("#recommended").hide();
}
$("#recommended").hide();
$("#post-sections li:first-child").addClass("active");
}
Danbooru.Post.resize_ugoira_controls = function() {

View File

@ -8,7 +8,8 @@ module RecommenderService
end
def available?(post)
enabled? && CurrentUser.enable_recommended_posts? && post.created_at > Date.civil(2018, 1, 1) #&& post.score >= SCORE_THRESHOLD
return true if Rails.env.development?
enabled? && CurrentUser.enable_recommended_posts? && post.created_at > Date.civil(2018, 1, 1) && post.score >= SCORE_THRESHOLD
end
def similar(post)

View File

@ -87,12 +87,12 @@
<% end %>
<menu id="post-sections">
<li><a href="#comments">Comments</a></li>
<% if RecommenderService.enabled? %>
<li><a href="#recommended">Recommended</a></li>
<% end %>
<li><a href="#comments">Comments</a></li>
<% if CurrentUser.is_member? && @post.visible? %>
<li><a href="#edit" id="post-edit-link">Edit</a></li>
<% end %>