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:
Javi Martín
2021-06-06 03:03:21 +02:00
parent 6f04c8f057
commit 5531a0b2bc
8 changed files with 28 additions and 28 deletions

View File

@@ -67,7 +67,7 @@ en:
no_activity: There are no moderators activity.
budgets:
actions:
preview: "Preview budget"
preview: "Preview"
index:
title: Participatory budgets
new_link: Create new budget
@@ -76,7 +76,7 @@ en:
all: All
open: Open
finished: Finished
budget_investments: Manage projects
budget_investments: Investment projects
table_budget_type: "Type"
table_completed: Completed
table_draft: "Draft"
@@ -87,8 +87,8 @@ en:
type_multiple: "Multiple headings"
type_pending: "Pending: No headings yet"
type_single: "Single heading"
edit_groups: Edit headings groups
admin_ballots: Admin ballots
edit_groups: Heading groups
admin_ballots: Ballots
no_budgets: "There are no budgets."
create:
notice: New participatory budget created successfully!
@@ -152,7 +152,7 @@ en:
budget_groups:
name: "Name"
headings_name: "Headings"
headings_manage: "Manage headings"
headings_manage: "Headings"
no_groups: "There are no groups."
amount:
one: "There is 1 group"

View File

@@ -67,7 +67,7 @@ es:
no_activity: No hay actividad de moderadores.
budgets:
actions:
preview: "Previsualizar presupuesto"
preview: "Previsualizar"
index:
title: Presupuestos participativos
new_link: Crear nuevo presupuesto
@@ -76,7 +76,7 @@ es:
all: Todos
open: Abiertos
finished: Terminados
budget_investments: Gestionar proyectos de gasto
budget_investments: Proyectos de gasto
table_budget_type: "Tipo"
table_completed: Completado
table_draft: "Borrador"
@@ -87,8 +87,8 @@ es:
type_multiple: "Múltiples partidas"
type_pending: "Pendiente: Aún no hay partidas"
type_single: "Partida única"
edit_groups: Editar grupos de partidas
admin_ballots: Gestionar urnas
edit_groups: Grupos de partidas
admin_ballots: Urnas
no_budgets: "No hay presupuestos participativos."
create:
notice: '¡Presupuestos participativos creados con éxito!'
@@ -152,7 +152,7 @@ es:
budget_groups:
name: "Nombre"
headings_name: "Partidas"
headings_manage: "Gestionar partidas"
headings_manage: "Partidas"
no_groups: "No hay grupos."
amount:
one: "Hay 1 grupo de partidas presupuestarias"

View File

@@ -12,18 +12,18 @@ describe Admin::Budgets::TableActionsComponent, type: :component do
render_inline component
expect(page).to have_css "a", count: 6
expect(page).to have_link "Manage projects", href: /investments/
expect(page).to have_link "Edit headings groups", href: /groups/
expect(page).to have_link "Investment projects", href: /investments/
expect(page).to have_link "Heading groups", href: /groups/
expect(page).to have_link "Edit", href: /edit/
expect(page).to have_link "Admin ballots"
expect(page).to have_link "Preview budget", href: /budgets/
expect(page).to have_link "Ballots"
expect(page).to have_link "Preview", href: /budgets/
expect(page).to have_link "Delete", href: /budgets/
end
it "renders link to create new poll for budgets without polls" do
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
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
expect(page).to have_link "Admin ballots", href: /booth_assignments/
expect(page).to have_link "Ballots", href: /booth_assignments/
end
end

View File

@@ -37,21 +37,21 @@ describe "Admin budget groups", :admin do
expect(page).to have_content(group1.name)
expect(page).to have_content(group1.max_votable_headings)
expect(page).to have_content(group1.headings.count)
expect(page).to have_link "Manage headings"
expect(page).to have_link "Headings"
end
within "#budget_group_#{group2.id}" do
expect(page).to have_content(group2.name)
expect(page).to have_content(group2.max_votable_headings)
expect(page).to have_content(group2.headings.count)
expect(page).to have_link "Manage headings"
expect(page).to have_link "Headings"
end
within "#budget_group_#{group3.id}" do
expect(page).to have_content(group3.name)
expect(page).to have_content(group3.max_votable_headings)
expect(page).to have_content(group3.headings.count)
expect(page).to have_link "Manage headings"
expect(page).to have_link "Headings"
end
end

View File

@@ -116,7 +116,7 @@ describe "Admin budgets", :admin do
scenario "Can preview budget before it is published" do
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)
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_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)
end
end

View File

@@ -91,7 +91,7 @@ describe "Budgets wizard, first step", :admin do
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_link "Preview budget"
expect(page).to have_link "Preview"
expect(page).to have_link "Publish budget"
end
end

View File

@@ -27,13 +27,13 @@ describe "Budgets creation wizard", :admin do
expect(page).to have_content "Phases configured successfully"
within "tr", text: "Single heading budget" do
click_link "Edit headings groups"
click_link "Heading groups"
end
expect(page).to have_content "There is 1 group"
within "tr", text: "Single heading budget" do
click_link "Manage headings"
click_link "Headings"
end
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"
within "tr", text: "Multiple headings budget" do
click_link "Edit headings groups"
click_link "Heading groups"
end
expect(page).to have_content "There are 2 groups"
@@ -135,7 +135,7 @@ describe "Budgets creation wizard", :admin do
end
within "tr", text: "Districts" do
click_link "Manage headings"
click_link "Headings"
end
expect(page).to have_content "There are 2 headings"

View File

@@ -8,7 +8,7 @@ describe "Admin Budgets", :admin do
visit admin_budgets_path
click_link "Admin ballots"
click_link "Ballots"
expect(page).to have_current_path(/admin\/polls\/\d+/)
expect(page).to have_content(budget.name)
@@ -37,7 +37,7 @@ describe "Admin Budgets", :admin do
visit admin_budgets_path
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