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:
evazion
2021-01-16 03:23:57 -06:00
parent 0306cc16b9
commit 32dd14f461
7 changed files with 0 additions and 72 deletions

View File

@@ -1,7 +0,0 @@
module Admin
class DashboardsController < ApplicationController
def show
@dashboard = AdminDashboard.new
end
end
end

View File

@@ -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

View File

@@ -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>

View File

@@ -167,10 +167,6 @@
<% if policy(NewsUpdate).index? %> <% if policy(NewsUpdate).index? %>
<li><%= link_to("News Updates", news_updates_path) %></li> <li><%= link_to("News Updates", news_updates_path) %></li>
<% end %> <% end %>
<% if CurrentUser.is_admin? %>
<li><%= link_to("Admin Dashboard", admin_dashboard_path) %></li>
<% end %>
</ul> </ul>
</section> </section>
</div> </div>

View File

@@ -11,7 +11,6 @@ Rails.application.routes.draw do
namespace :admin do namespace :admin do
resources :users, :only => [:edit, :update] resources :users, :only => [:edit, :update]
resource :dashboard, :only => [:show]
end end
namespace :moderator do namespace :moderator do
resource :dashboard, :only => [:show] resource :dashboard, :only => [:show]

View File

@@ -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