From e949d4d16316627cb23b3d4b6e943e69fc507cef Mon Sep 17 00:00:00 2001 From: decabeza Date: Tue, 19 Mar 2019 16:59:57 +0100 Subject: [PATCH] Refactor proposal total counter value --- app/assets/stylesheets/dashboard.scss | 4 ---- app/views/layouts/dashboard/_proposal_totals.html.erb | 8 ++++++-- config/locales/en/general.yml | 7 ++++--- config/locales/es/general.yml | 7 ++++--- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/app/assets/stylesheets/dashboard.scss b/app/assets/stylesheets/dashboard.scss index 82c9804df..6ebeba105 100644 --- a/app/assets/stylesheets/dashboard.scss +++ b/app/assets/stylesheets/dashboard.scss @@ -52,10 +52,6 @@ } } - .supports .counter-label { - display: block; - } - .counter-value { font-size: rem-calc(20); font-weight: bold; diff --git a/app/views/layouts/dashboard/_proposal_totals.html.erb b/app/views/layouts/dashboard/_proposal_totals.html.erb index f9dcf0307..8e3fd1a3d 100644 --- a/app/views/layouts/dashboard/_proposal_totals.html.erb +++ b/app/views/layouts/dashboard/_proposal_totals.html.erb @@ -24,9 +24,13 @@
<%= number_with_delimiter(proposal.votes_for.size, delimiter: '.') %> / - <%= t("layouts.dashboard.proposal_totals.support_count", count: number_with_delimiter(next_goal_supports, delimiter: '.')).html_safe %> + <%= number_with_delimiter(next_goal_supports, delimiter: '.') %> +
+
+ <%= t("layouts.dashboard.proposal_totals.supports", count: proposal.votes_for.size) %> +
+ <%= t("layouts.dashboard.proposal_totals.current_goal") %>
- <%= t("layouts.dashboard.proposal_totals.current_goal") %>
diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index c3a0bc3c9..80c8c0120 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -210,9 +210,10 @@ en: show_proposal: Show proposal preview_proposal: Preview proposal current_goal: Current goal - support_count: - one: "%{count} support" - other: "%{count} supports" + supports: + zero: No supports + one: 1 Support + other: "Supports" footer: accessibility: Accessibility conditions: Terms and conditions of use diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml index b5aaeb310..0fb3b0b48 100644 --- a/config/locales/es/general.yml +++ b/config/locales/es/general.yml @@ -210,9 +210,10 @@ es: show_proposal: Ver propuesta preview_proposal: Previsualizar propuesta current_goal: Meta actual - support_count: - one: "%{count} Apoyo" - other: "%{count} Apoyos" + supports: + zero: Sin apoyos + one: 1 Apoyo + other: "Apoyos" footer: accessibility: Accesibilidad conditions: Condiciones de uso