diff --git a/CHANGELOG.md b/CHANGELOG.md index 81da58f04..912b81334 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,32 +1,51 @@ # Changelog -All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [Unreleased](https://github.com/consul/consul/compare/v0.13...consul:master) +## [Unreleased](https://github.com/consul/consul/compare/v0.14...consul:master) ### Added -- Missing polls button on help page https://github.com/consul/consul/pull/2452 -- New legislation processes section on help page https://github.com/consul/consul/pull/2452 -- Add alert message when a user deletes an investment project from "My activity" https://github.com/consul/consul/pull/2385 -- Admin newsletter emails https://github.com/consul/consul/pull/2462 -- Admin emails list download https://github.com/consul/consul/pull/2466 - ### Changed -- Show investment links only on phase balloting or later https://github.com/consul/consul/pull/2386 -- Improved Document lists https://github.com/consul/consul/pull/2490 - ### Deprecated ### Removed ### Fixed -- Improve spec boot time and clean up logs https://github.com/consul/consul/pull/2444 +### Security + +## [0.14.0](https://github.com/consul/consul/compare/v0.13...v0.14) - 2018-03-08 + +### Added +- Admin newsletter emails https://github.com/consul/consul/pull/2462 +- Admin emails list download https://github.com/consul/consul/pull/2466 +- Alert message when a user deletes an investment project from "My activity" https://github.com/consul/consul/pull/2385 +- Missing polls button on help page https://github.com/consul/consul/pull/2452 +- New legislation processes section on help page https://github.com/consul/consul/pull/2452 +- Docs\(readme\): Include Node.js as requirement https://github.com/consul/consul/pull/2486 + +### Changed +- Improved Document lists https://github.com/consul/consul/pull/2490 +- Valuators cannot reopen finished valuations https://github.com/consul/consul/pull/2518 +- Show investment links only on phase balloting or later https://github.com/consul/consul/pull/2386 +- Improve Github's Pull Request Template file https://github.com/consul/consul/pull/2515 +- List Budget Investment's milestones ordered by publication date https://github.com/consul/consul/issues/2429 +- Admin newsletter email refactor https://github.com/consul/consul/pull/2474 + +### Removed +- Remove empty emails from user segment usages https://github.com/consul/consul/pull/2516 + +### Fixed +- Improve spec boot time and clean up of test logs https://github.com/consul/consul/pull/2444 - Flaky spec: random investments order scenario https://github.com/consul/consul/pull/2454 - Flaky spec: users without email should not receive emails https://github.com/consul/consul/pull/2453 - Flaky spec: missing comment on legislation annotation https://github.com/consul/consul/pull/2455 - Flaky spec: Residence Assigned officers error https://github.com/consul/consul/pull/2458 - -### Security +- Flaky spec fix: Debates Show: "Back" link directs to previous page https://github.com/consul/consul/pull/2513 +- Flaky spec fix: Email Spec comment random failures https://github.com/consul/consul/pull/2506 +- Expire Coveralls badge cache https://github.com/consul/consul/pull/2445 +- Fixed how newsletters controller and mailer handle recipients https://github.com/consul/consul/pull/2492 +- Fix UserSegment feasible and undecided investment authors https://github.com/consul/consul/pull/2491 +- Design minor fixes https://github.com/consul/consul/pull/2465 +- UI fixes https://github.com/consul/consul/pull/2489 ## [0.13.0](https://github.com/consul/consul/compare/v0.12...v0.13) - 2018-02-05 @@ -261,4 +280,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. [0.11.0]: https://github.com/consul/consul/compare/v0.10...v0.11 [0.10.0]: https://github.com/consul/consul/compare/v0.9...v0.10 [0.9.0]: https://github.com/consul/consul/compare/v0.8...v0.9 -[0.8.0]: https://github.com/consul/consul/compare/v0.7...v0.8 +[0.8.0]: https://github.com/consul/consul/compare/v0.7...v0.8 \ No newline at end of file diff --git a/app/assets/javascripts/legislation.js.coffee b/app/assets/javascripts/legislation.js.coffee index 303d4c98e..9cf27055a 100644 --- a/app/assets/javascripts/legislation.js.coffee +++ b/app/assets/javascripts/legislation.js.coffee @@ -1,10 +1,6 @@ App.Legislation = initialize: -> - $('#js-toggle-small-debate').on - click: -> - $(this).find($('span')).toggleClass('icon-angle-up') - $('form#new_legislation_answer input.button').hide() $('form#new_legislation_answer input[type=radio]').on click: -> diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3191a2ab9..486759e03 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -57,10 +57,6 @@ module ApplicationHelper SiteCustomization::ContentBlock.block_for(name, locale) end - def format_price(number) - number_to_currency(number, precision: 0, locale: I18n.default_locale) - end - def kaminari_path(url) "#{root_url.chomp("\/")}#{url}" end diff --git a/app/helpers/budget_headings_helper.rb b/app/helpers/budget_headings_helper.rb index 3fa1eac89..22eabfe11 100644 --- a/app/helpers/budget_headings_helper.rb +++ b/app/helpers/budget_headings_helper.rb @@ -6,4 +6,10 @@ module BudgetHeadingsHelper end end + def heading_link(assigned_heading = nil, budget = nil) + return nil unless assigned_heading && budget + heading_path = budget_investments_path(budget, heading_id: assigned_heading.try(:id)) + link_to(assigned_heading.name, heading_path) + end + end diff --git a/app/models/budget.rb b/app/models/budget.rb index 9b55dc4a6..6c80e7f1f 100644 --- a/app/models/budget.rb +++ b/app/models/budget.rb @@ -124,7 +124,7 @@ class Budget < ActiveRecord::Base def formatted_amount(amount) ActionController::Base.helpers.number_to_currency(amount, precision: 0, - locale: I18n.default_locale, + locale: I18n.locale, unit: currency_symbol) end diff --git a/app/models/budget/investment.rb b/app/models/budget/investment.rb index c5d4d775d..dff2dd2e0 100644 --- a/app/models/budget/investment.rb +++ b/app/models/budget/investment.rb @@ -208,11 +208,11 @@ class Budget end def reason_for_not_being_ballotable_by(user, ballot) - return permission_problem(user) if permission_problem?(user) - return :not_selected unless selected? - return :no_ballots_allowed unless budget.balloting? - return :different_heading_assigned unless ballot.valid_heading?(heading) - return :not_enough_money_html if ballot.present? && !enough_money?(ballot) + return permission_problem(user) if permission_problem?(user) + return :not_selected unless selected? + return :no_ballots_allowed unless budget.balloting? + return :different_heading_assigned_html unless ballot.valid_heading?(heading) + return :not_enough_money_html if ballot.present? && !enough_money?(ballot) end def permission_problem(user) diff --git a/app/views/budgets/investments/_ballot.html.erb b/app/views/budgets/investments/_ballot.html.erb index 605caebc7..c12103a0a 100644 --- a/app/views/budgets/investments/_ballot.html.erb +++ b/app/views/budgets/investments/_ballot.html.erb @@ -42,17 +42,25 @@ <% if reason.present? && !ballot.has_investment?(investment) %> -