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
|
||||
span class: "blank_slate" do
|
||||
span I18n.t("active_admin.dashboard_welcome.welcome")
|
||||
small I18n.t("active_admin.dashboard_welcome.call_to_action")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -4,6 +4,18 @@ ActiveAdmin.register Question do
|
||||
scope :all, default: true
|
||||
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
|
||||
def show
|
||||
@question = Question.unscoped.find_by!(permitted_params[:question])
|
||||
@@ -30,10 +42,18 @@ ActiveAdmin.register Question do
|
||||
id_column
|
||||
column :user
|
||||
column :subject
|
||||
column :bloom_taxonomy
|
||||
column :check_type
|
||||
column :difficulty
|
||||
column :status
|
||||
column :bloom_taxonomy do |question|
|
||||
question.bloom_taxonomy_text
|
||||
end
|
||||
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 :updated_at
|
||||
actions
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
ActiveAdmin.register Subject do
|
||||
permit_params :name, :category_id, :axis_id
|
||||
|
||||
remove_filter :questions
|
||||
end
|
||||
|
||||
@@ -2,8 +2,7 @@ pt-BR:
|
||||
active_admin:
|
||||
dashboard: "Painel Administrativo"
|
||||
dashboard_welcome:
|
||||
welcome: "Bem vindo ao Active Admin. Esta é a página de painéis padrão."
|
||||
call_to_action: "Para adicionar seções ao painel, verifique 'app/admin/dashboard.rb'"
|
||||
welcome: "Bem vindo ao Painel Administrativo."
|
||||
view: "Visualizar"
|
||||
edit: "Editar"
|
||||
delete: "Remover"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
pt-BR:
|
||||
attributes:
|
||||
created_at: Criado em
|
||||
updated_at: Atualizado em
|
||||
updated_at: Atualizado em
|
||||
deleted_at: Deletado em
|
||||
@@ -7,3 +7,5 @@ pt-BR:
|
||||
attributes:
|
||||
axis:
|
||||
name: Nome
|
||||
subjects: Assuntos
|
||||
|
||||
|
||||
@@ -7,3 +7,4 @@ pt-BR:
|
||||
attributes:
|
||||
category:
|
||||
name: Nome
|
||||
subjects: Assuntos
|
||||
|
||||
Reference in New Issue
Block a user