fix for dashboard
This commit is contained in:
@@ -2,6 +2,7 @@ module Moderator
|
|||||||
module Post
|
module Post
|
||||||
class DashboardsController < ApplicationController
|
class DashboardsController < ApplicationController
|
||||||
respond_to :html, :json
|
respond_to :html, :json
|
||||||
|
before_filter :janitor_only
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@search = ::Post.order("id asc").pending_or_flagged.available_for_moderation.search(:tag_match => params[:query])
|
@search = ::Post.order("id asc").pending_or_flagged.available_for_moderation.search(:tag_match => params[:query])
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ module Moderator
|
|||||||
|
|
||||||
def self.all(min_date, max_level)
|
def self.all(min_date, max_level)
|
||||||
sql = <<-EOS
|
sql = <<-EOS
|
||||||
SELECT artist_versions.updater_id AS user_id, count(*)
|
SELECT artist_versions.updater_id AS updater_id, count(*)
|
||||||
FROM artist_versions
|
FROM artist_versions
|
||||||
JOIN users ON users.id = artist_versions.updater_id
|
JOIN users ON users.id = artist_versions.updater_id
|
||||||
WHERE
|
WHERE
|
||||||
|
|||||||
@@ -9,7 +9,9 @@
|
|||||||
<li><%= link_to "Subscriptions", posts_tag_subscription_path(CurrentUser.id) %></li>
|
<li><%= link_to "Subscriptions", posts_tag_subscription_path(CurrentUser.id) %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li><%= link_to "Changes", post_versions_path %></li>
|
<li><%= link_to "Changes", post_versions_path %></li>
|
||||||
<li><%= link_to "Moderate", moderator_post_dashboard_path %></li>
|
<% if CurrentUser.is_janitor? %>
|
||||||
|
<li><%= link_to "Moderate", moderator_post_dashboard_path %></li>
|
||||||
|
<% end %>
|
||||||
<li><%= link_to "Help", wiki_pages_path(:title => "help:posts") %></li>
|
<li><%= link_to "Help", wiki_pages_path(:title => "help:posts") %></li>
|
||||||
</menu>
|
</menu>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user