fixes #2558: site map links
This commit is contained in:
@@ -3,6 +3,10 @@ class SavedSearch < ActiveRecord::Base
|
|||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
module ClassMethods
|
module ClassMethods
|
||||||
|
def posts_search_available?
|
||||||
|
Danbooru.config.listbooru_server.present? && CurrentUser.is_gold?
|
||||||
|
end
|
||||||
|
|
||||||
def refresh_listbooru(user_id)
|
def refresh_listbooru(user_id)
|
||||||
return unless Danbooru.config.listbooru_auth_key
|
return unless Danbooru.config.listbooru_auth_key
|
||||||
user = User.find(user_id)
|
user = User.find(user_id)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<% @categories.each do |category, saved_searches| %>
|
<% @categories.each do |category, saved_searches| %>
|
||||||
<h2>
|
<h2>
|
||||||
<% if category.present? %>
|
<% if category.present? %>
|
||||||
<%= link_to category.tr("_", " "), posts_path(:tags => "search:#{category}") %>
|
<%= link_to_if SavedSearch.posts_search_available?, category.tr("_", " "), posts_path(:tags => "search:#{category}") %>
|
||||||
<% else %>
|
<% else %>
|
||||||
Uncategorized
|
Uncategorized
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<% if CurrentUser.can_approve_posts? %>
|
<% if CurrentUser.can_approve_posts? %>
|
||||||
<li><%= link_to("Moderate", moderator_post_queue_path) %></li>
|
<li><%= link_to("Moderate", moderator_post_queue_path) %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if CurrentUser.is_admin? %>
|
<% if CurrentUser.is_moderator? %>
|
||||||
<li><%= link_to("Mass Edit", edit_moderator_tag_path) %></li>
|
<li><%= link_to("Mass Edit", edit_moderator_tag_path) %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
<section>
|
<section>
|
||||||
<ul>
|
<ul>
|
||||||
<li><h1>Users</h1></li>
|
<li><h1>Users</h1></li>
|
||||||
<% if CurrentUser.can_approve_posts? %>
|
<% if CurrentUser.is_moderator? %>
|
||||||
<li><%= link_to("Dashboard", moderator_dashboard_path) %></li>
|
<li><%= link_to("Dashboard", moderator_dashboard_path) %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li><%= link_to("Help", wiki_pages_path(:title => "help:users")) %></li>
|
<li><%= link_to("Help", wiki_pages_path(:title => "help:users")) %></li>
|
||||||
@@ -109,10 +109,13 @@
|
|||||||
<li><%= link_to("Mod Actions", mod_actions_path) %></li>
|
<li><%= link_to("Mod Actions", mod_actions_path) %></li>
|
||||||
<li><%= link_to("Jobs", delayed_jobs_path) %></li>
|
<li><%= link_to("Jobs", delayed_jobs_path) %></li>
|
||||||
<li><%= link_to("Bulk Update Requests", bulk_update_requests_path) %></li>
|
<li><%= link_to("Bulk Update Requests", bulk_update_requests_path) %></li>
|
||||||
|
<li><%= link_to("Janitor Trials", janitor_trials_path) %></li>
|
||||||
|
|
||||||
|
<% if CurrentUser.is_moderator? %>
|
||||||
|
<li><%= link_to("IP Bans", ip_bans_path) %></li>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% if CurrentUser.is_admin? %>
|
<% if CurrentUser.is_admin? %>
|
||||||
<li><%= link_to("Janitor Trials", janitor_trials_path) %></li>
|
|
||||||
<li><%= link_to("IP Bans", ip_bans_path) %></li>
|
|
||||||
<li><%= link_to("News Updates", news_updates_path) %></li>
|
<li><%= link_to("News Updates", news_updates_path) %></li>
|
||||||
<li><%= link_to("Alias & Implication Import", new_admin_alias_and_implication_import_path) %></li>
|
<li><%= link_to("Alias & Implication Import", new_admin_alias_and_implication_import_path) %></li>
|
||||||
<li><%= link_to("Admin Dashboard", admin_dashboard_path) %></li>
|
<li><%= link_to("Admin Dashboard", admin_dashboard_path) %></li>
|
||||||
|
|||||||
Reference in New Issue
Block a user