diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index 3aa10bb5c..c8e05d7d6 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -298,7 +298,8 @@ $table-header: #ecf1f6; margin-bottom: 0; } - .menu.simple { + .menu.simple, + .order-links { margin-bottom: $line-height / 2; h2 { @@ -313,6 +314,10 @@ $table-header: #ecf1f6; } } + .order-links { + margin-bottom: $line-height; + } + .tabs-panel { padding-left: 0; padding-right: 0; diff --git a/app/components/moderation/shared/index_component.html.erb b/app/components/moderation/shared/index_component.html.erb index ca984eaa9..56f1ce090 100644 --- a/app/components/moderation/shared/index_component.html.erb +++ b/app/components/moderation/shared/index_component.html.erb @@ -3,10 +3,10 @@ <%= render "shared/filter_subnav", i18n_namespace: "moderation.#{i18n_namespace}.index" %>
diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index aa6a54f0a..28c779b6f 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -170,16 +170,16 @@ ignore_unused: - "admin.dashboard.actions.index.default.*" - "admin.users.index.filter*" - "moderation.comments.index.filter*" - - "moderation.comments.index.order*" + - "moderation.comments.index.orders.*" - "moderation.debates.index.filter*" - "moderation.proposals.index.filter*" - - "moderation.proposals.index.order*" + - "moderation.proposals.index.orders.*" - "moderation.debates.index.filter*" - - "moderation.debates.index.order*" + - "moderation.debates.index.orders.*" - "moderation.budget_investments.index.filter*" - - "moderation.budget_investments.index.order*" + - "moderation.budget_investments.index.orders.*" - "moderation.proposal_notifications.index.filter*" - - "moderation.proposal_notifications.index.order*" + - "moderation.proposal_notifications.index.orders.*" - "valuation.budgets.index.filter*" - "valuation.budget_investments.index.filter*" - "users.show.filters.*" diff --git a/config/locales/en/moderation.yml b/config/locales/en/moderation.yml index 99013cba9..81dc99a41 100644 --- a/config/locales/en/moderation.yml +++ b/config/locales/en/moderation.yml @@ -14,7 +14,6 @@ en: moderate: Moderate hide: Hide comments ignore_flags: Mark as viewed - order: Order orders: flags: Most flagged newest: Newest @@ -36,7 +35,6 @@ en: moderate: Moderate hide: Hide debates ignore_flags: Mark as viewed - order: Order orders: created_at: Newest flags: Most flagged @@ -64,7 +62,6 @@ en: proposal: Proposal hide: Hide proposals ignore_flags: Mark as viewed - order: Order by orders: created_at: Most recent flags: Most flagged @@ -83,7 +80,6 @@ en: budget_investment: Budget investment hide: Hide budget investments ignore_flags: Mark as viewed - order: Order by orders: created_at: Most recent flags: Most flagged @@ -102,7 +98,6 @@ en: proposal_notification: Proposal notification hide: Hide proposals ignore_flags: Mark as viewed - order: Order by orders: created_at: Most recent moderated: Moderated diff --git a/config/locales/es/moderation.yml b/config/locales/es/moderation.yml index cc17634f6..295f98bd9 100644 --- a/config/locales/es/moderation.yml +++ b/config/locales/es/moderation.yml @@ -14,7 +14,6 @@ es: moderate: Moderar hide: Ocultar comentarios ignore_flags: Marcar como revisados - order: Orden orders: flags: Más denunciados newest: Más nuevos @@ -36,7 +35,6 @@ es: moderate: Moderar hide: Ocultar debates ignore_flags: Marcar como revisados - order: Orden orders: created_at: Más nuevos flags: Más denunciados @@ -64,7 +62,6 @@ es: proposal: Propuesta hide: Ocultar Propuestas ignore_flags: Marcar como revisadas - order: Ordenar por orders: created_at: Más recientes flags: Más denunciadas @@ -83,7 +80,6 @@ es: budget_investment: Proyecto de gasto hide: Ocultar proyectos de gasto ignore_flags: Marcar como revisados - order: Ordenar por orders: created_at: Más recientes flags: Más denunciadas @@ -102,7 +98,6 @@ es: proposal_notification: Notificación de propuesta hide: Ocultar notificaciones ignore_flags: Marcar como revisadas - order: Ordenar por orders: created_at: Más recientes moderated: Moderadas diff --git a/spec/system/moderation/budget_investments_spec.rb b/spec/system/moderation/budget_investments_spec.rb index 32eae4501..a10e147a9 100644 --- a/spec/system/moderation/budget_investments_spec.rb +++ b/spec/system/moderation/budget_investments_spec.rb @@ -126,7 +126,8 @@ describe "Moderate budget investments" do accept_confirm { click_button "Mark as viewed" } - expect(page).to have_selector(".js-order-selector[data-order='created_at']") + expect(page).to have_link "Most recent", class: "is-active" + expect(page).to have_link "Most flagged" expect(page).to have_current_path(/filter=all/) expect(page).to have_current_path(/page=2/) diff --git a/spec/system/moderation/comments_spec.rb b/spec/system/moderation/comments_spec.rb index d523a913d..9c5f02bc1 100644 --- a/spec/system/moderation/comments_spec.rb +++ b/spec/system/moderation/comments_spec.rb @@ -144,7 +144,8 @@ describe "Moderate comments" do accept_confirm { click_button "Mark as viewed" } - expect(page).to have_selector(".js-order-selector[data-order='newest']") + expect(page).to have_link "Newest", class: "is-active" + expect(page).to have_link "Most flagged" expect(page).to have_current_path(/filter=all/) expect(page).to have_current_path(/page=2/) diff --git a/spec/system/moderation/debates_spec.rb b/spec/system/moderation/debates_spec.rb index fa9dcf74d..61d584639 100644 --- a/spec/system/moderation/debates_spec.rb +++ b/spec/system/moderation/debates_spec.rb @@ -117,7 +117,8 @@ describe "Moderate debates" do accept_confirm { click_button "Mark as viewed" } - expect(page).to have_selector(".js-order-selector[data-order='created_at']") + expect(page).to have_link "Newest", class: "is-active" + expect(page).to have_link "Most flagged" expect(page).to have_current_path(/filter=all/) expect(page).to have_current_path(/page=2/) diff --git a/spec/system/moderation/proposal_notifications_spec.rb b/spec/system/moderation/proposal_notifications_spec.rb index a73f794ac..28858ccaa 100644 --- a/spec/system/moderation/proposal_notifications_spec.rb +++ b/spec/system/moderation/proposal_notifications_spec.rb @@ -124,7 +124,8 @@ describe "Moderate proposal notifications" do accept_confirm { click_button "Mark as viewed" } - expect(page).to have_selector(".js-order-selector[data-order='created_at']") + expect(page).to have_link "Most recent", class: "is-active" + expect(page).to have_link "Moderated" expect(page).to have_current_path(/filter=all/) expect(page).to have_current_path(/page=2/) diff --git a/spec/system/moderation/proposals_spec.rb b/spec/system/moderation/proposals_spec.rb index cfc37d07a..56b082f06 100644 --- a/spec/system/moderation/proposals_spec.rb +++ b/spec/system/moderation/proposals_spec.rb @@ -116,7 +116,8 @@ describe "Moderate proposals" do accept_confirm { click_button "Mark as viewed" } - expect(page).to have_selector(".js-order-selector[data-order='created_at']") + expect(page).to have_link "Most recent", class: "is-active" + expect(page).to have_link "Most flagged" expect(page).to have_current_path(/filter=all/) expect(page).to have_current_path(/page=2/)