From 6562adf09a6477d727e76e61102bdb0f64e6aa2b Mon Sep 17 00:00:00 2001 From: rgarcia Date: Wed, 12 Jul 2017 13:14:15 +0200 Subject: [PATCH 01/16] Adds custom budget heading result's path --- app/views/budgets/results/show.html.erb | 2 +- config/routes.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/budgets/results/show.html.erb b/app/views/budgets/results/show.html.erb index db1f192d6fc..344acc96deb 100644 --- a/app/views/budgets/results/show.html.erb +++ b/app/views/budgets/results/show.html.erb @@ -43,7 +43,7 @@ <% active_class = heading.to_param == params[:heading_id] ? 'bold' : '' %>
  • <%= link_to heading.name, - custom_budget_results_path(@budget, heading_id: heading.to_param) %> + custom_budget_heading_result_path(@budget, heading_id: heading.to_param) %>
  • <% end %> diff --git a/config/routes.rb b/config/routes.rb index ce7f934ba1b..c28cd2d9c91 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -81,6 +81,7 @@ get 'presupuestos', to: 'pages#show', id: 'more_info/budgets/welcome', as: 'budgets_welcome' get "presupuestos/:id/estadisticas", to: "budgets/stats#show", as: 'custom_budget_stats' get "presupuestos/:id/resultados", to: "budgets/results#show", as: 'custom_budget_results' + get "presupuestos/:id/resultados/:heading_id", to: "budgets/results#show", as: 'custom_budget_heading_result' resources :budgets, only: [:show, :index], path: 'presupuestos' do resources :groups, controller: "budgets/groups", only: [:show], path: 'grupo' From f6674d4b58f58a115ef8dcef4c8470946cd4933d Mon Sep 17 00:00:00 2001 From: rgarcia Date: Wed, 12 Jul 2017 13:15:36 +0200 Subject: [PATCH 02/16] marks first heading as selected Even if there is no heading_id param --- app/views/budgets/results/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/budgets/results/show.html.erb b/app/views/budgets/results/show.html.erb index 344acc96deb..d750a73da5c 100644 --- a/app/views/budgets/results/show.html.erb +++ b/app/views/budgets/results/show.html.erb @@ -40,7 +40,7 @@ <% @budget.headings.order('id ASC').each do |heading| %> - <% active_class = heading.to_param == params[:heading_id] ? 'bold' : '' %> + <% active_class = heading.to_param == @heading.to_param ? 'bold' : '' %>
  • <%= link_to heading.name, custom_budget_heading_result_path(@budget, heading_id: heading.to_param) %> From e1d7fa86331878c62b5201dd92dca9b90979eda0 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 12 Jul 2017 13:30:59 +0200 Subject: [PATCH 03/16] Use new custom budget heading result path --- app/views/budgets/results/show.html.erb | 2 +- app/views/budgets/show.html.erb | 2 +- app/views/budgets/stats/show.html.erb | 2 +- spec/features/budgets/results_spec.rb | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/budgets/results/show.html.erb b/app/views/budgets/results/show.html.erb index d750a73da5c..8d60b40798a 100644 --- a/app/views/budgets/results/show.html.erb +++ b/app/views/budgets/results/show.html.erb @@ -21,7 +21,7 @@
    • <%= t("shared.you_are_in") %> - <%= link_to t("budgets.results.link"), custom_budget_results_path(@budget, heading_id: @budget.headings.first.to_param), class: "is-active" %> + <%= link_to t("budgets.results.link"), custom_budget_heading_result_path(@budget, heading_id: @budget.headings.first.to_param), class: "is-active" %>
    • <%= link_to t("budgets.stats.link"), custom_budget_stats_path(@budget)%> diff --git a/app/views/budgets/show.html.erb b/app/views/budgets/show.html.erb index 5118fab005e..d6103326f10 100644 --- a/app/views/budgets/show.html.erb +++ b/app/views/budgets/show.html.erb @@ -43,7 +43,7 @@ <% if @budget.finished? %> <%= link_to t("budgets.show.see_results"), - custom_budget_results_path(@budget, heading_id: @budget.headings.first), + custom_budget_heading_result_path(@budget, heading_id: @budget.headings.first), class: "button margin-top expanded" %> <% end %> diff --git a/app/views/budgets/stats/show.html.erb b/app/views/budgets/stats/show.html.erb index 5eb76e547b0..9c149d98db4 100644 --- a/app/views/budgets/stats/show.html.erb +++ b/app/views/budgets/stats/show.html.erb @@ -25,7 +25,7 @@ <% if @budget.finished? %>
    • <%= t("shared.you_are_in") %> - <%= link_to t("budgets.results.link"), custom_budget_results_path(@budget, heading_id: @budget.headings.first.to_param) %> + <%= link_to t("budgets.results.link"), custom_budget_heading_result_path(@budget, heading_id: @budget.headings.first.to_param) %>
    • <% end %>
    • diff --git a/spec/features/budgets/results_spec.rb b/spec/features/budgets/results_spec.rb index fac302855ff..c31a797f57b 100644 --- a/spec/features/budgets/results_spec.rb +++ b/spec/features/budgets/results_spec.rb @@ -50,7 +50,7 @@ other_heading = create(:budget_heading, group: group) other_investment = create(:budget_investment, :winner, heading: other_heading) - visit custom_budget_results_path(budget) + visit custom_budget_heading_result_path(budget) within("#budget-investments-compatible") do expect(page).to have_content investment1.title @@ -63,7 +63,7 @@ visit budget_path(budget) expect(page).not_to have_link "See results" - visit custom_budget_results_path(budget, heading_id: budget.headings.first) + visit custom_budget_heading_result_path(budget, heading_id: budget.headings.first) expect(page).to have_content "You do not have permission to carry out the action" end From 1382b475a8dee3f270754772c085bcd8a5bc48fd Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 12 Jul 2017 13:36:02 +0200 Subject: [PATCH 04/16] Link to custom /resultados without heading unless its on the results menu --- app/views/budgets/results/show.html.erb | 2 +- app/views/budgets/show.html.erb | 2 +- app/views/budgets/stats/show.html.erb | 2 +- spec/features/budgets/results_spec.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/budgets/results/show.html.erb b/app/views/budgets/results/show.html.erb index 8d60b40798a..f69483824d6 100644 --- a/app/views/budgets/results/show.html.erb +++ b/app/views/budgets/results/show.html.erb @@ -21,7 +21,7 @@
      • <%= t("shared.you_are_in") %> - <%= link_to t("budgets.results.link"), custom_budget_heading_result_path(@budget, heading_id: @budget.headings.first.to_param), class: "is-active" %> + <%= link_to t("budgets.results.link"), custom_budget_results_path(@budget), class: "is-active" %>
      • <%= link_to t("budgets.stats.link"), custom_budget_stats_path(@budget)%> diff --git a/app/views/budgets/show.html.erb b/app/views/budgets/show.html.erb index d6103326f10..ca8cf016675 100644 --- a/app/views/budgets/show.html.erb +++ b/app/views/budgets/show.html.erb @@ -43,7 +43,7 @@ <% if @budget.finished? %> <%= link_to t("budgets.show.see_results"), - custom_budget_heading_result_path(@budget, heading_id: @budget.headings.first), + custom_budget_results_path(@budget), class: "button margin-top expanded" %> <% end %> diff --git a/app/views/budgets/stats/show.html.erb b/app/views/budgets/stats/show.html.erb index 9c149d98db4..2e9764e13c0 100644 --- a/app/views/budgets/stats/show.html.erb +++ b/app/views/budgets/stats/show.html.erb @@ -25,7 +25,7 @@ <% if @budget.finished? %>
      • <%= t("shared.you_are_in") %> - <%= link_to t("budgets.results.link"), custom_budget_heading_result_path(@budget, heading_id: @budget.headings.first.to_param) %> + <%= link_to t("budgets.results.link"), custom_budget_results_path(@budget) %>
      • <% end %>
      • diff --git a/spec/features/budgets/results_spec.rb b/spec/features/budgets/results_spec.rb index c31a797f57b..af61e37cd2a 100644 --- a/spec/features/budgets/results_spec.rb +++ b/spec/features/budgets/results_spec.rb @@ -50,7 +50,7 @@ other_heading = create(:budget_heading, group: group) other_investment = create(:budget_investment, :winner, heading: other_heading) - visit custom_budget_heading_result_path(budget) + visit custom_budget_results_path(budget) within("#budget-investments-compatible") do expect(page).to have_content investment1.title From 293209dfaea198ef0aaa99e1c67fd53e38f8549f Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 12 Jul 2017 15:49:57 +0200 Subject: [PATCH 05/16] Correct view results button on budgets finished header --- .../pages/more_info/budgets/_welcome_header_finished.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/pages/more_info/budgets/_welcome_header_finished.html.erb b/app/views/pages/more_info/budgets/_welcome_header_finished.html.erb index d91bd0d3ef1..1c026577a28 100644 --- a/app/views/pages/more_info/budgets/_welcome_header_finished.html.erb +++ b/app/views/pages/more_info/budgets/_welcome_header_finished.html.erb @@ -11,8 +11,8 @@
        - <%= link_to "Ver proyectos", - "budgets_results_path", + <%= link_to t("budgets.show.see_results"), + custom_budget_results_path(Budget.finished.first), class: "button expanded large city" %>
        From c0878e82d448705392cb994ae9a6d8e25f3fdffe Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 12 Jul 2017 16:11:22 +0200 Subject: [PATCH 06/16] Use same header for budget results and stats pages --- app/views/budgets/results/show.html.erb | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/app/views/budgets/results/show.html.erb b/app/views/budgets/results/show.html.erb index f69483824d6..16cd8732100 100644 --- a/app/views/budgets/results/show.html.erb +++ b/app/views/budgets/results/show.html.erb @@ -3,15 +3,13 @@ <%= render "shared/canonical", href: budget_results_url(@budget, heading_id: @heading) %> <% end %> -
        -
        -
        - <%= back_link_to budget_path(@budget) %> - -

        - <%= @budget.name %>
        - <%= t("budgets.results.heading") %> -

        +
        +
        +
        +
        + <%= back_link_to budget_path(@budget) %> +

        <%= t("budgets.results.heading") %>
        <%= @budget.name %>

        +
        From ded7153a096c1b2b1bd16dceed377df9d55fdd21 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 12 Jul 2017 16:17:55 +0200 Subject: [PATCH 07/16] Show proposal stats file instead of stats --- .../pages/more_info/budgets/_welcome_header_finished.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/pages/more_info/budgets/_welcome_header_finished.html.erb b/app/views/pages/more_info/budgets/_welcome_header_finished.html.erb index 1c026577a28..52f155d8479 100644 --- a/app/views/pages/more_info/budgets/_welcome_header_finished.html.erb +++ b/app/views/pages/more_info/budgets/_welcome_header_finished.html.erb @@ -16,8 +16,8 @@ class: "button expanded large city" %>
        - <%= link_to "Ver estadísticas de participación", - custom_budget_stats_path(id: Budget.last.to_param), + <%= link_to "Ejecución de proyectos 2016", + "/system/budgets/2016/estado-propuestas-2016.xlsx", class: "button expanded large stats" %>
        From 3008c2d5b5717d67ac17de14fb6fcf4c1f7d005d Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 12 Jul 2017 16:47:29 +0200 Subject: [PATCH 08/16] Finished budget welcome page links to results --- app/views/welcome/_budgets_module_finished.html.erb | 6 ++++-- config/locales/custom/es/custom.yml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/welcome/_budgets_module_finished.html.erb b/app/views/welcome/_budgets_module_finished.html.erb index 1a03585f13b..7a7ef689794 100644 --- a/app/views/welcome/_budgets_module_finished.html.erb +++ b/app/views/welcome/_budgets_module_finished.html.erb @@ -7,8 +7,10 @@

        <%= t("welcome.budgets.title_finished_html") %>

        <%= t("welcome.budgets.text_finished_html") %>

        -
        - <%= link_to t("welcome.budgets.button_finished"), budgets_welcome_path, class: "button expanded large" %> +
        +
        + <%= link_to t("welcome.budgets.button_finished"), custom_budget_results_path(Budget.last.to_param), class: "button expanded large" %> +
        diff --git a/config/locales/custom/es/custom.yml b/config/locales/custom/es/custom.yml index 0a636c33f1f..cc46f28c2e7 100644 --- a/config/locales/custom/es/custom.yml +++ b/config/locales/custom/es/custom.yml @@ -147,7 +147,7 @@ es: title_finished_html: "Conoce los proyectos ganadores de los presupuestos participativos" text_finished_html: "Estos son los proyectos ciudadanos que se financiarán con 100 millones de euros del presupuesto municipal en 2018." label_finished: "La ciudadanía madrileña ha decidido" - button_finished: "Ver proyectos" + button_finished: "Ver Resultados" stats: label: "Estadísticas" title: "Datos de la votación de presupuestos" From b0b361064e79036ac5043efe425ab13dd92c9abd Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 12 Jul 2017 17:04:36 +0200 Subject: [PATCH 09/16] Make current heading blue on results sidebar menu --- app/assets/stylesheets/layout.scss | 10 +++++----- app/views/budgets/results/show.html.erb | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index d0654fa6a05..8bd9000c258 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -230,6 +230,11 @@ a { a { color: $text-medium; padding: 0; + + &.bold { + font-weight: bold; + color: $brand; + } } h2 { @@ -240,11 +245,6 @@ a { border-bottom: 2px solid $brand; color: $brand; } - - &.bold { - font-weight: bold; - color: $brand; - } } &.no-margin-top { diff --git a/app/views/budgets/results/show.html.erb b/app/views/budgets/results/show.html.erb index 16cd8732100..4e5d8c82bef 100644 --- a/app/views/budgets/results/show.html.erb +++ b/app/views/budgets/results/show.html.erb @@ -38,10 +38,10 @@
      • <% @budget.headings.order('id ASC').each do |heading| %> - <% active_class = heading.to_param == @heading.to_param ? 'bold' : '' %> -
      • +
      • <%= link_to heading.name, - custom_budget_heading_result_path(@budget, heading_id: heading.to_param) %> + custom_budget_heading_result_path(@budget, heading_id: heading.to_param), + class: heading.to_param == @heading.to_param ? 'bold' : '' %>
      • <% end %>
      From 0807c777df6cb62780e540640869cba87251c1cf Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 12 Jul 2017 18:11:20 +0200 Subject: [PATCH 10/16] Only show welcome budget partials if budget under conditions exist --- app/views/pages/more_info/budgets/welcome.html.erb | 2 +- app/views/welcome/_budgets_module_finished.html.erb | 2 +- app/views/welcome/_budgets_module_reviewing.html.erb | 2 +- app/views/welcome/index.html.erb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/pages/more_info/budgets/welcome.html.erb b/app/views/pages/more_info/budgets/welcome.html.erb index ced1250d923..232a5a00920 100644 --- a/app/views/pages/more_info/budgets/welcome.html.erb +++ b/app/views/pages/more_info/budgets/welcome.html.erb @@ -20,7 +20,7 @@ <%= render "pages/more_info/budgets/welcome_header_balloting" %> <% elsif Budget.reviewing_ballots.any? %> <%= render "pages/more_info/budgets/welcome_header_reviewing" %> - <% else %> + <% elsif Budget.finished.any? %> <%= render "pages/more_info/budgets/welcome_header_finished" %> <% end %> diff --git a/app/views/welcome/_budgets_module_finished.html.erb b/app/views/welcome/_budgets_module_finished.html.erb index 7a7ef689794..2bd25daf2fb 100644 --- a/app/views/welcome/_budgets_module_finished.html.erb +++ b/app/views/welcome/_budgets_module_finished.html.erb @@ -9,7 +9,7 @@

      <%= t("welcome.budgets.text_finished_html") %>

      - <%= link_to t("welcome.budgets.button_finished"), custom_budget_results_path(Budget.last.to_param), class: "button expanded large" %> + <%= link_to t("welcome.budgets.button_finished"), custom_budget_results_path(Budget.finished.last.to_param), class: "button expanded large" %>
      diff --git a/app/views/welcome/_budgets_module_reviewing.html.erb b/app/views/welcome/_budgets_module_reviewing.html.erb index 29bfbde5f3f..64c83ba50d4 100644 --- a/app/views/welcome/_budgets_module_reviewing.html.erb +++ b/app/views/welcome/_budgets_module_reviewing.html.erb @@ -9,7 +9,7 @@

      <%= t("welcome.budgets.text_reviewing_html") %>

      - <%= link_to t("welcome.budgets.button_stats"), custom_budget_stats_path(id: Budget.last.to_param), class: "button expanded large" %> + <%= link_to t("welcome.budgets.button_stats"), custom_budget_stats_path(id: Budget.reviewing_ballots.last.to_param), class: "button expanded large" %>
      <%= link_to t("welcome.budgets.button_reviewing"), budgets_welcome_path, class: "button expanded large" %> diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 8e5c2bde3c3..68f16804850 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -15,7 +15,7 @@ <%= render "budgets_module_balloting" %> <% elsif Budget.reviewing_ballots.any? %> <%= render "budgets_module_reviewing" %> - <% else %> + <% elsif Budget.finished.any? %> <%= render "budgets_module_finished" %> <% end %>
      From 0edfcbfaccc719971a3aa835b40c4e3f06ddf46d Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 12 Jul 2017 18:51:58 +0200 Subject: [PATCH 11/16] Reload user before login to avoid flaky budget evaluation test --- spec/features/admin/budget_investments_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/features/admin/budget_investments_spec.rb b/spec/features/admin/budget_investments_spec.rb index 7cb457f88fd..be20884b569 100644 --- a/spec/features/admin/budget_investments_spec.rb +++ b/spec/features/admin/budget_investments_spec.rb @@ -685,7 +685,7 @@ check "budget_investment_visible_to_valuators" end - login_as(valuator.user) + login_as(valuator.user.reload) visit root_path click_link "Valuation" @@ -697,7 +697,7 @@ expect(page).to_not have_content investment2.title end - scenario "Unmark as visible to valuator", :js do + scenario "Unmark as visible to valuator", :js, do Setting['feature.budgets.valuators_allowed'] = true valuator = create(:valuator) @@ -715,7 +715,7 @@ uncheck "budget_investment_visible_to_valuators" end - login_as(valuator.user) + login_as(valuator.user.reload) visit root_path click_link "Valuation" @@ -723,7 +723,7 @@ click_link "Evaluate" end - expect(page).to_not have_content investment1.title + expect(page).not_to have_content investment1.title expect(page).to have_content investment2.title end From 28a0094feb0582fb680c99929e5ee1c28b7f9ad4 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 12 Jul 2017 18:51:58 +0200 Subject: [PATCH 12/16] Reload user before login to avoid flaky budget evaluation test --- spec/features/admin/budget_investments_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/features/admin/budget_investments_spec.rb b/spec/features/admin/budget_investments_spec.rb index 7cb457f88fd..92b2e2f964c 100644 --- a/spec/features/admin/budget_investments_spec.rb +++ b/spec/features/admin/budget_investments_spec.rb @@ -685,7 +685,7 @@ check "budget_investment_visible_to_valuators" end - login_as(valuator.user) + login_as(valuator.user.reload) visit root_path click_link "Valuation" @@ -715,7 +715,7 @@ uncheck "budget_investment_visible_to_valuators" end - login_as(valuator.user) + login_as(valuator.user.reload) visit root_path click_link "Valuation" @@ -723,7 +723,7 @@ click_link "Evaluate" end - expect(page).to_not have_content investment1.title + expect(page).not_to have_content investment1.title expect(page).to have_content investment2.title end From 835218b73cb45be207462478a8fb877cac44d9b7 Mon Sep 17 00:00:00 2001 From: decabeza Date: Wed, 12 Jul 2017 20:26:44 +0200 Subject: [PATCH 13/16] improves text and button on welcome index --- app/views/welcome/_budgets_module_finished.html.erb | 8 +++----- app/views/welcome/index.html.erb | 2 +- config/locales/custom/en/custom.yml | 2 +- config/locales/custom/es/custom.yml | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/views/welcome/_budgets_module_finished.html.erb b/app/views/welcome/_budgets_module_finished.html.erb index 2bd25daf2fb..80bfc69bd57 100644 --- a/app/views/welcome/_budgets_module_finished.html.erb +++ b/app/views/welcome/_budgets_module_finished.html.erb @@ -6,11 +6,9 @@

      <%= t("welcome.budgets.title_finished_html") %>

      -

      <%= t("welcome.budgets.text_finished_html") %>

      -
      -
      - <%= link_to t("welcome.budgets.button_finished"), custom_budget_results_path(Budget.finished.last.to_param), class: "button expanded large" %> -
      +

      <%= t("welcome.budgets.text_finished_html") %>

      +
      + <%= link_to t("welcome.budgets.button_finished"), custom_budget_results_path(Budget.finished.last.to_param), class: "button expanded large" %>
      diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 68f16804850..e4eef4ec085 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -5,7 +5,7 @@ <%= render "shared/canonical", href: root_url %> <% end %> -<% cache ["welcome_index_20170630", user_signed_in?] do %> +<% cache ["welcome_index_20170712", user_signed_in?] do %>

      <%= t("welcome.title") %>

      diff --git a/config/locales/custom/en/custom.yml b/config/locales/custom/en/custom.yml index 6baedf60deb..242bfc38871 100644 --- a/config/locales/custom/en/custom.yml +++ b/config/locales/custom/en/custom.yml @@ -145,7 +145,7 @@ en: button_reviewing: "See projects" button_stats: "See statistics" title_finished_html: "Know the winning projects of the participatory budgets" - text_finished_html: "These are the citizen projects that will be financed with 100 million euros of the municipal budget in 2018" + text_finished_html: "These are the citizen projects that will be financed with
      100 million euros of the municipal budget in 2018" label_finished: "The citizens of Madrid have decided" button_finished: "See projects" stats: diff --git a/config/locales/custom/es/custom.yml b/config/locales/custom/es/custom.yml index cc46f28c2e7..70c83e5ebf9 100644 --- a/config/locales/custom/es/custom.yml +++ b/config/locales/custom/es/custom.yml @@ -145,7 +145,7 @@ es: button_reviewing: "Ver proyectos" button_stats: "Ver estadísticas" title_finished_html: "Conoce los proyectos ganadores de los presupuestos participativos" - text_finished_html: "Estos son los proyectos ciudadanos que se financiarán con 100 millones de euros del presupuesto municipal en 2018." + text_finished_html: "Estos son los proyectos ciudadanos que se financiarán con
      100 millones de euros del presupuesto municipal en 2018." label_finished: "La ciudadanía madrileña ha decidido" button_finished: "Ver Resultados" stats: From c5229abc6c3ca73190b36858587c35bb08d43274 Mon Sep 17 00:00:00 2001 From: decabeza Date: Wed, 12 Jul 2017 20:27:04 +0200 Subject: [PATCH 14/16] changes budget welcome header text --- .../pages/more_info/budgets/_welcome_header_finished.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/pages/more_info/budgets/_welcome_header_finished.html.erb b/app/views/pages/more_info/budgets/_welcome_header_finished.html.erb index 52f155d8479..4abdee40ba4 100644 --- a/app/views/pages/more_info/budgets/_welcome_header_finished.html.erb +++ b/app/views/pages/more_info/budgets/_welcome_header_finished.html.erb @@ -4,7 +4,7 @@

      Resultados
      Presupuestos participativos 2017

      - Mira qué proyectos ciudadanos se ejecutarán a partir de 2018 con los 100 millones de los presupuestos participativos. + Mira qué proyectos ciudadanos se ejecutarán a partir de 2018 con los 100 millones de euros de los presupuestos participativos.

      From d02a3fe998b78e2f61926036822dfa32c81c4b91 Mon Sep 17 00:00:00 2001 From: decabeza Date: Wed, 12 Jul 2017 20:27:55 +0200 Subject: [PATCH 15/16] improves results table layout --- app/assets/stylesheets/custom.scss | 7 ++++++ .../budgets/results/_results_table.html.erb | 8 +++---- app/views/budgets/results/show.html.erb | 24 +++++++++---------- config/locales/en/budgets.yml | 2 +- config/locales/es/budgets.yml | 2 +- 5 files changed, 25 insertions(+), 18 deletions(-) diff --git a/app/assets/stylesheets/custom.scss b/app/assets/stylesheets/custom.scss index c86548e0e9a..224fd8ab486 100644 --- a/app/assets/stylesheets/custom.scss +++ b/app/assets/stylesheets/custom.scss @@ -2832,6 +2832,13 @@ h2.map-title { } } +.min-width-100 { + + @include breakpoint(medium) { + min-width: rem-calc(100); + } +} + // 12. Nvotes // - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/views/budgets/results/_results_table.html.erb b/app/views/budgets/results/_results_table.html.erb index f391e8d5041..38daa305da8 100644 --- a/app/views/budgets/results/_results_table.html.erb +++ b/app/views/budgets/results/_results_table.html.erb @@ -1,4 +1,4 @@ -
      @@ -15,13 +15,13 @@ <%= t("budgets.results.ballot_lines_count") %> - + <%= t("budgets.results.price") %> <% if results_type == :compatible %> - <%= format_price(heading_price) %>
      - <%= t("budgets.results.amount_available") %> + <%= t("budgets.results.amount_available") %>
      + <%= format_price(heading_price) %> <% end %> diff --git a/app/views/budgets/results/show.html.erb b/app/views/budgets/results/show.html.erb index 4e5d8c82bef..ab86c9e04ac 100644 --- a/app/views/budgets/results/show.html.erb +++ b/app/views/budgets/results/show.html.erb @@ -29,22 +29,22 @@
      -
      - +
      <%= link_to t("budgets.results.show_all_link"), "#", class: "js-toggle-link button hollow margin-bottom", data: {'toggle-selector' => '.js-discarded', 'toggle-text' => t("budgets.results.hide_discarded_link")} %> diff --git a/config/locales/en/budgets.yml b/config/locales/en/budgets.yml index 099fff6b3bf..51457862f4a 100644 --- a/config/locales/en/budgets.yml +++ b/config/locales/en/budgets.yml @@ -129,7 +129,7 @@ en: results: link: Results page_title: "%{budget} - Results" - heading: "Participatory budget results" + heading: "Results" heading_selection_title: "By district" spending_proposal: Proposal title ballot_lines_count: Times selected diff --git a/config/locales/es/budgets.yml b/config/locales/es/budgets.yml index fd5d07689c1..d80ec2db98f 100644 --- a/config/locales/es/budgets.yml +++ b/config/locales/es/budgets.yml @@ -129,7 +129,7 @@ es: results: link: Resultados page_title: "%{budget} - Resultados" - heading: "Resultados presupuestos participativos" + heading: "Resultados" heading_selection_title: "Ámbito de actuación" spending_proposal: Título ballot_lines_count: Votos From c27dd5dfe81e2eb31f7f60496401553df2790e9d Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 12 Jul 2017 20:30:30 +0200 Subject: [PATCH 16/16] Remove extra , typo --- spec/features/admin/budget_investments_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/features/admin/budget_investments_spec.rb b/spec/features/admin/budget_investments_spec.rb index be20884b569..92b2e2f964c 100644 --- a/spec/features/admin/budget_investments_spec.rb +++ b/spec/features/admin/budget_investments_spec.rb @@ -697,7 +697,7 @@ expect(page).to_not have_content investment2.title end - scenario "Unmark as visible to valuator", :js, do + scenario "Unmark as visible to valuator", :js do Setting['feature.budgets.valuators_allowed'] = true valuator = create(:valuator)