Commit Graph

8880 Commits

Author SHA1 Message Date
Bertocq
8fd6f8f1d6 Valuators access to edit/valute on right phase
When a valuator tries to edit/valuate an investment outside valuating
phase, an explanatory message will be shown along with a redirect to
prevent access.
2018-03-12 20:22:53 +01:00
Bertocq
5f5e9c4f26 Fix phone note english translation 2018-03-10 10:11:49 +01:00
Raimond Garcia
182a6fd619 Merge pull request #2532 from consul/release_v014
Release v0.14
2018-03-09 16:30:02 +01:00
rgarcia
41067b02c0 Update consul.json to v0.14 2018-03-09 16:27:12 +01:00
rgarcia
f6cafeb21d Update CHANGELOG v0.14 2018-03-09 16:27:00 +01:00
rgarcia
70bb796348 Revert CHANGELOG release 0.14
Adding changes to a separate PR
2018-03-09 14:28:41 +01:00
Alberto Calderón Queimadelos
a8e9da8e1c Merge pull request #2406 from consul/totally_remove_investment_interal_comment
Totally remove investment's internal_comments
2018-03-09 13:37:50 +01:00
Alberto García
9aac19bd9e Merge pull request #2527 from consul/legislation-proposals
Cleans legislation proposals
2018-03-09 13:32:17 +01:00
Alberto García
527e680461 Merge branch 'master' into legislation-proposals 2018-03-09 13:32:03 +01:00
Alberto García
eba4a3c6cb Merge pull request #2528 from consul/budgets-message
Heading link on budgets message
2018-03-09 13:25:39 +01:00
Bertocq
04316a4460 Remove internal_comments usage in migration script
Internal comments on migration script from SpendingProposal to
Investments are no longer in use, so removal is best option.
2018-03-09 12:27:04 +01:00
Bertocq
a360cf4fbc Remove deprecated internal_comments column from Investments 2018-03-09 11:45:15 +01:00
Bertocq
6d55a0712d Remove no longer usable investments rake task 2018-03-09 11:44:51 +01:00
Alberto Calderón Queimadelos
a55218ad9f Merge pull request #2443 from consul/fix_currency_locale
Use user locale instead of default locale to format currencies
2018-03-08 18:03:52 +01:00
Alberto García
8c6c567c76 Merge pull request #2525 from consul/social-share
Fixes social share buttons
2018-03-08 17:46:24 +01:00
Alberto Calderón Queimadelos
0e1d5d95a7 Revert "Make config.time_zone configurable at secrets.yml" 2018-03-08 17:12:00 +01:00
Alberto Calderón Queimadelos
496d88b655 Merge pull request #2468 from consul/make_timezone_configurable
Make config.time_zone configurable at secrets.yml
2018-03-08 16:33:56 +01:00
rgarcia
3016df00a7 Update CHANGELOG Unreleased section 2018-03-08 16:27:50 +01:00
rgarcia
445808201c Update CHANGELOG v0.14 2018-03-08 16:11:06 +01:00
Bertocq
d3a572e542 Avoid explicity ID values on fixtures if possible
The specs don't care about the actual ID value, only about using the
same value. Fixed ID values cause flaky specs and high maintenance issues
2018-03-08 14:48:07 +01:00
Bertocq
6e843730b0 Replace format_price for Budget#formatted_amount
ApplicationHelper#format_price and Budget#formatted_amount has the same
objective and code, but the Budget#formatted_amount method also uses the
currency of the Budget to correctly give currencies format.

By replacing usage of format_price with formatted_amount we can remove
format_price and have a single location for currency format logic.
2018-03-08 13:26:36 +01:00
decabeza
0bc0a2b1e8 Makes smaller text on participation not allowed div 2018-03-08 11:50:30 +01:00
decabeza
d70c46e578 Extract BudgetHeadingsHelper#heading_link & use it
Why:

The logic to construct the link to a heading (if it exists) is in three
different places, this is a clear candidate for a helper method.

How:

Just checking at the helper method if `assigned_heading` and `budget`
has values and composing the link if so.
2018-03-08 11:50:23 +01:00
decabeza
0e9190bc43 Adds heading link on different heading message 2018-03-08 11:50:09 +01:00
Bertocq
f0dc2a02a5 Add Budget#formatted_amount unit test 2018-03-08 11:42:22 +01:00
decabeza
48c7fb5fc2 Adds legislation processes styles 2018-03-08 11:34:33 +01:00
decabeza
ef53cd0f15 Clean css and views of custom content 2018-03-08 11:30:46 +01:00
Alberto Calderón Queimadelos
5745c4dda7 Merge pull request #2518 from consul/valuator_cannot_reopen_valuations
Valuators cannot reopen finished valuations
2018-03-08 10:49:26 +01:00
Bertocq
b72e43168b Use user locale instead of default locale to format currencies 2018-03-08 10:20:05 +01:00
decabeza
d4b88f1fae Adds description for social share buttons 2018-03-07 17:24:30 +01:00
decabeza
e0480675ed Replaces hardcoded social share buttons tag with correct partial 2018-03-07 17:21:59 +01:00
decabeza
1ab4458785 Adds description to legislation process share buttons 2018-03-07 17:19:01 +01:00
decabeza
f2e5f6ff76 Adds specs for additional info button 2018-03-07 17:18:55 +01:00
decabeza
ee7ca37d18 Removes unused css 2018-03-07 17:18:27 +01:00
decabeza
d679c1eb79 Removes sandbox folder 2018-03-07 17:18:10 +01:00
decabeza
9186a825a7 Uses rem-calc function instead of explicit units 2018-03-07 17:17:24 +01:00
decabeza
ca0d134c0b Removes unused css 2018-03-07 17:17:17 +01:00
decabeza
4b381eef9b Removes unused js 2018-03-07 17:17:04 +01:00
decabeza
995449d733 Adds share buttons and refactors processes header 2018-03-07 17:16:54 +01:00
decabeza
5b1ac0a6ce Adds correct url on budget investment twitter share 2018-03-07 17:16:43 +01:00
Bertocq
0516bc3e91 Prevent valuators from editing finished valuation
Valuators should not be able to edit a finished valuation (only admins
should).

The valuation form is only shown to the valuator if he has that ability
(we've previously modified app/models/abilities/valuator.rb to be able
to rely on `valuate` over an investment to check that)

If the valuator can't see the form, we present him just the data in
plain text.
2018-03-06 20:18:05 +01:00
Bertocq
1ef2789640 Trim valuator investment valuation ability scope
Valuators shouldn't be able to valuate an investment which valuation has
already been finished (only admins can)
2018-03-06 20:18:05 +01:00
Bertocq
a92ef57bf8 Make valuator spec 100 LineLength compliant
Readability of the code is important
2018-03-06 20:17:40 +01:00
Bertocq
7145ce5e5a Refactor Valuator spec Show context with lets
Extract duplicated code used to set the scenario conditions to simple
lets (admin, second valuator and investment)
2018-03-06 20:17:39 +01:00
Bertocq
400b3b1201 Swap @investment instance variable for a let
Why:

Avoid instance variables as we agreed upon with RSpec/InstanceVariable

How:

Using a let(:invsetment) and replacing all `@investment` with
`investment`, as well as adding a let(:admin) for the administrator.
2018-03-06 20:17:39 +01:00
Bertocq
9abf9bd87d Swap @budget instance variable for a let
Why:

Avoid instance variables as we agreed upon with RSpec/InstanceVariable

How:

Using a let(:budget) and replacing all `@budget` with `budget`
2018-03-06 20:17:38 +01:00
Bertocq
0a066f6bb6 Swap @valuator instance variable for a let
Why:

Avoid instance variables as we agreed upon with RSpec/InstanceVariable

How:

Using a let(:valuator) and replacing all `@valuator` with `valuator`
2018-03-06 20:17:37 +01:00
Alberto Calderón Queimadelos
8456b74ce1 Merge pull request #2515 from consul/improve_pull_request_template
Improve Github's Pull Request Template file
2018-03-06 12:05:12 +01:00
Bertocq
d0c7bae364 Improve Github's Pull Request Template file
The actual PR template feels more like bureaucracy than an actual guide
or checklist to help the PR author explain all important thigs that any
reviewer or changelog reader may need to understand.

We'll be moving most of the redundant things (like remembering tests are
needed, or explaning how things where implemented with a clear and
granular commit history) into a Wiki/Doc entry.

For regular contributors there is no need for reminders, we need to
improve new contributors landing with good guides and lowering the bar
for first PR's
2018-03-06 11:05:31 +01:00
Alberto Calderón Queimadelos
28eab38ea0 Merge pull request #2516 from consul/fix_user_segment_emails
Remove empty emails from user segment usages
2018-03-05 14:08:03 +01:00