Commit Graph

15065 Commits

Author SHA1 Message Date
voodoorai2000
18cef27b8d Add missing geozone relation 2019-06-07 12:28:40 +02:00
voodoorai2000
f190edacbd Use Rails 5 ApplicationRecord instead of ActiveRecord::Base 2019-06-07 12:28:23 +02:00
voodoorai2000
744824e26f Remove deprecated reference to documentable method
We have done a little refactoring of documents. Now document settings are part of the admin interface[1].

[1] https://github.com/consul/consul/pull/3585/
2019-06-07 12:22:09 +02:00
lalo
46e5d6a9fa Create Legislation::PeopleProposal model 2019-06-06 17:22:49 +02:00
Javier Martín
3284a0848a Merge pull request #3595 from consul/fix_schema_indentation
Fix indentation in schema file
2019-06-06 17:00:33 +02:00
Javi Martín
69c6cd6737 Fix indentation in schema file 2019-06-06 16:20:27 +02:00
Javier Martín
6ba5c35bab Merge pull request #3596 from consul/fix_admin_comments_test
Check the comment is present after commenting
2019-06-06 16:17:02 +02:00
Javi Martín
0cca8c2cc1 Check the comment is present after commenting
We've got a bug which causes the admin description not to appear
immediately after commenting, due to the `admin_layout` variable being
false when we add a comment using an AJAX request.

So the test reloaded the page to check the admin description was there.
However, sometimes reloading the page is faster than the AJAX request,
and so the comment is not there yet.

By checking the results of the AJAX request before reloading the page,
the test passes.

A proper solution would be to display the admin description or name
right after the comment is added.
2019-06-06 14:18:32 +02:00
Javier Martín
b14661e378 Merge pull request #3581 from consul/duplicate_translations
Avoid duplicate records using translations
2019-06-06 13:08:05 +02:00
Javier Martín
42f8ce99a0 Merge pull request #3590 from consul/add_upgrade_task
Add task to upgrade to a new release
2019-06-06 13:07:41 +02:00
Javier Martín
10be2ad86c Merge pull request #3592 from consul/fix_results_links
Don't show links to disabled budget results
2019-06-06 13:06:26 +02:00
Javi Martín
da59315530 Don't show links to budget results if disabled 2019-06-06 12:18:05 +02:00
Javi Martín
eb7dc3ef2d Extract partial to render budget navigation links 2019-06-06 12:17:52 +02:00
Javi Martín
c8b6a1a4a1 Use the same view code for finished budgets
The differences between the custom code and the code in CONSUL didn't
make much sense anymore: the path can be passed a budget instead of an
ID (so it uses a slug) and there's no reason to hide the link to the
executions for the 2018 budget anymore. Furthermore, removing the
`status: 1` parameter makes the link consistent with the rest of the
application, since it was the only link to budget executions using that
parameter.
2019-06-06 12:17:51 +02:00
Javi Martín
99fd838ca1 Extract partial to render finished budgets 2019-06-06 12:17:49 +02:00
Raimond Garcia
a874d25bfa Merge pull request #3413 from LextrendIT/feature/notify_evaluation_comments
notify by email new evaluation comments
2019-06-06 11:29:38 +02:00
Javi Martín
d2c075cc93 Add new settings on servers with the db role
This task adds records to the database, so the role `db` is more
appropriate.
2019-06-05 20:23:56 +02:00
Javi Martín
1d0b05832c Add info messages for release 1.0.0 tasks
So users know what's going on when they upgrade CONSUL.
2019-06-05 20:23:56 +02:00
Javi Martín
3ab2085e05 Move calculate_ballot_lines task to the right file
We already have a file with the proper budgets namespace.
2019-06-05 20:23:56 +02:00
Javi Martín
685c96c40d Add capistrano task to deploy and upgrade CONSUL 2019-06-05 20:23:56 +02:00
Javi Martín
c78211af49 Add task to upgrade to version 1.0.0
It includes every task needed for the upgrade.
2019-06-05 20:23:54 +02:00
Javier Martín
72c6b05c64 Merge pull request #3376 from LextrendIT/3350_rename_debates_comments_admin
Refactor admin/debates and admin/comments to hidden
2019-06-05 19:15:21 +02:00
Julian Nicolas Herrero
7802305b18 Merge pull request #3585 from consul/images_and_documents_settings
Images and documents settings
2019-06-05 19:11:22 +02:00
Javier Martín
81b67349f2 Merge pull request #3580 from consul/use_find_instead_of_find_by_id
Use find instead of find by
2019-06-05 19:04:47 +02:00
Javier Martín
cbad8ad416 Merge pull request #3389 from LextrendIT/feature/add_description_field_to_administrator_users_like_evaluators
Add description field to administrator users like evaluators description
2019-06-05 18:36:16 +02:00
Julian Nicolas Herrero
5e9cb24e22 Merge pull request #3587 from consul/unregistered_poll_officers
Show name and email for deleted poll officer's user account
2019-06-05 17:58:53 +02:00
lalo
8061bfa5e8 Send email to users related with an investment when valuation comment is created 2019-06-05 17:02:59 +02:00
lalo
28815cb290 Create new email template for new evaluation comment created and add it to system_emails view 2019-06-05 16:22:12 +02:00
lalo
d721920b97 Display commenter as admin description or name 2019-06-05 16:19:31 +02:00
lalo
d0e1eff532 Add description field to administrator users like evaluators description 2019-06-05 16:18:12 +02:00
Alberto
a6f8969728 Merge pull request #3577 from consul/proposal-show
Extract partial with mobile sticky content
2019-06-05 09:51:45 +02:00
Julian Herrero
1f76b25e2a Show name and email for deleted poll officer's user account
Avoid to raise an exception `Module::DelegationError' when trying to
show the name and/or email of a poll officer whose user account has
been deleted.
We'll show a message "User deleted" and "Email deleted" instead.
2019-06-04 18:55:51 +02:00
decabeza
19867836f8 Extract partial with mobile sticky content 2019-06-04 17:29:31 +02:00
Julian Herrero
8e0bbf54f6 Replace harcoded images and documents settings 2019-06-04 11:50:09 +02:00
Julian Herrero
220bfb065a Add images and documents settings to admin panel 2019-06-04 11:47:22 +02:00
Julian Herrero
35cd26c117 Add images and document settings to the DB 2019-06-04 11:45:38 +02:00
Julian Herrero
e32faf3a3c Extract setting prefix to a method
We may need to access the setting key prefix in the future, so it's
better to have it in a method to avoid duplication
2019-06-04 11:39:53 +02:00
Julian Herrero
b4e8395bd6 Extract settings forms to partials 2019-06-04 11:39:40 +02:00
lalo
c538d08fee Display public investment view on admin and valuator pages as preview 2019-06-04 09:30:51 +02:00
Javi Martín
481184e7f3 Fix accidental translations join
We added the code thinking we were ordering by the name of the poll, but
here we're actually ordering by the name of the booth.
2019-06-03 18:36:03 +02:00
Javi Martín
dadbf873ba Order translations using ruby
Joining the translations table caused duplicate records to appear.
Ordering with SQL is simply too hard because we need to consider
fallback locales.

Thanks Senén for providing most of the tests in the poll spec.
2019-06-03 18:35:59 +02:00
Julian Herrero
b122302c58 Use find instead of find_by_id
Better raise a 404 HTML NotFound exception than any other unexpected error.
2019-06-03 17:54:19 +02:00
lalo
8d5f53e1e7 Refactor budget investment show page extracting code to partial 2019-06-03 17:26:31 +02:00
Julian Herrero
22076dd95c Add method find_by_slug_or_id! to Sluggable module
Make it easier to find by slug or id for sluggable models. It will
raise a 404 HTML Not found error if the resource is not found.
2019-06-03 16:54:39 +02:00
Julian Herrero
4bd20eebf4 Use correct param in controller
There were some custom routes created using the param[:id] but the
Rails routes use the param[:budget_id] by default, so the same
controller could be asked for different param keys.
2019-06-03 16:54:39 +02:00
rgarcia
998b4d9e39 Load budgets using slugs 2019-06-03 16:54:39 +02:00
Bertocq
0d761ddfb1 Hotfixing find the only budget for emails 2019-06-03 16:54:39 +02:00
German Galia
4f50e67ac3 Collaborative legislation summary 2019-06-03 12:34:25 +02:00
Javier Martín
90c1d681d0 Merge pull request #3576 from consul/new_settings
Add new settings automatically on every deployment
2019-06-03 11:54:44 +02:00
Javier Martín
a6c63ac64f Merge pull request #3564 from consul/default_settings
Simplify settings seeds
2019-06-03 11:53:20 +02:00