From 703e28e6cdce8d67be8efacd9f67a5f85cd2b9cc Mon Sep 17 00:00:00 2001 From: taitus Date: Tue, 12 Apr 2022 11:42:49 +0200 Subject: [PATCH] Add information to the phase table to clarify its functionality. Add a help text on admin budget show page and improve text from Admin::Budgets::HelpComponent in order to clarify its functionality when we are using the wizard. --- app/assets/stylesheets/admin/budgets/show.scss | 6 ++++++ app/components/admin/budgets/show_component.html.erb | 3 ++- config/locales/en/admin.yml | 3 ++- config/locales/es/admin.yml | 3 ++- spec/system/admin/budgets_spec.rb | 3 +++ 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/admin/budgets/show.scss b/app/assets/stylesheets/admin/budgets/show.scss index a35465ce3..f71179422 100644 --- a/app/assets/stylesheets/admin/budgets/show.scss +++ b/app/assets/stylesheets/admin/budgets/show.scss @@ -13,4 +13,10 @@ h4 { @include header-font-size(h3); } + + .phases { + h3 { + margin-bottom: 0; + } + } } diff --git a/app/components/admin/budgets/show_component.html.erb b/app/components/admin/budgets/show_component.html.erb index b5e3e4cda..1ad9a1468 100644 --- a/app/components/admin/budgets/show_component.html.erb +++ b/app/components/admin/budgets/show_component.html.erb @@ -11,8 +11,9 @@ <%= render Admin::Budgets::GroupsAndHeadingsComponent.new(budget) %> -
+

<%= t("admin.budgets.edit.phases_caption") %>

+ <%= t("admin.budgets.edit.phases_table_help_text") %> <%= render Admin::BudgetPhases::PhasesComponent.new(budget) %>
diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index 0b7a95011..e234e08dc 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -113,6 +113,7 @@ en: delete: Delete budget phase: Phase phases_caption: "Phases" + phases_table_help_text: "The configuration of these phases is used for information purposes only. Its function is to define the phases information displayed on the public page of the participatory budget." duration: "Duration" enabled: Enabled actions: Actions @@ -153,7 +154,7 @@ en: headings: multiple: "Headings are meant to divide the money of the participatory budget. Here you can add headings for this group and assign the amount of money that will be used for each heading." single: "Headings are meant to divide the money of the participatory budget. Since this budget will only contain one heading, this is the place where you stablish the money that will be spent in this participaroty budget." - phases: "Participatory budgets have different phases. Here you can enable or disable phases and also customize each individual phase." + phases: "Participatory budgets have different phases. Here you can enable or disable phases and also customize each individual phase. The configuration of these phases is used for information purposes only and will be displayed on the public page of the participatory budget." show: add_group: "Add group" add_heading: "Add heading" diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index 5658d3190..d33daa508 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -113,6 +113,7 @@ es: delete: Eliminar presupuesto phase: Fase phases_caption: "Fases" + phases_table_help_text: "La configuración de estas fases se utiliza únicamente con fines informativos. Su función es definir la información de las fases que se muestra en la página pública del presupuesto participativo." duration: "Duración" enabled: Habilitada actions: Acciones @@ -153,7 +154,7 @@ es: headings: multiple: "Las partidas sirven para dividir el dinero del presupuesto participativo. Aquí puedes ir añadiendo partidas para cada grupo y establecer la cantidad de dinero que se gastará en cada partida." single: "Las partidas sirven para dividir el dinero del presupuesto participativo. Como este presupuesto solo tendrá una partida aquí podrás establecer la cantidad de dinero que se gastará en este presupuesto participativo." - phases: "Los presupuestos participativos tienen distintas fases. Aquí puedes habilitar o deshabilitar fases y también personalizar cada una de las fases." + phases: "Los presupuestos participativos tienen distintas fases. Aquí puedes habilitar o deshabilitar fases y también personalizar cada una de las fases. La configuración de estas fases se utiliza únicamente con fines informativos y se mostrará en la página pública del presupuesto participativo." show: add_group: "Añadir grupo" add_heading: "Añadir partida" diff --git a/spec/system/admin/budgets_spec.rb b/spec/system/admin/budgets_spec.rb index 207d40a0e..bfaf86320 100644 --- a/spec/system/admin/budgets_spec.rb +++ b/spec/system/admin/budgets_spec.rb @@ -235,6 +235,9 @@ describe "Admin budgets", :admin do visit admin_budget_path(budget) + expect(page).to have_content "The configuration of these phases is used for information purposes "\ + "only. Its function is to define the phases information displayed "\ + "on the public page of the participatory budget." expect(page).to have_table "Phases", with_cols: [ [ "Information",