fix question filers and i18n
This commit is contained in:
@@ -6,7 +6,6 @@ ActiveAdmin.register_page "Dashboard" do
|
|||||||
div class: "blank_slate_container", id: "dashboard_default_message" do
|
div class: "blank_slate_container", id: "dashboard_default_message" do
|
||||||
span class: "blank_slate" do
|
span class: "blank_slate" do
|
||||||
span I18n.t("active_admin.dashboard_welcome.welcome")
|
span I18n.t("active_admin.dashboard_welcome.welcome")
|
||||||
small I18n.t("active_admin.dashboard_welcome.call_to_action")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,18 @@ ActiveAdmin.register Question do
|
|||||||
scope :all, default: true
|
scope :all, default: true
|
||||||
scope :trashed
|
scope :trashed
|
||||||
|
|
||||||
|
filter :user
|
||||||
|
filter :subject
|
||||||
|
filter :authorship
|
||||||
|
filter :authorship_year
|
||||||
|
filter :created_at
|
||||||
|
filter :updated_at
|
||||||
|
filter :deleted_at
|
||||||
|
filter :status, as: :check_boxes, collection: proc { Question.status.options }
|
||||||
|
filter :difficulty, as: :check_boxes, collection: proc { Question.difficulty.options }
|
||||||
|
filter :bloom_taxonomy, as: :check_boxes, collection: proc { Question.bloom_taxonomy.options }
|
||||||
|
filter :check_type, as: :check_boxes, collection: proc { Question.check_type.options }
|
||||||
|
|
||||||
controller do
|
controller do
|
||||||
def show
|
def show
|
||||||
@question = Question.unscoped.find_by!(permitted_params[:question])
|
@question = Question.unscoped.find_by!(permitted_params[:question])
|
||||||
@@ -30,10 +42,18 @@ ActiveAdmin.register Question do
|
|||||||
id_column
|
id_column
|
||||||
column :user
|
column :user
|
||||||
column :subject
|
column :subject
|
||||||
column :bloom_taxonomy
|
column :bloom_taxonomy do |question|
|
||||||
column :check_type
|
question.bloom_taxonomy_text
|
||||||
column :difficulty
|
end
|
||||||
column :status
|
column :check_type do |question|
|
||||||
|
question.check_type_text
|
||||||
|
end
|
||||||
|
column :difficulty do |question|
|
||||||
|
question.difficulty_text
|
||||||
|
end
|
||||||
|
column :status do |question|
|
||||||
|
question.status_text
|
||||||
|
end
|
||||||
column :created_at
|
column :created_at
|
||||||
column :updated_at
|
column :updated_at
|
||||||
actions
|
actions
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
ActiveAdmin.register Subject do
|
ActiveAdmin.register Subject do
|
||||||
permit_params :name, :category_id, :axis_id
|
permit_params :name, :category_id, :axis_id
|
||||||
|
|
||||||
|
remove_filter :questions
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ pt-BR:
|
|||||||
active_admin:
|
active_admin:
|
||||||
dashboard: "Painel Administrativo"
|
dashboard: "Painel Administrativo"
|
||||||
dashboard_welcome:
|
dashboard_welcome:
|
||||||
welcome: "Bem vindo ao Active Admin. Esta é a página de painéis padrão."
|
welcome: "Bem vindo ao Painel Administrativo."
|
||||||
call_to_action: "Para adicionar seções ao painel, verifique 'app/admin/dashboard.rb'"
|
|
||||||
view: "Visualizar"
|
view: "Visualizar"
|
||||||
edit: "Editar"
|
edit: "Editar"
|
||||||
delete: "Remover"
|
delete: "Remover"
|
||||||
|
|||||||
@@ -2,3 +2,4 @@ pt-BR:
|
|||||||
attributes:
|
attributes:
|
||||||
created_at: Criado em
|
created_at: Criado em
|
||||||
updated_at: Atualizado em
|
updated_at: Atualizado em
|
||||||
|
deleted_at: Deletado em
|
||||||
@@ -7,3 +7,5 @@ pt-BR:
|
|||||||
attributes:
|
attributes:
|
||||||
axis:
|
axis:
|
||||||
name: Nome
|
name: Nome
|
||||||
|
subjects: Assuntos
|
||||||
|
|
||||||
|
|||||||
@@ -7,3 +7,4 @@ pt-BR:
|
|||||||
attributes:
|
attributes:
|
||||||
category:
|
category:
|
||||||
name: Nome
|
name: Nome
|
||||||
|
subjects: Assuntos
|
||||||
|
|||||||
Reference in New Issue
Block a user