From 58ff7eb20281922133dd5601722a715f1e5544b5 Mon Sep 17 00:00:00 2001 From: decabeza Date: Mon, 2 Apr 2018 16:41:37 +0200 Subject: [PATCH 1/5] Fixes scss lint warnings --- app/assets/stylesheets/participation.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 2fb35ba6f..ff7a212ee 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -1350,8 +1350,7 @@ text-decoration: none; } - a, - div { + a { display: block; padding: $line-height / 2; From fbf917d9b0241a03d3827dfd44cc34a8572822a6 Mon Sep 17 00:00:00 2001 From: decabeza Date: Wed, 18 Apr 2018 16:37:06 +0200 Subject: [PATCH 2/5] Fixes headings height on budgets index --- app/views/budgets/index.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/budgets/index.html.erb b/app/views/budgets/index.html.erb index 5d9a6ca46..ef3463d7e 100644 --- a/app/views/budgets/index.html.erb +++ b/app/views/budgets/index.html.erb @@ -65,9 +65,9 @@
<% current_budget.groups.each do |group| %>

<%= group.name %>

-
    +
      <% group.headings.order_by_group_name.each do |heading| %> -
    • +
    • <% unless current_budget.informing? %> <%= link_to budget_investments_path(current_budget.id, heading_id: heading.id) do %> <%= heading_name_and_price_html(heading, current_budget) %> From 4556a97c7f06531bd49f82f95b02ed210532e8ef Mon Sep 17 00:00:00 2001 From: decabeza Date: Mon, 2 Apr 2018 16:43:15 +0200 Subject: [PATCH 3/5] Removes custom content on debates index --- app/views/debates/index.html.erb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb index 8a0d7d34e..e5355b975 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -1,4 +1,4 @@ -<% provide :title do %><%= t('debates.index.title') %><% end %> +<% provide :title do %><%= t("debates.index.title") %><% end %> <% content_for :header_addon do %> <%= render "shared/search_form", search_path: debates_path(page: 1), @@ -54,10 +54,10 @@ <%= render "shared/advanced_search", search_path: debates_path(page: 1) %> - <%= render 'shared/order_links', i18n_namespace: "debates.index" %> + <%= render "shared/order_links", i18n_namespace: "debates.index" %>
      - <%= link_to t("debates.index.start_debate"), new_debate_path, class: 'button expanded' %> + <%= link_to t("debates.index.start_debate"), new_debate_path, class: "button expanded" %>
      <% if @debates.any? || current_user.blank? %> @@ -81,7 +81,7 @@

      <%= t("debates.index.section_footer.description") %>

      <%= t("debates.index.section_footer.help_text_1") %>

      <%= t("debates.index.section_footer.help_text_2", - org: link_to(setting['org_name'], new_user_registration_path)).html_safe %>

      + org: link_to(setting["org_name"], new_user_registration_path)).html_safe %>

      <%= t("debates.index.section_footer.help_text_3", proposal: link_to(t("debates.index.section_footer.proposals_link"), proposals_path), budget: link_to(t("debates.index.section_footer.budget_link"), budgets_path)).html_safe %> @@ -93,8 +93,8 @@

      From be8bcf9269c9516f6d33b1632a601c1e0dfd6aec Mon Sep 17 00:00:00 2001 From: decabeza Date: Mon, 2 Apr 2018 16:44:32 +0200 Subject: [PATCH 4/5] Adds missing i18n on welcome recommendations --- app/views/welcome/_recommended_carousel.html.erb | 8 ++++++-- config/locales/en/general.yml | 1 + config/locales/es/general.yml | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/views/welcome/_recommended_carousel.html.erb b/app/views/welcome/_recommended_carousel.html.erb index 38339a2ad..3141ef2b4 100644 --- a/app/views/welcome/_recommended_carousel.html.erb +++ b/app/views/welcome/_recommended_carousel.html.erb @@ -29,8 +29,12 @@
      <% recommendeds.each_with_index do |recommended, index| %> - <% end %>
      diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index 8d485e023..00fb3d90c 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -807,6 +807,7 @@ en: btn_text_link: All recommended proposals budget_investments: title: Recommended investments + slide: "See %{title}" verification: i_dont_have_an_account: I don't have an account i_have_an_account: I already have an account diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml index fee56b4c9..315769199 100644 --- a/config/locales/es/general.yml +++ b/config/locales/es/general.yml @@ -806,6 +806,7 @@ es: btn_text_link: Todas las propuestas recomendadas budget_investments: title: Presupuestos recomendados + slide: "Ver %{title}" verification: i_dont_have_an_account: No tengo cuenta, quiero crear una y verificarla i_have_an_account: Ya tengo una cuenta que quiero verificar From b2015312d80feec52282e5ad9430c391d8462977 Mon Sep 17 00:00:00 2001 From: decabeza Date: Mon, 2 Apr 2018 17:37:43 +0200 Subject: [PATCH 5/5] Moves mailer header and footer to partials This prevent use the entire HTML layout, an HTML inside another HTML without using an iframe create some validation errors and break layout details --- app/views/admin/newsletters/show.html.erb | 12 +++++++- app/views/layouts/_mailer_footer.html.erb | 13 ++++++++ app/views/layouts/_mailer_header.html.erb | 15 ++++++++++ app/views/layouts/mailer.html.erb | 36 +++++------------------ 4 files changed, 46 insertions(+), 30 deletions(-) create mode 100644 app/views/layouts/_mailer_footer.html.erb create mode 100644 app/views/layouts/_mailer_header.html.erb diff --git a/app/views/admin/newsletters/show.html.erb b/app/views/admin/newsletters/show.html.erb index 55cc6aabe..1a3e3c96b 100644 --- a/app/views/admin/newsletters/show.html.erb +++ b/app/views/admin/newsletters/show.html.erb @@ -38,7 +38,17 @@ <%= t("admin.newsletters.show.body_help_text") %>

diff --git a/app/views/layouts/_mailer_footer.html.erb b/app/views/layouts/_mailer_footer.html.erb new file mode 100644 index 000000000..b2a3ea388 --- /dev/null +++ b/app/views/layouts/_mailer_footer.html.erb @@ -0,0 +1,13 @@ + + + + + + +
+

+ <%= setting['org_name'] %>

+ +

+ <%= t('mailers.no_reply') %>

+
diff --git a/app/views/layouts/_mailer_header.html.erb b/app/views/layouts/_mailer_header.html.erb new file mode 100644 index 000000000..29fc798df --- /dev/null +++ b/app/views/layouts/_mailer_header.html.erb @@ -0,0 +1,15 @@ + + + + +
+ + + + +
+ + <%= image_tag('logo_email.png', style: "border: 0; display: block; width: 100%;max-width: 370px", alt: setting['org_name']) %> + +
+
diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb index f90b8e39d..9431845dd 100644 --- a/app/views/layouts/mailer.html.erb +++ b/app/views/layouts/mailer.html.erb @@ -7,38 +7,16 @@ + <%= render "layouts/mailer_header" %> + - - - - - <%= yield %> - -
- - - - -
- - <%= image_tag('logo_email.png', style: "border: 0; display: block; width: 100%;max-width: 370px", alt: setting['org_name']) %> - -
-
- - - - - + + <%= yield %> +
-

- <%= setting['org_name'] %>

- -

- <%= t('mailers.no_reply') %>

- -
+ + <%= render "layouts/mailer_footer" %>