taitus
744a3d48fd
Create RemoteTranslations Controller
...
- Create RemoteTranslations Controller to receive resources without
translations and create RemoteTranslation instances when theirs
translations are not enqueued.
- Create remote_translation_enqueued? class method on RemoteTranslation
model to check if exists same remote translations without errors
pending to translate.
2019-06-27 09:21:18 +02:00
taitus
04810f5080
Create RemoteTranslation model
...
- Each RemoteTranslation is associated with a resource (through polymorphic)
and has the locale to we want translate.
- After create a RemoteTranslation we create a enqueue_remote_translation
method that will be send remote translation instance to remote translation
client
2019-06-27 09:20:25 +02:00
Senén Rodero Rodríguez
b5663a7c17
Add translation interface setting values
...
* Disable translation interface by default
* Also add rake task to enable translations interface through rake
command
2019-06-27 09:20:25 +02:00
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
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
0011a0b4c7
Move Translation class inside Budget
...
The reason to move Translation class is explained here [1]
[1] 106649a8a5
2019-06-27 09:20:24 +02:00
Senén Rodero Rodríguez
3b03e583f9
Move Translation class inside Budget::Phase
...
The reason to move Translation class is explained here [1]
[1] 106649a8a5
2019-06-27 09:19:37 +02:00
Senén Rodero Rodríguez
27f6c8804f
Move Translation class inside Budget::Heading
...
The reason to move Translation class is explained here [1]
[1] 106649a8a5
2019-06-27 09:19:37 +02:00
Senén Rodero Rodríguez
c2f393276a
Move Translation class inside Budget::Group
...
The reason to move Translation class is explained here [1]
[1] 106649a8a5
2019-06-27 09:19:37 +02:00
Senén Rodero Rodríguez
da1c5fdb01
Remove unneded before validation callbacks
...
After globalize gem update there is no need to keep this monkey patch.
More information here [1]
[1] 3075c89b70
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
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
ed750f6cce
Move private method to a more reusable location
...
This method will be used by any translatable model that uses pg_search
feature so it's better to have it within globalizable model concern so
all translatable models can use it.
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
740c738fc5
Add debate translations
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
taitus
b503eeac66
Fix spec models/widget/feed_spec.rb:61 as branch master.
2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
ce7be5f2d6
Change the way to retrieve notifiable body
...
Using 'try' method to get notifiable is not working with translations
anymore. It was returning 'nil' always even when body translation is
populated.
2019-06-27 09:19:36 +02:00
taitus
0ffb52257f
Fix specs budget_investments_spec.b:99
2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
b86579c40f
Avoid crash when adding new translations
...
Paranoia is activated on translation classes by reflection, this is
making Rails to load translation classes before to execute migration
that adds the new column.
With this extra check Rails will not execute this code until translation
table has this column created.
2019-06-27 09:19:36 +02:00
Senén Rodero Rodríguez
1de23fc726
Add paranoid behavior to translations of paranoid models
...
We want to be able to fetch soft deleted translations without using
with_deleted scope.
2019-06-27 09:19:35 +02:00
Senén Rodero Rodríguez
2e8e7b83a5
Remove monkey patch
...
Since globalize version update this is no longer needed. New Globalize
version initializes globalized_model correctly when building new
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
German Galia
74083df10f
Add historic fields to participatory budget
2019-06-12 18:03:53 +02:00
German Galia
9ce524e1f3
Create tracker rol
2019-06-12 16:23:40 +02:00
German Galia
16ffa2a259
Add change log in investment participatory budget
2019-06-12 13:06:20 +02:00
Raimond Garcia
259e05c3e0
Merge pull request #3410 from LextrendIT/report_generation
...
Report generation, download CSV
2019-06-12 11:45:59 +02:00
German Galia
9d1ca3bfd4
Report generation. Download csv
2019-06-12 10:17:31 +02:00
Raimond Garcia
e0e1e1dac1
Merge pull request #3437 from LextrendIT/feature/add_valuator_role_actions_manager
...
Add abilities to valuator model for comment and edit dossiers
2019-06-11 17:13:13 +02:00
Raimond Garcia
c1b14943e6
Merge pull request #3473 from LextrendIT/3463_collaborative_legislation_summary
...
Collaborative legislation summary
2019-06-11 16:41:45 +02:00
lalo
c2860dda0e
Add can_comment and can_edit_dossier abilities to valuators
2019-06-11 16:24:02 +02:00
Julian Nicolas Herrero
c7ea0528e0
Merge pull request #3603 from consul/admin_stats_before_voting_phase
...
Avoid error when accessing final voting stats before the balloting phase
2019-06-11 14:34:42 +02:00
lalo
ef345ca87c
Collaborative legislation summary
2019-06-11 14:31:44 +02:00
Raimond Garcia
139b2720d8
Merge pull request #3419 from LextrendIT/feature/add_tags_to_milestones
...
Add tags to milestones
2019-06-11 12:37:30 +02:00
Julian Herrero
fd71ed825b
Avoid error when accessing final votes stats before balloting phase
...
When accessing the URL `/admin/stats/budget_balloting?budget_id=X'
for a budget in a phase prior to the balloting phase, the following
error was raised due to the stats where not calculated yet.
Instead, we'll now show a flash message.
NoMethodError:
undefined method `[]' for nil:NilClass
./app/controllers/admin/stats_controller.rb:82
2019-06-10 17:28:16 +02:00
Javi Martín
2a6c285257
Update migrations and schema file
...
It looks like they got out of sync when rebasing.
2019-06-07 17:36:22 +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
voodoorai2000
d9cc726085
Add setting for max votes to edit a people proposal
2019-06-07 12:29:30 +02:00
voodoorai2000
5699da671c
Remove obsolete question attribute
2019-06-07 12:28:55 +02:00
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
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