From 7ed80d78838aebed5a55e1e550e17890b5c5c950 Mon Sep 17 00:00:00 2001 From: decabeza Date: Thu, 30 May 2019 11:47:24 +0200 Subject: [PATCH] Move link to selected proposals on proposals index --- app/views/proposals/_proposals_lists.html.erb | 4 ---- app/views/proposals/index.html.erb | 8 ++++++++ config/locales/en/general.yml | 1 + config/locales/es/general.yml | 1 + spec/features/proposals_spec.rb | 8 ++++---- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/app/views/proposals/_proposals_lists.html.erb b/app/views/proposals/_proposals_lists.html.erb index 43154aeab..9966582ca 100644 --- a/app/views/proposals/_proposals_lists.html.erb +++ b/app/views/proposals/_proposals_lists.html.erb @@ -13,8 +13,4 @@ <%= link_to t("proposals.index.retired_proposals_link"), proposals_path(retired: "all"), class: "small" %> -
- <%= link_to t("proposals.index.selected_proposals"), - proposals_path(selected: "all"), - class: "small" %>

diff --git a/app/views/proposals/index.html.erb b/app/views/proposals/index.html.erb index 1c979099c..cdb5f8465 100644 --- a/app/views/proposals/index.html.erb +++ b/app/views/proposals/index.html.erb @@ -124,6 +124,14 @@ <%= link_to t("proposals.index.start_proposal"), new_proposal_path, class: "button expanded" %> + + + +
+

+ <%= link_to t("proposals.index.selected_proposals_link"), proposals_path(selected: "all") %> +

+ <% if params[:retired].blank? %> <%= render "categories" %> <%= render "shared/tag_cloud", taggable: "proposal" %> diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index 66c04b8cc..e28656c35 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -377,6 +377,7 @@ en: retired_proposals: Retired proposals retired_proposals_link: "Proposals retired by the author" selected_proposals: Selected proposals + selected_proposals_link: View selected proposals archived_proposals: Archived proposals proposals_lists: Proposals lists retired_links: diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml index a91d6ea0b..15617c7c7 100644 --- a/config/locales/es/general.yml +++ b/config/locales/es/general.yml @@ -377,6 +377,7 @@ es: retired_proposals: Propuestas retiradas retired_proposals_link: "Propuestas retiradas por sus autores" selected_proposals: Propuestas seleccionadas + selected_proposals_link: Ver propuestas seleccionadas archived_proposals: Propuestas archivadas proposals_lists: Listas de propuestas retired_links: diff --git a/spec/features/proposals_spec.rb b/spec/features/proposals_spec.rb index 5e4667b22..da7e5c326 100644 --- a/spec/features/proposals_spec.rb +++ b/spec/features/proposals_spec.rb @@ -949,7 +949,7 @@ feature "Proposals" do scenario "show in selected proposals list" do visit proposals_path - click_link "Selected proposals" + click_link "View selected proposals" expect(page).to have_selector("#proposals .proposal", count: 1) expect(page).to have_content selected_proposal.title @@ -972,7 +972,7 @@ feature "Proposals" do expect(page).to have_selector("#proposals .proposal-featured") expect(page).to have_selector("#featured-proposals") - click_link "Selected proposals" + click_link "View selected proposals" expect(page).not_to have_selector("#proposals .proposal-featured") expect(page).not_to have_selector("#featured-proposals") @@ -991,7 +991,7 @@ feature "Proposals" do expect(page).to have_link "Recommended" expect(page).to have_link "See more recommendations" - click_link "Selected proposals" + click_link "View selected proposals" expect(page).not_to have_css ".recommendation" expect(page).not_to have_link "Recommended" @@ -1006,7 +1006,7 @@ feature "Proposals" do expect(page).to have_link "highest rated" expect(page).to have_link "newest" - click_link "Selected proposals" + click_link "View selected proposals" expect(page).not_to have_css "ul.submenu" expect(page).not_to have_link "most active"