Implements dashboard controllers & views for admin & moderation
This commit is contained in:
6
app/controllers/admin/dashboard_controller.rb
Normal file
6
app/controllers/admin/dashboard_controller.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class Admin::DashboardController < ApplicationController
|
||||
|
||||
def index
|
||||
end
|
||||
|
||||
end
|
||||
6
app/controllers/moderation/dashboard_controller.rb
Normal file
6
app/controllers/moderation/dashboard_controller.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class Moderation::DashboardController < ApplicationController
|
||||
|
||||
def index
|
||||
end
|
||||
|
||||
end
|
||||
1
app/views/admin/dashboard/index.html.erb
Normal file
1
app/views/admin/dashboard/index.html.erb
Normal file
@@ -0,0 +1 @@
|
||||
<h1><%= t("admin.dashboard.index.title") %></h1>
|
||||
1
app/views/moderation/dashboard/index.html.erb
Normal file
1
app/views/moderation/dashboard/index.html.erb
Normal file
@@ -0,0 +1 @@
|
||||
<h1><%= t("moderation.dashboard.index.title") %></h1>
|
||||
@@ -11,6 +11,14 @@ en:
|
||||
open_city_slogan: So the citizens can decide what kind of city they want.
|
||||
create_debate: Create a debate
|
||||
my_account_link: My account
|
||||
admin:
|
||||
dashboard:
|
||||
index:
|
||||
title: Administration
|
||||
moderation:
|
||||
dashboard:
|
||||
index:
|
||||
title: Moderation
|
||||
debates:
|
||||
index:
|
||||
create_debate: Create a debate
|
||||
|
||||
@@ -11,6 +11,14 @@ es:
|
||||
open_city_slogan: Para que todos los madrileños decidamos que ciudad queremos tener.
|
||||
create_debate: Crea un debate
|
||||
my_account_link: Mi cuenta
|
||||
admin:
|
||||
dashboard:
|
||||
index:
|
||||
title: Administración
|
||||
moderation:
|
||||
dashboard:
|
||||
index:
|
||||
title: Moderación
|
||||
debates:
|
||||
index:
|
||||
create_debate: Crea un debate
|
||||
|
||||
@@ -17,11 +17,18 @@ Rails.application.routes.draw do
|
||||
post :vote
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
resource :account, controller: "account", only: [:show, :update]
|
||||
|
||||
namespace :admin do
|
||||
root to: "dashboard#index"
|
||||
end
|
||||
|
||||
namespace :moderation do
|
||||
root to: "dashboard#index"
|
||||
end
|
||||
|
||||
# Example of regular route:
|
||||
# get 'products/:id' => 'catalog#view'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user