Add help text in budget groups admin index
Co-authored-by: decabeza <alberto@decabeza.es>
This commit is contained in:
committed by
Javi Martín
parent
b1cb981980
commit
ef6940c3e7
@@ -1,12 +1,13 @@
|
||||
class Admin::Budgets::HelpComponent < ApplicationComponent
|
||||
attr_reader :i18n_namespace
|
||||
|
||||
def initialize(i18n_namespace)
|
||||
@i18n_namespace = i18n_namespace
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def i18n_namespace
|
||||
"admin.budgets.index"
|
||||
end
|
||||
|
||||
def text
|
||||
t("#{i18n_namespace}.help")
|
||||
t("admin.#{i18n_namespace}.index.help")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
<%= link_to t("admin.budget_groups.form.create"), new_admin_budget_group_path %>
|
||||
</header>
|
||||
|
||||
<%= render Admin::Budgets::HelpComponent.new("budget_groups") %>
|
||||
|
||||
<% if @groups.any? %>
|
||||
<h3><%= t("admin.budget_groups.amount", count: @groups.count) %></h3>
|
||||
<table>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<%= link_to t("admin.budgets.index.new_link"), new_admin_budget_path %>
|
||||
</header>
|
||||
|
||||
<%= render Admin::Budgets::HelpComponent.new %>
|
||||
<%= render Admin::Budgets::HelpComponent.new("budgets") %>
|
||||
<%= render "shared/filter_subnav", i18n_namespace: "admin.budgets.index" %>
|
||||
|
||||
<% if @budgets.any? %>
|
||||
|
||||
@@ -134,6 +134,7 @@ en:
|
||||
submit: "Save group"
|
||||
index:
|
||||
back: "Go back to budgets"
|
||||
help: "Groups are meant to organize headings. After a group is created and it contais headings, it's possible to determine in how many headings a user can vote per group."
|
||||
budget_headings:
|
||||
no_headings: "There are no headings."
|
||||
amount:
|
||||
|
||||
@@ -134,6 +134,7 @@ es:
|
||||
submit: "Guardar grupo"
|
||||
index:
|
||||
back: "Volver a presupuestos"
|
||||
help: "Los grupos sirven para organizar las partidas del presupuesto. Después de que un grupo sea creado y éste contenga partidas, es posible determinar el número de partidas a las que un usuario puede votar por grupo."
|
||||
budget_headings:
|
||||
no_headings: "No hay partidas."
|
||||
amount:
|
||||
|
||||
Reference in New Issue
Block a user