Add config options to disable comments and the forum.
Add options to disable comments, the forum, and autocomplete. This is for personal boorus and potentially for safe mode. Note that disabling the forum may cause difficulties with creating and approving BURs. Disabling comments and the forum merely hides them from most areas, rather than completely removing them.
This commit is contained in:
@@ -48,7 +48,9 @@
|
||||
<li><%= link_to "Random", random_posts_path(tags: params[:tags]), id: "random-post", "data-shortcut": "r", rel: "nofollow" %></li>
|
||||
<% if @post_set.post_query.has_single_tag? %>
|
||||
<li><%= link_to "History", post_versions_path(search: { changed_tags: @post_set.post_query.tag_name }), rel: "nofollow" %></li>
|
||||
<li><%= link_to "Discussions", forum_posts_path(search: { linked_to: @post_set.post_query.tag_name }), rel: "nofollow" %></li>
|
||||
<% if Danbooru.config.forum_enabled?.to_s.truthy? %>
|
||||
<li><%= link_to "Discussions", forum_posts_path(search: { linked_to: @post_set.post_query.tag_name }), rel: "nofollow" %></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<li><%= link_to "Count", posts_counts_path(tags: params[:tags]), rel: "nofollow" %></li>
|
||||
</ul>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<%= upvote_icon %>
|
||||
</span>
|
||||
|
||||
<% if @post.last_commented_at.present? %>
|
||||
<% if Danbooru.config.comments_enabled?.to_s.truthy? && @post.last_commented_at.present? %>
|
||||
<span class="post-tooltip-comments post-tooltip-info">
|
||||
<span><%= @post.comments.count %></span>
|
||||
<%= comments_icon(class: "fa-xs") %>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<% page_title @post.presenter.humanized_essential_tag_string %>
|
||||
<% meta_description "View this #{@post.image_width}x#{@post.image_height} #{number_to_human_size(@post.file_size)} image" %>
|
||||
<% canonical_url post_url(@post, host: Danbooru.config.hostname) %>
|
||||
<% atom_feed_tag "Comments for post ##{@post.id}", comments_url(:atom, search: { post_id: @post.id }) %>
|
||||
<% if Danbooru.config.comments_enabled?.to_s.truthy? %>
|
||||
<% atom_feed_tag "Comments for post ##{@post.id}", comments_url(:atom, search: { post_id: @post.id }) %>
|
||||
<% end %>
|
||||
|
||||
<%= render "posts/partials/common/secondary_links" %>
|
||||
|
||||
@@ -322,7 +324,9 @@
|
||||
<% end %>
|
||||
|
||||
<menu id="post-sections" class="mb-4">
|
||||
<li class="active"><a href="#comments">Comments</a></li>
|
||||
<% if Danbooru.config.comments_enabled?.to_s.truthy? %>
|
||||
<li class="active"><a href="#comments">Comments</a></li>
|
||||
<% end %>
|
||||
|
||||
<% if RecommenderService.available_for_post?(@post) %>
|
||||
<li><a href="#recommended">Recommended</a></li>
|
||||
@@ -339,9 +343,11 @@
|
||||
</section>
|
||||
<% end %>
|
||||
|
||||
<section id="comments">
|
||||
<%= render_comment_section(@post, current_user: CurrentUser.user) %>
|
||||
</section>
|
||||
<% if Danbooru.config.comments_enabled?.to_s.truthy? %>
|
||||
<section id="comments">
|
||||
<%= render_comment_section(@post, current_user: CurrentUser.user) %>
|
||||
</section>
|
||||
<% end %>
|
||||
|
||||
<section id="notes" style="display: none;">
|
||||
<% if @post.has_notes? %>
|
||||
|
||||
Reference in New Issue
Block a user