diff --git a/app/assets/fonts/quote-after.svg b/app/assets/fonts/quote-after.svg deleted file mode 100644 index 748305640..000000000 --- a/app/assets/fonts/quote-after.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - diff --git a/app/assets/fonts/quote-before.svg b/app/assets/fonts/quote-before.svg deleted file mode 100644 index 3620ae1ab..000000000 --- a/app/assets/fonts/quote-before.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - diff --git a/app/assets/images/decide_madrid.png b/app/assets/images/decide_madrid.png deleted file mode 100644 index 7ae6b26b4..000000000 Binary files a/app/assets/images/decide_madrid.png and /dev/null differ diff --git a/app/assets/images/quote-after-blue.png b/app/assets/images/quote_after_blue.png similarity index 100% rename from app/assets/images/quote-after-blue.png rename to app/assets/images/quote_after_blue.png diff --git a/app/assets/images/quote-after-white.png b/app/assets/images/quote_after_white.png similarity index 100% rename from app/assets/images/quote-after-white.png rename to app/assets/images/quote_after_white.png diff --git a/app/assets/images/quote-before-blue.png b/app/assets/images/quote_before_blue.png similarity index 100% rename from app/assets/images/quote-before-blue.png rename to app/assets/images/quote_before_blue.png diff --git a/app/assets/images/quote-before-white.png b/app/assets/images/quote_before_white.png similarity index 100% rename from app/assets/images/quote-before-white.png rename to app/assets/images/quote_before_white.png diff --git a/app/assets/stylesheets/dashboard.scss b/app/assets/stylesheets/dashboard.scss index ac9102f3d..62931a13c 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/assets/stylesheets/icons.scss b/app/assets/stylesheets/icons.scss index 5256b236e..bcfafc135 100644 --- a/app/assets/stylesheets/icons.scss +++ b/app/assets/stylesheets/icons.scss @@ -299,7 +299,7 @@ display: block; width: 60px; height: 60px; - background-image: url(quote-before.svg); + background-image: url("quote_before_blue.png"); background-repeat: no-repeat; } @@ -309,17 +309,16 @@ display: block; width: 60px; height: 60px; - background-image: url(quote-after.svg); + background-image: url("quote_after_blue.png"); background-repeat: no-repeat; } - .icon-finger::before { content: ''; background-size: cover; display: inline-block; width: 50px; height: 50px; - background-image: url(finger.svg); + background-image: url("finger.png"); background-repeat: no-repeat; } diff --git a/app/models/dashboard/action.rb b/app/models/dashboard/action.rb index b4a450b8f..3e553d0de 100644 --- a/app/models/dashboard/action.rb +++ b/app/models/dashboard/action.rb @@ -13,7 +13,7 @@ class Dashboard::Action < ActiveRecord::Base acts_as_paranoid column: :hidden_at include ActsAsParanoidAliases - has_many :executed_actions, dependent: :restrict_with_error, class_name: 'Dashboard::ExecutedAction' + has_many :executed_actions, dependent: :restrict_with_error, class_name: "Dashboard::ExecutedAction" has_many :proposals, through: :executed_actions enum action_type: [:proposed_action, :resource] @@ -53,15 +53,15 @@ class Dashboard::Action < ActiveRecord::Base def self.active_for(proposal) published_at = proposal.published_at&.to_date || Date.today - active.where('required_supports <= ?', proposal.cached_votes_up) - .where('day_offset <= ?', (Date.today - published_at).to_i) + active.where("required_supports <= ?", proposal.cached_votes_up) + .where("day_offset <= ?", (Date.today - published_at).to_i) .by_proposal(proposal) end def self.course_for(proposal) active .resources - .where('required_supports > ?', proposal.cached_votes_up) + .where("required_supports > ?", proposal.cached_votes_up) .order(required_supports: :asc) end diff --git a/app/views/admin/dashboard/actions/_form.html.erb b/app/views/admin/dashboard/actions/_form.html.erb index 409af5736..14cb2d952 100644 --- a/app/views/admin/dashboard/actions/_form.html.erb +++ b/app/views/admin/dashboard/actions/_form.html.erb @@ -34,7 +34,7 @@
-
+
<%= f.check_box :published_proposal, label: t("admin.dashboard.actions.form.published_proposal") %>

<%= t("admin.dashboard.actions.form.published_proposal_help_text") %>

diff --git a/app/views/admin/dashboard/actions/index.html.erb b/app/views/admin/dashboard/actions/index.html.erb index 425e34860..a8aff41e9 100644 --- a/app/views/admin/dashboard/actions/index.html.erb +++ b/app/views/admin/dashboard/actions/index.html.erb @@ -15,7 +15,7 @@ <%= t("admin.dashboard.actions.index.day_offset") %> <%= t("admin.dashboard.actions.index.required_supports") %> <%= t("admin.dashboard.actions.index.order") %> - <%= t("admin.actions.actions") %> + <%= t("admin.actions.actions") %> diff --git a/app/views/dashboard/_proposed_action.html.erb b/app/views/dashboard/_proposed_action.html.erb index 03a888e28..c51a26ca7 100644 --- a/app/views/dashboard/_proposed_action.html.erb +++ b/app/views/dashboard/_proposed_action.html.erb @@ -20,28 +20,22 @@

<%= l(proposed_action.executed_actions.find_by(proposal: proposal).executed_at.to_date) %>

- <% if proposed_action.description.present? %> - - <%= t("dashboard.recommended_actions.show_description") %> - -
- <%= proposed_action.description.html_safe %> -
- <% end %> - <% else %> - <% if proposed_action.description.present? %> - - <%= t("dashboard.recommended_actions.show_description") %> - -
- <%= proposed_action.description.html_safe %> -
- <% end %> - <% proposed_action.links.each do |link| %> -

<%= link_to link.label, link.url, target: "_blank" %>

- <% end %> - <%= render partial: 'document', collection: proposed_action.documents %> <% end %> + + <% if proposed_action.description.present? %> + + <%= t("dashboard.recommended_actions.show_description") %> + +
+ <%= proposed_action.description.html_safe %> +
+ <% end %> + + <% proposed_action.links.each do |link| %> +

<%= link_to link.label, link.url, target: "_blank" %>

+ <% end %> + + <%= render partial: 'document', collection: proposed_action.documents %>
diff --git a/app/views/dashboard/mailer/forward.html.erb b/app/views/dashboard/mailer/forward.html.erb index f64019f85..2d3ef8607 100644 --- a/app/views/dashboard/mailer/forward.html.erb +++ b/app/views/dashboard/mailer/forward.html.erb @@ -5,10 +5,10 @@ - <%= image_tag 'quote-before-white.png', style: 'max-width: 40px; vertical-align: top;' %> + <%= image_tag "quote_before_white.png", style: "max-width: 40px; vertical-align: top;" %>

<%= @proposal.title %>

- <%= image_tag 'quote-after-white.png', style: 'max-width: 40px; vertical-align: top;' %> -

<%= t("dashboard.mailer.forward.subtitle").html_safe %>

+ <%= image_tag "quote_after_white.png", style: "max-width: 40px; vertical-align: top;" %> +

<%= t("dashboard.mailer.forward.subtitle_html") %>

diff --git a/app/views/dashboard/mailing/index.html.erb b/app/views/dashboard/mailing/index.html.erb index 6db3347d3..401b8b0a6 100644 --- a/app/views/dashboard/mailing/index.html.erb +++ b/app/views/dashboard/mailing/index.html.erb @@ -2,10 +2,10 @@
- <%= image_tag 'quote-before-white.png' %> + <%= image_tag "quote_before_white.png" %>

<%= proposal.title %>

- <%= image_tag 'quote-after-white.png' %> -

<%= t("dashboard.mailer.forward.subtitle").html_safe %>

+ <%= image_tag "quote_after_white.png" %> +

<%= t("dashboard.mailer.forward.subtitle_html") %>

diff --git a/app/views/dashboard/poster/index.html.erb b/app/views/dashboard/poster/index.html.erb index d0589b2e0..233238577 100644 --- a/app/views/dashboard/poster/index.html.erb +++ b/app/views/dashboard/poster/index.html.erb @@ -9,7 +9,9 @@ <%= image_tag("finger.png") %> <%= t("dashboard.poster.index.poster_subtitle") %> -

<%= t("dashboard.poster.index.intro_text", org: Setting["org_name"]).html_safe %>

+

+ <%= t("dashboard.poster.index.intro_text_html", org: Setting["org_name"]) %> +

<%= t("dashboard.poster.index.proposal_code", code: proposal.code) %> @@ -23,11 +25,11 @@

<%= t("dashboard.poster.index.support") %>

- <%= image_tag 'quote-before-blue.png' %> + <%= image_tag "quote_before_blue.png" %>

<%= proposal.title %>

- <%= image_tag 'quote-after-blue.png' %> + <%= image_tag "quote_after_blue.png" %>
diff --git a/app/views/dashboard/poster/index.pdf.erb b/app/views/dashboard/poster/index.pdf.erb index 979a31eee..0176fbd36 100644 --- a/app/views/dashboard/poster/index.pdf.erb +++ b/app/views/dashboard/poster/index.pdf.erb @@ -16,7 +16,7 @@

- <%= t("dashboard.poster.index.intro_text", org: Setting["org_name"]).html_safe %> + <%= t("dashboard.poster.index.intro_text_html", org: Setting["org_name"]) %>

<%= t("dashboard.poster.index.proposal_code", code: proposal.code) %> @@ -30,11 +30,11 @@

<%= t("dashboard.poster.index.support") %>

- <%= wicked_pdf_image_tag 'quote-before-blue.png' %> + <%= wicked_pdf_image_tag "quote_before_blue.png" %>

<%= proposal.title %>

- <%= wicked_pdf_image_tag 'quote-after-blue.png' %> + <%= wicked_pdf_image_tag "quote_after_blue.png" %>
diff --git a/app/views/layouts/dashboard/_proposal_totals.html.erb b/app/views/layouts/dashboard/_proposal_totals.html.erb index 6b6d7a071..51dc85986 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") %>
@@ -40,11 +44,7 @@
-
- -
- -
+