- |
- <%= link_to page.title, edit_admin_site_customization_page_path(page) %>
- |
+ <%= page.title %> |
<%= page.slug %> |
-
- <%= link_to t("admin.site_customization.pages.page.see_cards"), admin_site_customization_page_cards_path(page),
- class: "button hollow expanded" %>
- |
<%= I18n.l page.created_at, format: :short %> |
<%= I18n.l page.created_at, format: :short %> |
<%= t("admin.site_customization.pages.page.status_#{page.status}") %> |
- <%= render Admin::TableActionsComponent.new(page,
- actions: [:destroy],
- destroy_text: t("admin.site_customization.pages.index.delete")
- ) do |actions| %>
+ <%= render Admin::TableActionsComponent.new(page) do |actions| %>
+ <%= actions.link_to t("admin.site_customization.pages.page.see_cards"),
+ admin_site_customization_page_cards_path(page),
+ class: "button hollow expanded" %>
+
<% if page.status == "published" %>
<%= actions.link_to t("admin.site_customization.pages.index.see_page"),
page.url,
diff --git a/app/views/admin/valuators/_valuator_row.html.erb b/app/views/admin/valuators/_valuator_row.html.erb
index a93d492d7..6a8f28968 100644
--- a/app/views/admin/valuators/_valuator_row.html.erb
+++ b/app/views/admin/valuators/_valuator_row.html.erb
@@ -1,5 +1,5 @@
|
- | <%= link_to valuator.name, admin_valuator_path(valuator) %> |
+ <%= valuator.name %> |
<%= valuator.email %> |
<% if valuator.description.present? %>
@@ -19,6 +19,10 @@
<%= valuator_abilities(valuator) %>
|
- <%= render Admin::TableActionsComponent.new(valuator) %>
+ <%= render Admin::TableActionsComponent.new(valuator) do |actions| %>
+ <%= actions.link_to t("admin.shared.view"),
+ admin_valuator_path(valuator),
+ class: "button hollow" %>
+ <% end %>
|
diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml
index a7960eee4..346b59c09 100644
--- a/config/locales/en/admin.yml
+++ b/config/locales/en/admin.yml
@@ -1512,7 +1512,6 @@ en:
updated_at: Updated at
title: Title
slug: Slug
- cards_title: Cards
see_cards: See Cards
cards:
cards_title: cards
diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml
index 586cc1b70..2feeab0d6 100644
--- a/config/locales/es/admin.yml
+++ b/config/locales/es/admin.yml
@@ -1511,7 +1511,6 @@ es:
updated_at: Última actualización
title: Título
slug: Slug
- cards_title: Tarjetas
see_cards: Ver tarjetas
cards:
cards_title: tarjetas
diff --git a/spec/shared/system/admin_milestoneable.rb b/spec/shared/system/admin_milestoneable.rb
index 5374e0a4a..bdbd3e3bb 100644
--- a/spec/shared/system/admin_milestoneable.rb
+++ b/spec/shared/system/admin_milestoneable.rb
@@ -90,7 +90,7 @@ shared_examples "admin_milestoneable" do |factory_name, path_name|
visit path
expect(page).to have_link document.title
- click_link milestone.title
+ within("tr", text: milestone.title) { click_link "Edit" }
expect(page).to have_css("img[alt='#{milestone.image.title}']")
diff --git a/spec/system/admin/legislation/draft_versions_spec.rb b/spec/system/admin/legislation/draft_versions_spec.rb
index 05e41194c..9423fa55f 100644
--- a/spec/system/admin/legislation/draft_versions_spec.rb
+++ b/spec/system/admin/legislation/draft_versions_spec.rb
@@ -21,7 +21,7 @@ describe "Admin legislation draft versions" do
visit admin_legislation_processes_path(filter: "all")
- click_link "An example legislation process"
+ within("tr", text: "An example legislation process") { click_link "Edit" }
click_link "Drafting"
click_link "Version 1"
@@ -41,10 +41,7 @@ describe "Admin legislation draft versions" do
end
click_link "All"
-
- expect(page).to have_content "An example legislation process"
-
- click_link "An example legislation process"
+ within("tr", text: "An example legislation process") { click_link "Edit" }
click_link "Drafting"
click_link "Create version"
@@ -77,7 +74,7 @@ describe "Admin legislation draft versions" do
expect(page).not_to have_link "All"
- click_link "An example legislation process"
+ within("tr", text: "An example legislation process") { click_link "Edit" }
click_link "Drafting"
click_link "Version 1"
diff --git a/spec/system/admin/legislation/processes_spec.rb b/spec/system/admin/legislation/processes_spec.rb
index e85fdc353..ce766faa0 100644
--- a/spec/system/admin/legislation/processes_spec.rb
+++ b/spec/system/admin/legislation/processes_spec.rb
@@ -201,7 +201,7 @@ describe "Admin collaborative legislation" do
click_link "Collaborative Legislation"
end
- click_link "An example legislation process"
+ within("tr", text: "An example legislation process") { click_link "Edit" }
expect(page).to have_selector("h2", text: "An example legislation process")
expect(find("#legislation_process_debate_phase_enabled")).to be_checked
@@ -224,7 +224,7 @@ describe "Admin collaborative legislation" do
click_link "Collaborative Legislation"
end
- click_link "An example legislation process"
+ within("tr", text: "An example legislation process") { click_link "Edit" }
expect(find("#legislation_process_draft_publication_enabled")).to be_checked
diff --git a/spec/system/admin/legislation/questions_spec.rb b/spec/system/admin/legislation/questions_spec.rb
index c2db6cdf8..3c70fed27 100644
--- a/spec/system/admin/legislation/questions_spec.rb
+++ b/spec/system/admin/legislation/questions_spec.rb
@@ -25,7 +25,7 @@ describe "Admin legislation questions" do
visit admin_legislation_processes_path(filter: "all")
- click_link "An example legislation process"
+ within("tr", text: "An example legislation process") { click_link "Edit" }
click_link "Debate"
expect(page).to have_content("Question 1")
@@ -43,9 +43,7 @@ describe "Admin legislation questions" do
click_link "All"
- expect(page).to have_content "An example legislation process"
-
- click_link "An example legislation process"
+ within("tr", text: "An example legislation process") { click_link "Edit" }
click_link "Debate"
click_link "Create question"
@@ -71,9 +69,8 @@ describe "Admin legislation questions" do
expect(page).not_to have_link "All"
- click_link "An example legislation process"
+ within("tr", text: "An example legislation process") { click_link "Edit" }
click_link "Debate"
-
click_link "Question 2"
fill_in "Question", with: "Question 2b"
diff --git a/spec/system/admin/site_customization/pages_spec.rb b/spec/system/admin/site_customization/pages_spec.rb
index 3671ba64a..066324e26 100644
--- a/spec/system/admin/site_customization/pages_spec.rb
+++ b/spec/system/admin/site_customization/pages_spec.rb
@@ -70,7 +70,7 @@ describe "Admin custom pages" do
click_link "Custom pages"
end
- click_link "An example custom page"
+ within("tr", text: "An example custom page") { click_link "Edit" }
expect(page).to have_selector("h2", text: "An example custom page")
expect(page).to have_selector("input[value='custom-example-page']")