Commit Graph

1693 Commits

Author SHA1 Message Date
María Checa
6d5e1a075e Allow admins to access Legislation::Proposal #show and Legislation::Process #proposals 2018-10-03 16:01:18 +02:00
Javier Martín
132fea9c94 Merge pull request #2913 from papayalabs/2741-updates-translatable-custom-pages-reloaded
Updates translatable custom pages
2018-10-03 13:23:13 +02:00
Javier Martín
2775ae2b50 Merge pull request #2924 from consul/backport-1588-make-homepage-content-translatable
Make homepage content translatable
2018-10-03 13:20:49 +02:00
Alberto
857f747ab8 Merge pull request #2922 from consul/legislation-proposals-imageable
Legislation proposals imageable
2018-10-02 11:22:19 +02:00
decabeza
7c194f6042 Adds imageable to legislation proposals 2018-10-01 16:48:46 +02:00
Papaya Labs
914bfa645e Updates translatable custom pages 2018-09-27 13:46:17 +02:00
Javi Martín
5bb5cfa7fb Make Widget::Card translatable 2018-09-26 16:09:09 +02:00
Raimond Garcia
4086220ebf Merge pull request #2914 from microweb10/make_polls_translatable
Make polls translatable
2018-09-26 13:19:17 +02:00
Julian Herrero
46030c72e8 remove unnecessary parameter 2018-09-21 20:53:20 +02:00
Julian Herrero
673ec075eb Make answers translatable 2018-09-20 17:13:40 +02:00
Julian Herrero
5e6248d2ac Make questions translatable 2018-09-20 17:11:53 +02:00
Julian Herrero
9495208518 Make polls translatable 2018-09-20 17:07:43 +02:00
Javi Martín
3fb98b1752 Fix typos 2018-09-19 14:54:52 +02:00
Javi Martín
a0f1a9ec1b Be consistent checking changes in draft versions
There's no reason to only convert Markdown to HTML in translations when
their body changes but to always convert it when the "main" body field
changes.

Whether we should always use the condition or never use it is something
we can debate about, though.
2018-09-19 14:54:24 +02:00
Marko Lovic
64d72ca8e7 Enable JS in shared translatable test
Due to its markdown editor, the admin draft version page
requires JS to correctly render the draft version form.
2018-09-19 14:54:24 +02:00
Marko Lovic
05bfa193cd Make Legislation Draft Versions translatable 2018-09-19 14:54:24 +02:00
Marko Lovic
06347062dd Make Legislation Questions translatable 2018-09-19 14:54:24 +02:00
Marko Lovic
d78aea1fd3 Make Legistlation Processes translatable 2018-09-19 14:54:24 +02:00
Marko Lovic
f6749049c9 Make Admin Notifications translatable 2018-09-19 12:15:26 +02:00
Raimond Garcia
ea72cd058b Merge pull request #2876 from javierm/ckeditor4_update
Ckeditor4 update
2018-09-17 23:02:50 +02:00
Javi Martín
531750cf6f Restore commented lines
Not sure if they were supposed to be removed. For now I'll assume they
were commented accidentally.
2018-09-12 12:35:28 +02:00
Javi Martín
471061f475 Allow only admins to attach CKEditor images
Right now allowing regular users to attach images would make us
vulnerable to CSRF attacks.
2018-09-12 12:35:28 +02:00
Raúl Fuentes
d574657b77 Fixes for the review made by @javierm
this commit will be merged with the others when the chages
are accepted
2018-09-12 12:35:28 +02:00
Raúl Fuentes
8e68f4bbd0 Update abilities for ckeditor4 images
Add the image controller to use the obsolete load_and_authorize_resource
and authorize_resource methods in the gem
2018-09-12 12:35:28 +02:00
Raúl Fuentes
424535c1ae Add models needed to include images on ckeditor4 2018-09-12 12:35:28 +02:00
Marko Lovic
c7fcdd9b0e Use standard locale names for Globalize
It turns out it is not necessary to downcase and underscore
locale names to use the globalize-accessor gem. The gem
will automatically underscore the locale name when defining and
calling the accessor methods.
2018-09-11 18:48:14 +02:00
Marko Lovic
3f277c5cdf Avoid duplicating list of locales 2018-09-11 18:46:58 +02:00
Raimond Garcia
4f2ed27f8c Merge pull request #2865 from consul/backport_1585-make_banners_translatable
[Backport] Make banners translatable
2018-09-10 16:41:33 +02:00
Raimond Garcia
7014686b15 Merge pull request #2813 from javierv/2812-fix_admin_menu_not_showing
Fix admin menu not showing for high IDs
2018-09-07 15:52:02 +02:00
Alberto
21f36e6be5 Merge branch 'master' into feature/1-nav-content-blocks 2018-09-05 12:41:07 +02:00
Marko Lovic
0fa4b60f39 Make Banners translatable 2018-08-30 16:29:29 +02:00
decabeza
c15769ba48 Updates logo header sizes and images for specs 2018-07-30 19:55:43 +02:00
Javier Martín
3b82057178 Fix admin menu not showing for some admins
There was a bug when finding the manager login, since we were only using
the last digit of their user ID.
2018-07-28 22:06:11 +02:00
Javier Martín
157cd001d5 Add spec to expose a bug finding manager logged in
I've moved the method to the User model in order to make it easier to
test. I'm not sure where it belongs, though.

There was already a failing spec in `spec/features/management_spec.rb`,
but it passed if run standalone because it only failed if previous tests
had already created nine users or more.
2018-07-28 22:03:33 +02:00
Raimond Garcia
2c79197a05 Merge pull request #2809 from wairbut-m2c/backport/translatable-content-for-admin
Basic content for I18n on Admin panel
2018-07-27 18:01:00 +02:00
Angel Perez
5d03fd210c Remove Valencian language key to fix translations spec 2018-07-27 08:06:14 -04:00
Alberto
fb19aafee7 Merge pull request #2778 from wairbut-m2c/backport/investments-moderation
Allow budget investments to be moderated
2018-07-27 12:34:17 +02:00
rgarcia
4c8b174274 Display only translations for the current language
After creating a translation in spanish, it was also displaying it when selecting
the english locale.

This was due to the code picking the first translation available

With this commit, we are checking for an existing translation in the current locale
and displaying it if it exists
2018-07-26 21:55:07 -04:00
rgarcia
12f6f06ade Fix exception when using locale as a parameter in the url
When visiting, for example, /admin/site_customization/information_texts?locale=fr
we were getting an `UncaughtThrowError: uncaught throw :exception`
With the following payload
```
File "/aytomad/app/participa/participacion/releases/20180726231929/app/views/admin/site_customization/information_texts/_form_field.html.erb" line 5

File "/aytomad/app/participa/participacion/releases/20180726231929/app/helpers/globalize_helper.rb" line 35 in block in globalize
```

Substituting this line seems to solve it

Note that we had to remove the portuguese local too, as it was giving a different
exception due to this change. This problem, has been solved in the original
globalization PR
2018-07-26 21:55:06 -04:00
Angel Perez
26965b43ee Clean I18n codebase 2018-07-26 19:06:29 -04:00
Raúl Fuentes
6d6dc32c38 Complete basic I18n backend and frontend 2018-07-26 19:06:19 -04:00
Raúl Fuentes
c18479e3ac Add translations management pages
In the admin section of the application, a new page
has been added so that the admins are able to manage
the selected texts for translate.

The texts have been divided in different "sections",
depending on the nature of themselves (budgets, polls,
proposals, management, etc.). Each section has become a tab
with a form associated to edit all the texts for her.

When a language is added, it's added for ALL the texts in the
application. That means that, if an admin adds french for debates,
the french form will appear for the rest of the texts. That doesn't
mean that they need to fill all the texts, only that the languages
work for all of them instead of individually.
2018-07-26 19:05:58 -04:00
Ziyan Junaideen
a6bbf32b8e Content blocks - new keys 2018-07-26 22:55:49 +05:30
Ziyan Junaideen
5b6a6b5324 Changed keys for locations 2018-07-26 22:55:49 +05:30
Ziyan Junaideen
1c818850d2 Content blocks for navigation 2018-07-26 22:55:49 +05:30
decabeza
69d67940d3 Removes unnecesary scope 2018-07-26 17:55:06 +02:00
decabeza
786a3949fd Moves moderate_system_email from private method 2018-07-26 17:55:06 +02:00
María Checa
9d580e15f5 Adds activity tab for system emails 2018-07-26 17:55:06 +02:00
María Checa
f1e7b634ba Adds moderate actions to proposal system notifications 2018-07-26 17:55:06 +02:00
María Checa
b7a1599fdf Adds logic to send proposal notifications in batches
WIP batches tests
2018-07-26 17:55:06 +02:00