Remove /admin/dashboard page.
This page was just a combination of the forum listing and the bulk update requests listing. It got zero hits in the last week.
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
module Admin
|
||||
class DashboardsController < ApplicationController
|
||||
def show
|
||||
@dashboard = AdminDashboard.new
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,17 +0,0 @@
|
||||
class AdminDashboard
|
||||
def tag_aliases
|
||||
TagAlias.where(status: "pending").order("id desc")
|
||||
end
|
||||
|
||||
def tag_implications
|
||||
TagImplication.where(status: "pending").order("id desc")
|
||||
end
|
||||
|
||||
def update_requests
|
||||
BulkUpdateRequest.where(status: "pending").order("id desc")
|
||||
end
|
||||
|
||||
def forum_topics
|
||||
ForumTopic.search(category_id: 1).order("id desc").limit(20)
|
||||
end
|
||||
end
|
||||
@@ -1,27 +0,0 @@
|
||||
<% page_title "Admin Dashboard" %>
|
||||
|
||||
<div id="c-admin-dashboards">
|
||||
<div id="a-show">
|
||||
<h1>Admin Dashboard</h1>
|
||||
|
||||
<div class="section">
|
||||
<h2>Aliases</h2>
|
||||
<%= render "tag_aliases/listing", :tag_aliases => @dashboard.tag_aliases %>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Implications</h2>
|
||||
<%= render "tag_implications/listing", :tag_implications => @dashboard.tag_implications %>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Bulk Update Requests</h2>
|
||||
<%= render "bulk_update_requests/listing", :bulk_update_requests => @dashboard.update_requests %>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Forum Topics</h2>
|
||||
<%= render "forum_topics/listing", forum_topics: @dashboard.forum_topics, read_forum_topics: @dashboard.forum_topics.read_by_user(CurrentUser.user) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -167,10 +167,6 @@
|
||||
<% if policy(NewsUpdate).index? %>
|
||||
<li><%= link_to("News Updates", news_updates_path) %></li>
|
||||
<% end %>
|
||||
|
||||
<% if CurrentUser.is_admin? %>
|
||||
<li><%= link_to("Admin Dashboard", admin_dashboard_path) %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,6 @@ Rails.application.routes.draw do
|
||||
|
||||
namespace :admin do
|
||||
resources :users, :only => [:edit, :update]
|
||||
resource :dashboard, :only => [:show]
|
||||
end
|
||||
namespace :moderator do
|
||||
resource :dashboard, :only => [:show]
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
require 'test_helper'
|
||||
|
||||
class Admin::DashboardsControllerTest < ActionDispatch::IntegrationTest
|
||||
context "The admin dashboard controller" do
|
||||
setup do
|
||||
@admin = create(:admin_user)
|
||||
end
|
||||
|
||||
context "show action" do
|
||||
should "render" do
|
||||
get_auth admin_dashboard_path, @admin
|
||||
assert_response :success
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user