Commit Graph

1129 Commits

Author SHA1 Message Date
Senén Rodero Rodríguez
e8f53cb8b7 Add translations to budget investments pg_search_scope
Some Budget::Investment attributes are now translatable so we need to
include all existing translations on pg_search model scope.
2019-06-27 09:20:24 +02:00
Senén Rodero Rodríguez
88ce8d7990 Add sanitization shared spec to budget investment 2019-06-27 09:20:24 +02:00
Senén Rodero Rodríguez
eb2e402a92 Fix budget investments sorting by title
As we cannot order budget investments by any translatable field through
AR queries we are doing the same using ruby Array sort method and doing
array pagination manually with Kaminari 'paginate_array' helper method.
2019-06-27 09:20:24 +02:00
Senén Rodero Rodríguez
bb2ee6dd3c Fix search_by_title_or_id method
Results were not including records without translations for current
locale (I18n.locale). Now we search for given title against all
translation fallbacks for current locale.
2019-06-27 09:20:24 +02:00
Senén Rodero Rodríguez
eefb9ca4f7 Add budget investment translations
Also fix sort_by_title method [1]

[1] Use ruby sort instead of active record order scope because Globalize
does not provide a way to search over all available fallbacks when
translation for current locale does not exist.
2019-06-27 09:20:24 +02:00
Senén Rodero Rodríguez
2079706845 Enable soft deletion of Proposal::Translations 2019-06-27 09:19:37 +02:00
Senén Rodero Rodríguez
f572d5b579 Add translations to proposal pg_search_scope
Some Proposal attributes are now translatable so we need to include all
existing translations on pg_search scope.
2019-06-27 09:19:37 +02:00
Senén Rodero Rodríguez
4ce006ec96 Enable soft deletion of Comment::Translations 2019-06-27 09:19:37 +02:00
Senén Rodero Rodríguez
158af0217d Add comments translations
Co-Authored-By: Sebastia <sebastia.roig@gmail.com>
2019-06-27 09:19:37 +02:00
Senén Rodero Rodríguez
096a9f6bb8 Enable soft deletion of Debate::Translations 2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
036a3d7636 Add translations to debate pg_search_scope
Some Debate attributes are now translatable so we need to include all
existing translations on pg_search scope.
2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
b67cd0fe40 Add sanitization shared spec to debate 2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
740c738fc5 Add debate translations 2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
dd310f7507 Add sanitization shared spec to proposal 2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
02be0c61f9 Add proposal translations
Adapt retire form to include needed translations and move validations
from controller to model.

Also change sanitizable concern to sanitize not marked for destruction
translations.
2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
206f92b9fa Enable soft_deletion of Banner::Translations
Also create missing banner model spec.
2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
caa9e1cd49 Enable soft_deletion of Poll::Question::Translations 2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
e451c4657c Enable soft_deletion of Poll::Translations 2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
441f0773a6 Enable soft_deletion of Legislation::Question::Translations 2019-06-27 09:19:35 +02:00
Senén Rodero Rodríguez
e0649f983f Enable soft_deletion of Legislation::QuestionOption::Translations 2019-06-27 09:19:35 +02:00
Senén Rodero Rodríguez
049c56e9f8 Enable soft_deletion of Legislation::Process::Translations 2019-06-27 09:19:35 +02:00
Senén Rodero Rodríguez
f6b41f916b Enable soft_deletion of Legislation::DraftVersion::Translations 2019-06-27 09:19:35 +02:00
lalo
c6e4b2480f Add public changes to create and vote Poll:Questions with votation type 2019-06-12 19:44:14 +02:00
lalo
23d36835d7 Add Admin changes to create Poll:Questions with votation type 2019-06-12 19:44:14 +02:00
lalo
7c9c50f4c6 Add Model changes to work with votation_types 2019-06-12 19:32:41 +02:00
lalo
c2860dda0e Add can_comment and can_edit_dossier abilities to valuators 2019-06-11 16:24:02 +02:00
lalo
be8a0dbe8a Add Milestone tag select filter on executions public page 2019-06-07 14:17:32 +02:00
lalo
3282606be2 Add act_as_taggable_on milestoneable concern 2019-06-07 14:07:43 +02:00
lalo
46e5d6a9fa Create Legislation::PeopleProposal model 2019-06-06 17:22:49 +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
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
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
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
d0e1eff532 Add description field to administrator users like evaluators description 2019-06-05 16:18:12 +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
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
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
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
Javi Martín
bb504d90fb Add method to add new settings 2019-05-31 19:33:31 +02:00
voodoorai2000
cb9c3696f4 Use budget investments in useful specs 2019-05-31 18:23:03 +02:00
voodoorai2000
d0b8fef6b3 Delete spending proposals 2019-05-31 18:22:59 +02:00
voodoorai2000
24dde9c35e Delete valuation 2019-05-31 15:43:06 +02:00
Julian Nicolas Herrero
3ba7bd1cab Merge pull request #3567 from consul/select_proposals_by_admins
Make proposals to be selected by administrators
2019-05-31 15:30:39 +02:00
Julian Herrero
a852696eeb Remove not selected proposals from other lists 2019-05-30 11:19:38 +02:00
Julian Herrero
9948804e21 Add selected attribute to proposals 2019-05-29 16:51:27 +02:00