Simplify action links in budgets table
The word "budget" in the "Preview budget" link is redundant. On the other hand, the words "Manage", Edit" and "Admin" are not really necessary in my humble opinion. Just like in the admin navigation menu we use "Participatory budgets" instead of "Manage Participatory budgets", the fact that we're going to manage or admin or edit something can be deduced from the fact that we're in the admin section. Besides, it isn't clear to me why we use "Manage" for projects, "Edit" for heading groups and "Admin" for ballots. The differences between these three concepts might be too subtle for me. The previous paragraphs haven't been corroborated with real users, though, so I might be mistaken and we might need to revisit these links in the future. These actions still take quite a lot of space. Maybe in the future we could remove the "delete" icon, at least on budgets which cannot be deleted.
This commit is contained in:
@@ -67,7 +67,7 @@ en:
|
|||||||
no_activity: There are no moderators activity.
|
no_activity: There are no moderators activity.
|
||||||
budgets:
|
budgets:
|
||||||
actions:
|
actions:
|
||||||
preview: "Preview budget"
|
preview: "Preview"
|
||||||
index:
|
index:
|
||||||
title: Participatory budgets
|
title: Participatory budgets
|
||||||
new_link: Create new budget
|
new_link: Create new budget
|
||||||
@@ -76,7 +76,7 @@ en:
|
|||||||
all: All
|
all: All
|
||||||
open: Open
|
open: Open
|
||||||
finished: Finished
|
finished: Finished
|
||||||
budget_investments: Manage projects
|
budget_investments: Investment projects
|
||||||
table_budget_type: "Type"
|
table_budget_type: "Type"
|
||||||
table_completed: Completed
|
table_completed: Completed
|
||||||
table_draft: "Draft"
|
table_draft: "Draft"
|
||||||
@@ -87,8 +87,8 @@ en:
|
|||||||
type_multiple: "Multiple headings"
|
type_multiple: "Multiple headings"
|
||||||
type_pending: "Pending: No headings yet"
|
type_pending: "Pending: No headings yet"
|
||||||
type_single: "Single heading"
|
type_single: "Single heading"
|
||||||
edit_groups: Edit headings groups
|
edit_groups: Heading groups
|
||||||
admin_ballots: Admin ballots
|
admin_ballots: Ballots
|
||||||
no_budgets: "There are no budgets."
|
no_budgets: "There are no budgets."
|
||||||
create:
|
create:
|
||||||
notice: New participatory budget created successfully!
|
notice: New participatory budget created successfully!
|
||||||
@@ -152,7 +152,7 @@ en:
|
|||||||
budget_groups:
|
budget_groups:
|
||||||
name: "Name"
|
name: "Name"
|
||||||
headings_name: "Headings"
|
headings_name: "Headings"
|
||||||
headings_manage: "Manage headings"
|
headings_manage: "Headings"
|
||||||
no_groups: "There are no groups."
|
no_groups: "There are no groups."
|
||||||
amount:
|
amount:
|
||||||
one: "There is 1 group"
|
one: "There is 1 group"
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ es:
|
|||||||
no_activity: No hay actividad de moderadores.
|
no_activity: No hay actividad de moderadores.
|
||||||
budgets:
|
budgets:
|
||||||
actions:
|
actions:
|
||||||
preview: "Previsualizar presupuesto"
|
preview: "Previsualizar"
|
||||||
index:
|
index:
|
||||||
title: Presupuestos participativos
|
title: Presupuestos participativos
|
||||||
new_link: Crear nuevo presupuesto
|
new_link: Crear nuevo presupuesto
|
||||||
@@ -76,7 +76,7 @@ es:
|
|||||||
all: Todos
|
all: Todos
|
||||||
open: Abiertos
|
open: Abiertos
|
||||||
finished: Terminados
|
finished: Terminados
|
||||||
budget_investments: Gestionar proyectos de gasto
|
budget_investments: Proyectos de gasto
|
||||||
table_budget_type: "Tipo"
|
table_budget_type: "Tipo"
|
||||||
table_completed: Completado
|
table_completed: Completado
|
||||||
table_draft: "Borrador"
|
table_draft: "Borrador"
|
||||||
@@ -87,8 +87,8 @@ es:
|
|||||||
type_multiple: "Múltiples partidas"
|
type_multiple: "Múltiples partidas"
|
||||||
type_pending: "Pendiente: Aún no hay partidas"
|
type_pending: "Pendiente: Aún no hay partidas"
|
||||||
type_single: "Partida única"
|
type_single: "Partida única"
|
||||||
edit_groups: Editar grupos de partidas
|
edit_groups: Grupos de partidas
|
||||||
admin_ballots: Gestionar urnas
|
admin_ballots: Urnas
|
||||||
no_budgets: "No hay presupuestos participativos."
|
no_budgets: "No hay presupuestos participativos."
|
||||||
create:
|
create:
|
||||||
notice: '¡Presupuestos participativos creados con éxito!'
|
notice: '¡Presupuestos participativos creados con éxito!'
|
||||||
@@ -152,7 +152,7 @@ es:
|
|||||||
budget_groups:
|
budget_groups:
|
||||||
name: "Nombre"
|
name: "Nombre"
|
||||||
headings_name: "Partidas"
|
headings_name: "Partidas"
|
||||||
headings_manage: "Gestionar partidas"
|
headings_manage: "Partidas"
|
||||||
no_groups: "No hay grupos."
|
no_groups: "No hay grupos."
|
||||||
amount:
|
amount:
|
||||||
one: "Hay 1 grupo de partidas presupuestarias"
|
one: "Hay 1 grupo de partidas presupuestarias"
|
||||||
|
|||||||
@@ -12,18 +12,18 @@ describe Admin::Budgets::TableActionsComponent, type: :component do
|
|||||||
render_inline component
|
render_inline component
|
||||||
|
|
||||||
expect(page).to have_css "a", count: 6
|
expect(page).to have_css "a", count: 6
|
||||||
expect(page).to have_link "Manage projects", href: /investments/
|
expect(page).to have_link "Investment projects", href: /investments/
|
||||||
expect(page).to have_link "Edit headings groups", href: /groups/
|
expect(page).to have_link "Heading groups", href: /groups/
|
||||||
expect(page).to have_link "Edit", href: /edit/
|
expect(page).to have_link "Edit", href: /edit/
|
||||||
expect(page).to have_link "Admin ballots"
|
expect(page).to have_link "Ballots"
|
||||||
expect(page).to have_link "Preview budget", href: /budgets/
|
expect(page).to have_link "Preview", href: /budgets/
|
||||||
expect(page).to have_link "Delete", href: /budgets/
|
expect(page).to have_link "Delete", href: /budgets/
|
||||||
end
|
end
|
||||||
|
|
||||||
it "renders link to create new poll for budgets without polls" do
|
it "renders link to create new poll for budgets without polls" do
|
||||||
render_inline component
|
render_inline component
|
||||||
|
|
||||||
expect(page).to have_css "a[href*='polls'][data-method='post']", text: "Admin ballots"
|
expect(page).to have_css "a[href*='polls'][data-method='post']", text: "Ballots"
|
||||||
end
|
end
|
||||||
|
|
||||||
it "renders link to manage ballots for budgets with polls" do
|
it "renders link to manage ballots for budgets with polls" do
|
||||||
@@ -31,6 +31,6 @@ describe Admin::Budgets::TableActionsComponent, type: :component do
|
|||||||
|
|
||||||
render_inline component
|
render_inline component
|
||||||
|
|
||||||
expect(page).to have_link "Admin ballots", href: /booth_assignments/
|
expect(page).to have_link "Ballots", href: /booth_assignments/
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -37,21 +37,21 @@ describe "Admin budget groups", :admin do
|
|||||||
expect(page).to have_content(group1.name)
|
expect(page).to have_content(group1.name)
|
||||||
expect(page).to have_content(group1.max_votable_headings)
|
expect(page).to have_content(group1.max_votable_headings)
|
||||||
expect(page).to have_content(group1.headings.count)
|
expect(page).to have_content(group1.headings.count)
|
||||||
expect(page).to have_link "Manage headings"
|
expect(page).to have_link "Headings"
|
||||||
end
|
end
|
||||||
|
|
||||||
within "#budget_group_#{group2.id}" do
|
within "#budget_group_#{group2.id}" do
|
||||||
expect(page).to have_content(group2.name)
|
expect(page).to have_content(group2.name)
|
||||||
expect(page).to have_content(group2.max_votable_headings)
|
expect(page).to have_content(group2.max_votable_headings)
|
||||||
expect(page).to have_content(group2.headings.count)
|
expect(page).to have_content(group2.headings.count)
|
||||||
expect(page).to have_link "Manage headings"
|
expect(page).to have_link "Headings"
|
||||||
end
|
end
|
||||||
|
|
||||||
within "#budget_group_#{group3.id}" do
|
within "#budget_group_#{group3.id}" do
|
||||||
expect(page).to have_content(group3.name)
|
expect(page).to have_content(group3.name)
|
||||||
expect(page).to have_content(group3.max_votable_headings)
|
expect(page).to have_content(group3.max_votable_headings)
|
||||||
expect(page).to have_content(group3.headings.count)
|
expect(page).to have_content(group3.headings.count)
|
||||||
expect(page).to have_link "Manage headings"
|
expect(page).to have_link "Headings"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ describe "Admin budgets", :admin do
|
|||||||
scenario "Can preview budget before it is published" do
|
scenario "Can preview budget before it is published" do
|
||||||
visit edit_admin_budget_path(budget)
|
visit edit_admin_budget_path(budget)
|
||||||
|
|
||||||
within_window(window_opened_by { click_link "Preview budget" }) do
|
within_window(window_opened_by { click_link "Preview" }) do
|
||||||
expect(page).to have_current_path budget_path(budget)
|
expect(page).to have_current_path budget_path(budget)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -130,7 +130,7 @@ describe "Admin budgets", :admin do
|
|||||||
expect(page).not_to have_content "This participatory budget is in draft mode"
|
expect(page).not_to have_content "This participatory budget is in draft mode"
|
||||||
expect(page).not_to have_link "Publish budget"
|
expect(page).not_to have_link "Publish budget"
|
||||||
|
|
||||||
within_window(window_opened_by { click_link "Preview budget" }) do
|
within_window(window_opened_by { click_link "Preview" }) do
|
||||||
expect(page).to have_current_path budget_path(budget)
|
expect(page).to have_current_path budget_path(budget)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ describe "Budgets wizard, first step", :admin do
|
|||||||
within("tr", text: "M30 - Summer campaign") { click_link "Edit" }
|
within("tr", text: "M30 - Summer campaign") { click_link "Edit" }
|
||||||
|
|
||||||
expect(page).to have_content "This participatory budget is in draft mode"
|
expect(page).to have_content "This participatory budget is in draft mode"
|
||||||
expect(page).to have_link "Preview budget"
|
expect(page).to have_link "Preview"
|
||||||
expect(page).to have_link "Publish budget"
|
expect(page).to have_link "Publish budget"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -27,13 +27,13 @@ describe "Budgets creation wizard", :admin do
|
|||||||
expect(page).to have_content "Phases configured successfully"
|
expect(page).to have_content "Phases configured successfully"
|
||||||
|
|
||||||
within "tr", text: "Single heading budget" do
|
within "tr", text: "Single heading budget" do
|
||||||
click_link "Edit headings groups"
|
click_link "Heading groups"
|
||||||
end
|
end
|
||||||
|
|
||||||
expect(page).to have_content "There is 1 group"
|
expect(page).to have_content "There is 1 group"
|
||||||
|
|
||||||
within "tr", text: "Single heading budget" do
|
within "tr", text: "Single heading budget" do
|
||||||
click_link "Manage headings"
|
click_link "Headings"
|
||||||
end
|
end
|
||||||
|
|
||||||
expect(page).to have_content "There is 1 heading"
|
expect(page).to have_content "There is 1 heading"
|
||||||
@@ -124,7 +124,7 @@ describe "Budgets creation wizard", :admin do
|
|||||||
expect(page).to have_content "Phases configured successfully"
|
expect(page).to have_content "Phases configured successfully"
|
||||||
|
|
||||||
within "tr", text: "Multiple headings budget" do
|
within "tr", text: "Multiple headings budget" do
|
||||||
click_link "Edit headings groups"
|
click_link "Heading groups"
|
||||||
end
|
end
|
||||||
|
|
||||||
expect(page).to have_content "There are 2 groups"
|
expect(page).to have_content "There are 2 groups"
|
||||||
@@ -135,7 +135,7 @@ describe "Budgets creation wizard", :admin do
|
|||||||
end
|
end
|
||||||
|
|
||||||
within "tr", text: "Districts" do
|
within "tr", text: "Districts" do
|
||||||
click_link "Manage headings"
|
click_link "Headings"
|
||||||
end
|
end
|
||||||
|
|
||||||
expect(page).to have_content "There are 2 headings"
|
expect(page).to have_content "There are 2 headings"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ describe "Admin Budgets", :admin do
|
|||||||
|
|
||||||
visit admin_budgets_path
|
visit admin_budgets_path
|
||||||
|
|
||||||
click_link "Admin ballots"
|
click_link "Ballots"
|
||||||
|
|
||||||
expect(page).to have_current_path(/admin\/polls\/\d+/)
|
expect(page).to have_current_path(/admin\/polls\/\d+/)
|
||||||
expect(page).to have_content(budget.name)
|
expect(page).to have_content(budget.name)
|
||||||
@@ -37,7 +37,7 @@ describe "Admin Budgets", :admin do
|
|||||||
visit admin_budgets_path
|
visit admin_budgets_path
|
||||||
|
|
||||||
within "#budget_#{budget.id}" do
|
within "#budget_#{budget.id}" do
|
||||||
expect(page).to have_link "Admin ballots", href: admin_poll_booth_assignments_path(poll)
|
expect(page).to have_link "Ballots", href: admin_poll_booth_assignments_path(poll)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user