Bertocq
bdbb32e824
Move newsletter User scope outside UserSegments
...
Why:
UserSegments are not only used for Newsletters or Email downloads, but
also for internal Global Notifications. We don't want to have that scope
hardcoded inside UserSegments as users that have opted-out from the
newsletter should still be recipients of global notifications.
How:
Removing the scope from the UserSegments `all_users` method that acts as
base for all the other segments. Including that `newsletter` scope only
on the places that is relevant:
* When listing recipients for a newsletter
* When downloading a listing emails that can be newsletter recipients
Also updated relevant tests
2018-02-21 11:45:38 +01:00
Bertocq
f873bff5c6
Fix admin menu controller name conditionals
2018-02-20 22:33:01 +01:00
rgarcia
7f30d0c620
Fix doble submit specs
...
We have a custom implementation to avoid doble submissions which causes
some custom problems 😌
This commit should fix the following three specs
spec/features/comments/legislation_annotations_spec.rb:367
spec/features/comments/legislation_questions_spec.rb:333
spec/features/custom/probe_option_comments_spec.rb:298
One of the custom problems comes from ajax:success[1] not being
triggered, instead only ajax:complete seems to be triggered
We should remove this custom implementation and use the standard
solution provided in rails[2]
[1]
https://github.com/AyuntamientoMadrid/consul/blob/master/app/assets/java
scripts/prevent_double_submission.js.coffee#L28
[2]
https://stackoverflow.com/questions/9570912/how-to-disable-a-form-submit
-button-a-l%C3%A0-ruby-on-rails-way/9572893#9572893
2018-02-20 22:33:01 +01:00
María Checa
1c458d4be3
Added emails download views
2018-02-20 22:33:01 +01:00
María Checa
cb15a2e25b
Added EmailsDownload controller and routes
...
Removed original method to return emails file from Newsletters controller and NewsletterZip class, included `rubyzip` gem that's no longer necessary.
2018-02-20 22:33:01 +01:00
Bertocq
1c653a7096
Improve admin menu active item conditionals
2018-02-20 18:50:39 +01:00
María Checa
017c242085
Merge pull request #2462 from consul/admin-newsletter-emails
...
Admin newsletter emails
2018-02-20 16:17:37 +01:00
Bertocq
1434449b84
Fix line length issues at User model
2018-02-19 11:09:19 +01:00
Bertocq
9925e2b02f
Extract inline query to User scope & refactor
2018-02-19 11:09:19 +01:00
Bertocq
62d75af892
Fix line lenght offenses at multiple controllers
2018-02-19 11:09:19 +01:00
Bertocq
4fb9f6829c
Extract inline query to an OfficerAssignment scope
2018-02-19 11:09:19 +01:00
Bertocq
118deb9fc4
Fix line lenght offenses at multiple controllers
2018-02-19 11:09:19 +01:00
decabeza
9e51d47012
Fixes image height on items list with tags
2018-02-14 19:19:28 +01:00
decabeza
9c887f5ee9
Removes old unused css
2018-02-14 18:21:04 +01:00
decabeza
1cc799ef11
Adds links to milestone description
2018-02-14 18:13:46 +01:00
decabeza
a950bb03a7
Removes unnecessary p tag on investment partial
2018-02-14 18:04:17 +01:00
decabeza
990dc072be
Refactors custom page view and include specs
2018-02-14 17:52:10 +01:00
decabeza
f7c7f0201a
Fixes heading structure and i18n format on legislation processes
2018-02-14 17:06:26 +01:00
María Checa
24bca36639
Merge branch 'master' into admin-newsletter-emails
2018-02-14 16:07:13 +01:00
María Checa
d786284ce9
Added newsletter custom stylesheets and js alert
2018-02-14 16:06:02 +01:00
María Checa
f1fbe7ff29
Modified administrator abilities for newsletters
2018-02-14 16:05:31 +01:00
María Checa
881059811f
Added newsletter admin views
2018-02-14 16:05:29 +01:00
decabeza
c0c4d9e01f
Fixes back link to on how to use help page
2018-02-14 16:00:01 +01:00
Raimond Garcia
8bec36500a
Merge pull request #2385 from wairbut-m2c/2363-alert-delete-investment-project
...
Add alert message when a user deletes an investment project from "My activity"
2018-02-13 14:06:08 +01:00
María Checa
20173f9870
Added newsletter mailer method and view
2018-02-13 13:12:00 +01:00
María Checa
49adcfde02
Added newsletter controller and routes
2018-02-13 11:39:12 +01:00
María Checa
07f2419f8f
Added newsletter model and UserSegments class
2018-02-13 11:39:10 +01:00
Bertocq
3f91e920f6
Enable rubocop Performance/RedundantMatch cop & fix issues
...
Some cop offenses have been stashed into rubocop_todo.yml for now
2018-02-10 21:26:02 +01:00
Bertocq
57743df197
Enable rubocop Performance/HashEachMethods cop & fix issues
2018-02-10 21:22:47 +01:00
Bertocq
b3b28e21d0
Fix translation indentation on investments partial
2018-02-10 20:44:02 +01:00
Bertocq
86a60a8b7c
Fix space & comma typo
2018-02-10 19:15:00 +01:00
Bertocq
a46e9f756a
Fix end's indentations at budget index page
2018-02-10 18:23:38 +01:00
Bertocq
9f47bce7f5
Improve budget index info page with classes
2018-02-10 18:22:45 +01:00
Bertocq
2915788487
Add budget id to finished budgets list on budget index
2018-02-10 18:20:15 +01:00
Bertocq
089ccdae7c
Fix html alignments
2018-02-10 16:58:00 +01:00
Bertocq
189fa5ba50
Fixes advanced filters link position
2018-02-10 16:42:54 +01:00
Bertocq
6d9926441e
Reverse investment scoped filter for budget by slug and then id
2018-02-10 16:39:27 +01:00
Bertocq
2341a2f70b
Add by_budget scope to Investment and use it
2018-02-10 16:36:14 +01:00
Bertocq
bd10285431
Fix line length at budget investments helper
2018-02-10 16:30:07 +01:00
Raúl Fuentes
ecdbc4a3f7
added balloting to the list of phases allowed to see all the links
2018-02-10 15:27:40 +01:00
Raúl Fuentes
5b16d395e7
Added logic to not show invetment links is the budget phase isn't reviewing_ballots or finished
2018-02-10 15:27:40 +01:00
BertoCQ
37f0a412d9
Merge pull request #2454 from wairbut-m2c/backport_1191_flaky_budget_investments_orders_random
...
Fix flaky spec: random investments order scenario
2018-02-09 12:11:18 +01:00
decabeza
2154a614c2
Adds new legislation processes section on help page
2018-02-08 19:06:41 +01:00
Raúl Fuentes
ebebbdf078
Added bigger pool for random seeds, now with a 9 * 10e-07 % of chance of appearing, also added test to cover edge cases (case in fact, the coincidence of the seeds it's correct)
...
Conflicts:
app/controllers/budgets/investments_controller.rb
2018-02-08 16:33:15 +01:00
decabeza
dac5b7c9a2
Adds missing polls button on help page
2018-02-07 19:09:30 +01:00
Bertocq
f44d64207c
Release v0.13
2018-02-05 21:10:09 +01:00
BertoCQ
087c8b0a99
Merge pull request #2395 from consul/hidden-comments
...
Hidden comments
2018-02-05 20:27:05 +01:00
Bertocq
7e67e8c93b
Remove unnecesary empty line at milestone model
2018-02-05 15:54:33 +01:00
BertoCQ
c16e42e1e3
Merge pull request #2434 from consul/slug_generation_logic
...
Only change budget slugs if its on draft phase
2018-02-05 15:35:58 +01:00
BertoCQ
4829b97cb6
Merge pull request #2431 from consul/fix_milestones_order
...
Fix milestones order
2018-02-05 15:35:00 +01:00