From 24f0418ddf57235f5d8f9d99434f495f38470bba Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 27 Apr 2018 17:26:35 +0200 Subject: [PATCH 01/11] Updates pull resquest template --- .github/PULL_REQUEST_TEMPLATE | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE index 0689cbc01..abb23cf0a 100644 --- a/.github/PULL_REQUEST_TEMPLATE +++ b/.github/PULL_REQUEST_TEMPLATE @@ -1,17 +1,17 @@ References -========== +=================== > Add references to related Issues/Pull Requests/Travis Builds/Rollbar errors/etc... Objectives -========== +=================== > What are the objectives of this changes? (If there is no related Issue with an explanation) -Visual Changes (if any) -======================= +Visual Changes +=================== > Any visual changes? please attach screenshots (or gifs) showing them. > If modified views are public (not the admin panel), try them in mobile display (with your browser's developer console) and add screenshots. Notes -===================== +=================== > Mention rake tasks or actions to be done when deploying this changes to a server (if any). > Explain any caveats, or important things to notice like deprecations (if any). From c386f777e394b730e6bb01011822fdf7ad148c6d Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 27 Apr 2018 17:29:11 +0200 Subject: [PATCH 02/11] Fixes duplicated data-deep-link-smudge attribute --- app/views/budgets/investments/_filter_subnav.html.erb | 2 +- app/views/legislation/proposals/_filter_subnav.html.erb | 2 +- app/views/proposals/_filter_subnav.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/budgets/investments/_filter_subnav.html.erb b/app/views/budgets/investments/_filter_subnav.html.erb index 4a38b19fc..048302b2e 100644 --- a/app/views/budgets/investments/_filter_subnav.html.erb +++ b/app/views/budgets/investments/_filter_subnav.html.erb @@ -4,7 +4,7 @@ data-deep-link="true" data-update-history="true" data-deep-link-smudge="true" - data-deep-link-smudge="500" + data-deep-link-smudge-delay="500" data-tabs>
  • <%= link_to "#tab-comments" do %> diff --git a/app/views/legislation/proposals/_filter_subnav.html.erb b/app/views/legislation/proposals/_filter_subnav.html.erb index 3b404338b..66a65fed7 100644 --- a/app/views/legislation/proposals/_filter_subnav.html.erb +++ b/app/views/legislation/proposals/_filter_subnav.html.erb @@ -4,7 +4,7 @@ data-deep-link="true" data-update-history="true" data-deep-link-smudge="true" - data-deep-link-smudge="500" + data-deep-link-smudge-delay="500" data-tabs>
  • <%= link_to "#tab-comments" do %> diff --git a/app/views/proposals/_filter_subnav.html.erb b/app/views/proposals/_filter_subnav.html.erb index b15c26efc..2132be6e5 100644 --- a/app/views/proposals/_filter_subnav.html.erb +++ b/app/views/proposals/_filter_subnav.html.erb @@ -4,7 +4,7 @@ data-deep-link="true" data-update-history="true" data-deep-link-smudge="true" - data-deep-link-smudge="500" + data-deep-link-smudge-delay="500" data-tabs>
  • <%= link_to "#tab-comments" do %> From c816f4b01ec597bd983a9d2a8b91c5d6746a124f Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 27 Apr 2018 17:54:15 +0200 Subject: [PATCH 03/11] Adds missing features i18n and cleans i18n-tasks --- config/locales/en/settings.yml | 3 +++ config/locales/es/settings.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/config/locales/en/settings.yml b/config/locales/en/settings.yml index 1b4444274..938717187 100644 --- a/config/locales/en/settings.yml +++ b/config/locales/en/settings.yml @@ -47,6 +47,9 @@ en: map: Proposals and budget investments geolocation allow_images: Allow upload and show images allow_attached_documents: Allow upload and show of attached documents + guides: Guides to create proposals or investment projects + public_stats: Public stats + related_content_score_threshold: Related content score threshold map_latitude: Latitude map_longitude: Longitude map_zoom: Zoom diff --git a/config/locales/es/settings.yml b/config/locales/es/settings.yml index 161fae452..57dfaae50 100644 --- a/config/locales/es/settings.yml +++ b/config/locales/es/settings.yml @@ -47,6 +47,9 @@ es: map: Geolocalización de propuestas y proyectos de gasto allow_images: Permitir subir y mostrar imágenes allow_attached_documents: Permitir creación de documentos adjuntos + guides: Guías para crear propuestas o proyectos de inversión + public_stats: Estadísticas públicas + related_content_score_threshold: Umbral de puntuación de contenido relacionado map_latitude: Latitud map_longitude: Longitud map_zoom: Zoom From 13d1de169d4bfb3ba606b8407c314fabd845cc0e Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 27 Apr 2018 17:59:11 +0200 Subject: [PATCH 04/11] Replaces foundation header-sizes to header-styles --- app/assets/stylesheets/_consul_settings.scss | 26 ++++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/app/assets/stylesheets/_consul_settings.scss b/app/assets/stylesheets/_consul_settings.scss index 70bde8f65..4a083bb62 100644 --- a/app/assets/stylesheets/_consul_settings.scss +++ b/app/assets/stylesheets/_consul_settings.scss @@ -81,22 +81,22 @@ $button-radius: $global-radius; $font-family-serif: Georgia, 'Times New Roman', Times, serif; -$header-sizes: ( +$header-styles: ( small: ( - 'h1': 34, - 'h2': 24, - 'h3': 20, - 'h4': 18, - 'h5': 16, - 'h6': 14, + 'h1': ('font-size': 34), + 'h2': ('font-size': 24), + 'h3': ('font-size': 20), + 'h4': ('font-size': 18), + 'h5': ('font-size': 16), + 'h6': ('font-size': 14), ), medium: ( - 'h1': 44, - 'h2': 34, - 'h3': 24, - 'h4': 19, - 'h5': 16, - 'h6': 13, + 'h1': ('font-size': 44), + 'h2': ('font-size': 34), + 'h3': ('font-size': 24), + 'h4': ('font-size': 19), + 'h5': ('font-size': 16), + 'h6': ('font-size': 13), ), ); From 354e42526fc7503c8a9d12a5fd478b062c13d85d Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 27 Apr 2018 18:02:30 +0200 Subject: [PATCH 05/11] Adds missing class on proposals show --- app/views/proposals/show.html.erb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/views/proposals/show.html.erb b/app/views/proposals/show.html.erb index f484b9a43..4acabc628 100644 --- a/app/views/proposals/show.html.erb +++ b/app/views/proposals/show.html.erb @@ -206,9 +206,13 @@ <% end %> -
    -
    - <%= render "proposals/filter_subnav" %> +
    +
    +
    +
    + <%= render "proposals/filter_subnav" %> +
    +
    From b7fd0f3ab12dba7a550c12341918aba0f256d2a3 Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 27 Apr 2018 18:16:03 +0200 Subject: [PATCH 06/11] Adds debates_path on back link to on debates new --- app/views/debates/new.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/debates/new.html.erb b/app/views/debates/new.html.erb index 97990048d..54a961d69 100644 --- a/app/views/debates/new.html.erb +++ b/app/views/debates/new.html.erb @@ -1,7 +1,7 @@
    - <%= back_link_to %> + <%= back_link_to debates_path %>

    <%= t("debates.new.start_new") %>

    From cce1c82427f1482929db45332b32ba8c26c6c0ad Mon Sep 17 00:00:00 2001 From: decabeza Date: Mon, 21 May 2018 15:25:37 +0200 Subject: [PATCH 07/11] Prevents hide content on equalizer container --- app/assets/stylesheets/admin.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index ad425258b..351859ae0 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -244,6 +244,7 @@ $sidebar-active: #f4fcd0; } .admin-content { + overflow: scroll; padding: $line-height !important; } From 503a4e0395099d5ada4cef20e2bc2980a239f2de Mon Sep 17 00:00:00 2001 From: decabeza Date: Mon, 21 May 2018 17:07:58 +0200 Subject: [PATCH 08/11] Avoids show duplicated budget investment price --- .../investments/_investment_show.html.erb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/views/budgets/investments/_investment_show.html.erb b/app/views/budgets/investments/_investment_show.html.erb index bf9a5b727..0b0db9fa8 100644 --- a/app/views/budgets/investments/_investment_show.html.erb +++ b/app/views/budgets/investments/_investment_show.html.erb @@ -146,15 +146,15 @@ <%= t("budgets.investments.show.project_not_selected_html") %>
    <% end %> - <% end %> - <% if investment.should_show_price? %> - -

    <%= t("budgets.investments.show.price") %>

    -
    -

    - <%= investment.formatted_price %> -

    -
    + <% if investment.should_show_price? %> + +

    <%= t("budgets.investments.show.price") %>

    +
    +

    + <%= investment.formatted_price %> +

    +
    + <% end %> <% end %> <%= render partial: 'shared/social_share', locals: { share_title: t("budgets.investments.show.share"), From 67713eb9808b48a0c28fae604eb1300cc108500b Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 8 Jun 2018 15:14:50 +0200 Subject: [PATCH 09/11] Fixes accesskey on subnavigation --- app/views/shared/_subnavigation.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/shared/_subnavigation.html.erb b/app/views/shared/_subnavigation.html.erb index 6209fca1e..7a942f13a 100644 --- a/app/views/shared/_subnavigation.html.erb +++ b/app/views/shared/_subnavigation.html.erb @@ -32,7 +32,7 @@ <%= layout_menu_link_to t("layouts.header.collaborative_legislation"), legislation_processes_path, controller.class.parent == Legislation, - accesskey: "l" %> + accesskey: "4" %>
  • <% end %> <% if feature?(:spending_proposals) %> @@ -48,14 +48,14 @@ <%= layout_menu_link_to t("layouts.header.budgets"), budgets_path, controller_name == "budgets" || controller_name == "investments", - accesskey: "4", + accesskey: "5", title: t("shared.go_to_page") + t("layouts.header.budgets") %> <% end %>
  • <%= link_to t("layouts.header.help"), help_path, - accesskey: "5", + accesskey: "6", class: ("is-active" if current_page?(help_path)), title: t("shared.go_to_page") + t("layouts.header.help") %>
  • From 879b63ae5d9eef0caf47bdaddb75552dca0d6296 Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 8 Jun 2018 15:15:08 +0200 Subject: [PATCH 10/11] Fixes indentation on proposals show --- app/views/proposals/show.html.erb | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/app/views/proposals/show.html.erb b/app/views/proposals/show.html.erb index 4acabc628..36e35920c 100644 --- a/app/views/proposals/show.html.erb +++ b/app/views/proposals/show.html.erb @@ -1,18 +1,22 @@ <% provide :title do %><%= @proposal.title %><% end %> <% content_for :meta_description do %><%= @proposal.summary %><% end %> <% provide :social_media_meta_tags do %> -<%= render "shared/social_media_meta_tags", - social_url: proposal_url(@proposal), - social_title: @proposal.title, - social_description: @proposal.summary, - twitter_image_url: (@proposal.image.present? ? @proposal.image_url(:thumb) : nil), - og_image_url: (@proposal.image.present? ? @proposal.image_url(:thumb) : nil) %> + <%= render "shared/social_media_meta_tags", + social_url: proposal_url(@proposal), + social_title: @proposal.title, + social_description: @proposal.summary, + twitter_image_url: (@proposal.image.present? ? @proposal.image_url(:thumb) : nil), + og_image_url: (@proposal.image.present? ? @proposal.image_url(:thumb) : nil) %> <% end %> <% content_for :canonical do %> <%= render "shared/canonical", href: proposal_url(@proposal) %> <% end %> -<% cache [locale_and_user_status(@proposal), @proposal, @proposal.author, Flag.flagged?(current_user, @proposal), @proposal_votes] do %> +<% cache [locale_and_user_status(@proposal), + @proposal, + @proposal.author, + Flag.flagged?(current_user, @proposal), + @proposal_votes] do %>
    @@ -23,7 +27,8 @@
    <%= t("proposals.show.retired_warning") %>
    - <%= link_to t("proposals.show.retired_warning_link_to_explanation"), "#retired_explanation" %> + <%= link_to t("proposals.show.retired_warning_link_to_explanation"), + "#retired_explanation" %>
    <% elsif @proposal.conflictive? %> @@ -101,7 +106,10 @@ <% if @proposal.retired? %>
    -

    <%= t('proposals.show.retired') %>: <%= t("proposals.retire_options.#{@proposal.retired_reason}") unless @proposal.retired_reason == 'other' %>

    +

    + <%= t("proposals.show.retired") %>: + <%= t("proposals.retire_options.#{@proposal.retired_reason}") unless @proposal.retired_reason == 'other' %> +

    <%= simple_format text_with_links(@proposal.retired_explanation), {}, sanitize: false %>
    <% end %> From 28a7c03c2146ce3e0881b7a8695e1fc3f3c3db3c Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 8 Jun 2018 15:15:46 +0200 Subject: [PATCH 11/11] Adds data-tabs on admin poll booth assignments show --- .../poll/booth_assignments/show.html.erb | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/app/views/admin/poll/booth_assignments/show.html.erb b/app/views/admin/poll/booth_assignments/show.html.erb index 07c51fa25..e9dafe8f1 100644 --- a/app/views/admin/poll/booth_assignments/show.html.erb +++ b/app/views/admin/poll/booth_assignments/show.html.erb @@ -12,19 +12,24 @@

    <% end %> -
    -
      -
    • - <%= link_to t("admin.poll_booth_assignments.show.officers"), "#tab-officers" %> -
    • -
    • - <%= link_to t("admin.poll_booth_assignments.show.recounts"), "#tab-recounts" %> -
    • -
    • - <%= link_to t("admin.poll_booth_assignments.show.results"), "#tab-results" %> -
    • -
    +
      +
    • + <%= link_to t("admin.poll_booth_assignments.show.officers"), "#tab-officers" %> +
    • +
    • + <%= link_to t("admin.poll_booth_assignments.show.recounts"), "#tab-recounts" %> +
    • +
    • + <%= link_to t("admin.poll_booth_assignments.show.results"), "#tab-results" %> +
    • +
    +