Skip to content

Commit

Permalink
ISSUE #477 - Create forms of skin_color
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorMonardez committed Jun 10, 2024
1 parent 4207c31 commit 5a00f7f
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 1 deletion.
7 changes: 7 additions & 0 deletions app/controllers/skin_colors_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

class SkinColorsController < ApplicationController
active_scaffold :skin_color do |config|
config.columns = [:name, :description]
end
end
1 change: 1 addition & 0 deletions config/locales/navigation.pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ pt-BR:
notification_log: Notificações Enviadas
custom_variable: Variáveis
report_configuration: Configurações de Relatório
skin_color: Cor de pele

logout:
label: 'Logout'
17 changes: 17 additions & 0 deletions config/locales/skin_color.pt-BR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) Universidade Federal Fluminense (UFF).
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file.

pt-BR:
activerecord:
attributes:
skin_color:
name: "Nome"
description: "Descrição"

models:
skin_color:
one: "Cor de pele"
other: "Cores de pele"

activescaffold:
create_skin_color_label: "Adicionar cor de pele"
3 changes: 2 additions & 1 deletion config/navigation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def can_read?(*args)

config_models = [
User, Role, CustomVariable, Version, Notification,
NotificationLog, ReportConfiguration, EmailTemplate
NotificationLog, ReportConfiguration, EmailTemplate, SkinColor
]
mainhelper.listitem :configurations, config_models do |submenu|
submenu.modelitem User
Expand All @@ -243,6 +243,7 @@ def can_read?(*args)
submenu.modelitem NotificationLog
submenu.modelitem CustomVariable
submenu.modelitem ReportConfiguration
submenu.modelitem SkinColor
end

mainhelper.item :logout, destroy_user_session_path
Expand Down
5 changes: 5 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@
concerns :active_scaffold
end

resources :skin_colors do
concerns :active_scaffold
record_select_routes
end

resources :enrollments do
concerns :active_scaffold
record_select_routes
Expand Down

0 comments on commit 5a00f7f

Please sign in to comment.