Commit Graph

13615 Commits

Author SHA1 Message Date
decabeza
e949d4d163 Refactor proposal total counter value 2019-03-19 16:59:57 +01:00
decabeza
9b95870c12 Remove empty div 2019-03-19 16:41:49 +01:00
Alberto
7b2258aeb0 Merge pull request #3263 from Platoniq/dashboard-recommended-actions-page
Dashboard recommended actions page
2019-03-19 16:21:28 +01:00
Alberto
093a8cdb10 Merge pull request #3261 from Platoniq/dashboard-poster-email-styles
Dashboard poster email styles
2019-03-19 16:21:20 +01:00
Alberto
501f6257bf Merge pull request #3260 from Platoniq/dashboard-actions-for-published-proposals
Dashboard actions for published proposals
2019-03-19 16:20:47 +01:00
Alberto
f9586bc97c Merge pull request #3259 from Platoniq/dashboard-fix-counter-design
Dashboard fix counter design
2019-03-19 16:20:28 +01:00
Julian Herrero
9ed6aae348 Refactor Setting model
- Make easier to group settings by using prefixes
- Add method to rename setting keys
- Add method to remove setting keys
2019-03-19 15:14:08 +01:00
Julian Herrero
8ae80cd1a1 Cleanup (remove unnecessary code) 2019-03-19 15:11:50 +01:00
Julian Herrero
27553e9058 Move setting next to similar/related settings 2019-03-19 15:11:30 +01:00
Julian Herrero
511f0be287 Require logged in user if navigate to /welcome 2019-03-19 14:55:51 +01:00
Julian Nicolas Herrero
8d83e70ef4 Merge pull request #3369 from consul/double_quotes_for_views
Change single quotes to double quotes for views
2019-03-19 14:34:53 +01:00
Javi Martín
b3a8924fe0 Don't create an officer for poll voter factories
For web poll voters, it isn't necessary in order to make the record
valid, and it adds an extra record to the database for each poll
voter created.
2019-03-19 13:29:45 +01:00
Javi Martín
d69adbccb7 Avoid creating extra poll records in tests
The line:

create(:poll_voter, booth_assignment: booth_assignment_final_recounted)

Creates a new poll for the poll voter. Not only it wastes time by
creating new database records, but it doesn't make sense to have a poll
voter for a poll which isn't the same as its booth assignment's poll.
2019-03-19 13:29:45 +01:00
Javi Martín
8118926ba7 Simplify tests creating poll voters 2019-03-19 13:29:43 +01:00
Javi Martín
4a3115607a Simplify poll stats test
Adding the option to assign a poll to a poll recount factory meant we
didn't need to create so much data.

Also note we're removing the `create(:poll_voter, origin: "booth")`
code, since it isn't used in the stats calculations.
2019-03-19 13:24:24 +01:00
Javi Martín
4830b563ea Create only one poll for a poll voter
The factories were creating strange database relations:

* The voter belonged to a poll, to a booth and to an officer
* The booth belonged to a different poll
* The officer belonged to a different booth

The code uses an unusual syntax because the following code:

association :booth_assignment,
            factory: :poll_booth_assignment,
            poll: poll

Would generate the following error:

ActiveRecord::AssociationTypeMismatch: Poll(#46976420451940) expected,
got FactoryBot::Declaration::Implicit
2019-03-19 13:19:24 +01:00
Javi Martín
b05ea2964c Simplify poll voter factory associations 2019-03-19 13:19:24 +01:00
Julian Herrero
f6489bc604 Use double quotes in app/views 2019-03-19 12:33:07 +01:00
Julian Nicolas Herrero
d83bf940be Merge pull request #3370 from consul/double_quoutes_everywhere
Change single quotes to double quotes everywhere
2019-03-19 12:20:16 +01:00
Julian Herrero
dbe99f058e Use double quotes in app/views/shared 2019-03-19 12:16:50 +01:00
Julian Herrero
7fe6285fe3 Use double quotes in app/views/proposals 2019-03-19 12:16:50 +01:00
Julian Herrero
129a258f19 Use double quotes in app/views/moderation 2019-03-19 12:16:50 +01:00
Julian Herrero
0e0462368b Use double quotes in app/views/management 2019-03-19 12:16:50 +01:00
Julian Herrero
2b83be1c7c Use double quotes in app/views/legislation 2019-03-19 12:16:50 +01:00
Julian Herrero
25ed245689 Use double quotes in app/views/layouts 2019-03-19 12:16:50 +01:00
Julian Herrero
b78ff808c1 Use double quotes in app/views/debates 2019-03-19 12:16:50 +01:00
Julian Herrero
c87267d34f Use double quotes in app/views/budgets 2019-03-19 12:16:50 +01:00
Julian Herrero
0bb2633c7a Use double quotes in app/views/admin 2019-03-19 12:16:50 +01:00
Julian Herrero
c32a98be10 Use double quotes in app/views/admin/site_customization 2019-03-19 12:16:50 +01:00
Julian Herrero
e63a862882 Use double quotes in app/views/admin/poll 2019-03-19 12:16:50 +01:00
Julian Herrero
7b4b4b716c Use double quotes in app/views/admin/legislation 2019-03-19 12:16:50 +01:00
Julian Herrero
5bfc9add78 Use double quotes in app/views/admin/budget 2019-03-19 12:16:50 +01:00
Julian Nicolas Herrero
4d6ddd2bb3 Merge pull request #3362 from consul/double_quotes_for_models
Change single quotes to double quotes for models
2019-03-19 12:14:31 +01:00
Julian Nicolas Herrero
af55366e57 Merge pull request #3360 from consul/double_quotes_for_controllers
Change single quotes to double quotes for controllers
2019-03-19 12:13:07 +01:00
Julian Nicolas Herrero
1c71e01646 Merge pull request #3341 from consul/improvement_for_options_display_results_polls
Improvements about displaying results for voted polls
2019-03-18 10:51:03 +01:00
Julian Nicolas Herrero
542c744a6a Merge pull request #3367 from consul/keep_images_uploaded_with_ckeditor
Keep images uploaded with CKEditor when deploying
2019-03-18 10:47:59 +01:00
Julian Herrero
6d281affa5 Use double quotes 2019-03-15 10:29:07 +01:00
Julian Herrero
002e16ce30 Use double quotes in lib/ 2019-03-15 10:29:07 +01:00
Julian Herrero
c9cdc72537 Use double quotes in config/ 2019-03-15 10:29:07 +01:00
Julian Herrero
8510624692 Use double quotes in config/routes 2019-03-15 10:29:07 +01:00
Julian Herrero
a8d8d2cdf9 Use double quotes in config/initializers 2019-03-15 10:29:03 +01:00
Julian Herrero
9f9b1ed100 Assign officer assignment when creating voter from booth
If `officer_assigment' is not set the model cannot be validated,
because it cannot be blank.
2019-03-15 09:58:16 +01:00
Julian Herrero
58f22915e9 Use double quotes 2019-03-15 09:57:09 +01:00
Julian Herrero
da04f6caa7 Add test for booth votes case 2019-03-15 09:55:12 +01:00
Julian Herrero
18bd2c7de8 Refactor (improve readability) 2019-03-15 09:55:12 +01:00
Julian Herrero
92979b84b5 Set correct origin for booth poll votes 2019-03-15 09:55:12 +01:00
Julian Herrero
9f21d9c64e Use double quotes in app/mailers 2019-03-15 09:27:01 +01:00
Julian Herrero
b460c024f3 Use double quotes in app/helpers 2019-03-15 09:26:49 +01:00
Julian Herrero
d9eaea4ea0 Use double quotes in app/assets 2019-03-15 09:26:00 +01:00
Julian Nicolas Herrero
6012638597 Merge pull request #3353 from consul/default_custom_pages
[Backport] Default site customization pages
2019-03-14 18:36:38 +01:00