Commit Graph

9098 Commits

Author SHA1 Message Date
Bertocq
2ecbfc76e0 Add Segment for users without supports on Budget
Created not_supported_on_current_budget at UserSegment along with model
spec scenario and translation strings.
2018-03-15 16:48:54 +01:00
decabeza
acebb07ddd Adds link to image and docs on admin budget investment info 2018-03-14 15:14:47 +01:00
decabeza
f05fdb88ea Adds link to username on admin users index view 2018-03-14 15:09:30 +01:00
decabeza
4fbc10d85e Fixes budgets ui for all phases 2018-03-14 15:01:56 +01:00
Raúl Fuentes
cd5923c41d updated test, changed fixed seeds for the new seed function 2018-03-14 11:13:59 +01:00
Alberto Calderón Queimadelos
bc03aee84d Merge pull request #2535 from consul/valuators_access_restriction
Restrict valuators access to edit/valute only on valuating phase
2018-03-13 00:56:05 +01:00
Bertocq
c0986c7bfb Fix investment creation for single budget usage
Budget Investment factory creates a secondary budget as a collateral
effect because it has a Heading factory that has a Group factory that
creates a Budget.

This was resulting in problems due to having two "active" Budgets created
and `current_budget` method not choosing the one that we expected
2018-03-12 23:06:32 +01:00
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
Angel Perez
80b77e873e Add missing require for dev_seeds rake task spec 2018-03-06 18:47:57 -04: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