Commit Graph

9013 Commits

Author SHA1 Message Date
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
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
Alberto Calderón Queimadelos
18aa23fb3e Merge pull request #2513 from consul/fix_debates_spec_back_link
Flaky spec fix: Debates Show: "Back" link directs to previous page
2018-03-05 11:22:37 +01:00
Bertocq
f9909573a3 Make config.time_zone configurable at secrets.yml 2018-03-05 11:17:25 +01:00
iagirre
ffd6bdb3d7 first changed for click_link so that the test can wait the capybara default time. 2018-03-04 22:58:35 +01:00
Alberto Calderón Queimadelos
9747386575 Merge pull request #2506 from consul/fix_email_spec_comment_failues
Fix Email Spec comment random failures
2018-03-02 15:06:32 +01:00
iagirre
e21588ec16 The function comment_on has been modified to change the functionality. Now, a comment is generated and a email notification send manually, so that JS has been avoided, that was the original problem. 2018-03-02 13:35:50 +01:00
Bertocq
316c0aab3e Remove unnecesary slug generation trigger 2018-03-02 09:17:34 +01:00
Bertocq
16bec030ad Cleanup spec files from I18n calls 2018-03-02 09:17:29 +01:00
Bertocq
d9a8474793 Refactor Group partial to be easier to read 2018-03-02 09:17:26 +01:00
Bertocq
7c02f9c82e Fix missing I18n.t usage 2018-03-02 09:17:21 +01:00
Raúl Fuentes
78fc4010d0 fixed the style 2018-03-02 09:17:08 +01:00
Raúl Fuentes
8f4d48690b Added tests for edit the name of any Budget::Group 2018-03-02 09:17:03 +01:00
Raúl Fuentes
6d8d44a5e3 Added interface and methods for edit the name of a Budget::Group if the budget is still inthe drafting phase 2018-03-02 09:16:57 +01:00
Bertocq
6b41b6487b Add UserSegments#user_segment_emails helper method
Why:

Both Newsletters and Email Downloads need the same logic: To extract the
emails from all the users in the segment that have newsletter flag
active, removing all empty email values.

How:

1- UserSegments#user_segment_emails holds that repeated logic and is used
on both Newsletter & EmailDownload.

2- Rename Newsletter#list_of_recipients to list_of_recipient_emails as
it is more descriptive. There is no need to pass entire Users around,
only the emails are needed at Mailer#newsletter method.

3- Cleanup Newsletter#list_of_recipient_emails model spec scenario
2018-03-01 20:59:20 +01:00
Bertocq
99851e9588 Remove empty emails from users segments recipients
Why:

User with an empty email value (nil) should not appear in the recipient
list for a given UserSegment at Newsletters or Email Downloads.

How:

Using Enumerable#compact and Enumerable#select to filter out empty emails

Increasing Email Download feature spec and Newsletter model spec to cover
all possible scenarios including the nil email one.
2018-03-01 20:09:32 +01:00
Bertocq
089cef8ead Improve download segment translations 2018-03-01 13:52:48 +01:00
Alberto Calderón Queimadelos
0decaf43a3 Merge pull request #2492 from consul/fix_newsletter_send_performance
Fixed how newsletters controller and mailer handle recipients
2018-02-28 19:03:58 +01:00
Bertocq
61c58817fc Update unreleased section of changelog 2018-02-28 18:09:46 +01:00
Alberto Calderón Queimadelos
4af603edc6 Merge pull request #2491 from consul/2487-feasible_undecided_investment_authors_segment
Fix UserSegment feasible and undecided investment authors
2018-02-28 18:01:54 +01:00
Alberto Calderón Queimadelos
0acb4988f0 Merge pull request #2490 from consul/documents-tab
Documents list
2018-02-28 17:14:58 +01:00
María Checa
3867c6b716 Fixed newsletter tests 2018-02-28 17:02:39 +01:00
María Checa
8d2a103744 Changed how newsletters controller and mailer handle recipients
Now newsletters controller calls the Mailer method to send a newsletter once per user.
2018-02-28 17:02:31 +01:00
Alberto Calderón Queimadelos
494904565a Merge pull request #2489 from consul/ui-fixes
UI fixes
2018-02-28 16:56:57 +01:00
María Checa
6140a822e8 Changed translations 2018-02-28 16:55:53 +01:00
María Checa
7913128520 Changed tests for UserSegments#feasible_and_undecided_investment_authors 2018-02-28 16:54:28 +01:00