Javi Martín
58ad333791
Remove duplicate lines
2018-09-19 14:54:52 +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
Javi Martín
cc6da6be28
Fix inputs in legislation process translations
...
They were accidentally changed from `text_area` to `text_field` when
making them translatable.
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
ee15295f54
Add migration for all collaborative legislation translations
2018-09-19 14:54:24 +02:00
Raimond Garcia
c1d705ff30
Merge pull request #2910 from consul/backport-make-admin-notifications-translatable
...
[Backport] Make admin notifications translatable
2018-09-19 14:13:40 +02:00
Marko Lovic
0731b137cf
Add both English and Spanish translations to Admin Notification seeds
2018-09-19 12:15:45 +02:00
Marko Lovic
3be3b7342c
Reinstate deleted translations for seed Admin Notifications
...
These were removed in 5c726e0 , seemingly by mistake. The change
doesn't make sense in the context of the commit, and it breaks
the seed data.
2018-09-19 12:15:40 +02:00
Marko Lovic
f6749049c9
Make Admin Notifications translatable
2018-09-19 12:15:26 +02:00
Marko Lovic
5ff85d33d6
Fix submit button text for Admin Notifications admin form
...
In Madrid, the button text didn't change depending on whether the form
is for the "new" page or for the "edit" page.
In consul, the buttons texts were "create admin notification" and
"update admin notification" instead of "create notification" and "update
notification".
Also change translation key from "submit" to "submit_button" to
match other instances.
2018-09-19 12:05:18 +02:00
María Checa
eeb7463ff4
Merge pull request #2860 from consul/backport_1582-icon-polls
...
[Backport] Adds status icons on polls poll group
2018-09-18 12:42:37 +02:00
Raimond Garcia
71a537b4db
Merge pull request #2903 from consul/backport-refactor-translatable-specs
...
[Backport] Refactor translatable specs
2018-09-17 23:05:06 +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
0552616764
Use have_field to detect text input contents
...
Using `have_content` detected textareas, but not text input contents.
All credit to Marko (mlovic) for finding the issue and suggesting the
implemented solution.
2018-09-17 20:34:43 +02:00
Javi Martín
612fdb09dd
Share translatable specs
2018-09-17 20:34:43 +02:00
Javi Martín
726110c91e
Share Globalize JavaScript interface specs
2018-09-17 20:34:20 +02:00
Javi Martín
a64a290392
Extract commentable_path to an initializer
...
By doing so and including it in ActionDispatch::Routing::UrlFor, we make
it available in controllers, helpers and specs, and so we can remove the
duplication we had there with methods dealing with the same problem.
Even if monkey-patching is ugly, using a different module and executing
ActionDispatch::Routing::UrlFor.send(:include, MyModule) wouldn't make
the method available in the controller.
2018-09-17 20:28:55 +02:00
Raimond Garcia
b49b3ade68
Merge pull request #2881 from consul/dependabot/bundler/autoprefixer-rails-9.1.4
...
Bump autoprefixer-rails from 8.2.0 to 9.1.4
2018-09-17 19:09:20 +02:00
Raimond Garcia
34589443e3
Merge pull request #2884 from consul/dependabot/bundler/capistrano-rails-1.4.0
...
Bump capistrano-rails from 1.3.1 to 1.4.0
2018-09-17 19:08:58 +02:00
Raimond Garcia
14edf4b603
Merge pull request #2892 from consul/dependabot/bundler/mdl-0.5.0
...
Bump mdl from 0.4.0 to 0.5.0
2018-09-17 19:08:22 +02:00
Raimond Garcia
5aa84c139e
Merge pull request #2894 from consul/dependabot/bundler/unicorn-5.4.1
...
Bump unicorn from 5.4.0 to 5.4.1
2018-09-17 19:08:04 +02:00
Raimond Garcia
a160a9e694
Merge pull request #2895 from consul/dependabot/bundler/scss_lint-0.55.0
...
Bump scss_lint from 0.54.0 to 0.55.0
2018-09-17 19:07:39 +02:00
Raimond Garcia
cae210c155
Merge pull request #2887 from wairbut-m2c/backport/db_queries
...
[Backport] Replace `.all.each` with `.find_each` to reduce memory usage
2018-09-17 19:06:46 +02:00
Raimond Garcia
eb435930db
Merge pull request #2888 from wairbut-m2c/backport/test-suite-maintenance
...
[Backport] Test suite maintenance
2018-09-17 19:06:07 +02:00
Raimond Garcia
0b7eb35b22
Merge pull request #2896 from javierm/backport-refactor-translatable-shared-code
...
[Backport] Refactor code shared by admin-translatable resources
2018-09-17 18:26:55 +02:00
Raimond Garcia
b6602348e2
Merge pull request #2852 from tiagozini/fix-issue-2848
...
Fix bug in facebook share link
2018-09-17 18:23:29 +02:00
Raimond Garcia
12755b6446
Merge pull request #2900 from consul/smtp-configuration
...
Add placeholder configuration for SMTP
2018-09-14 18:13:41 +02:00
voodoorai2000
2892d0e1d5
Add placeholder configuration for SMTP
2018-09-13 20:38:42 +02:00
Javi Martín
f2bebca6be
Bring back and fix deleted test
...
It was removed in 755be96 because some tags were allowed, but we can
just update it to check it doesn't remove those tags.
2018-09-12 12:35:28 +02:00
Javi Martín
9cfa07ff1d
Remove unrelated schema changes
2018-09-12 12:35:28 +02:00
Javi Martín
f917f5eed9
Filter image tags everywhere except in custom pages
...
Allowing image tags everywhere makes us vulnerable to CSRF attacks.
2018-09-12 12:35:28 +02:00
Javi Martín
5faeefab2c
Show the image button only if editing admin pages
...
That's the only place where we need to attach images so far.
2018-09-12 12:35:28 +02:00
Javi Martín
43e83889ff
Simplify CKEditor authorization
...
We can use the `config.authorize_with` option, so we don't need to copy
the controller in order to load and authorize resource.
Besides, only administrators can upload images, so we don't need to
track the image's user id.
2018-09-12 12:35:28 +02:00
Javi Martín
7347874f4b
Remove inaccurate comment
...
It was automatically added by `rails g ckeditor:install`.
2018-09-12 12:35:28 +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
71ce7acc10
Restore deleted CKEditor config
...
Just so we can navigate throught git history faster:
* Introduced in 345e34d to avoid precompiling all CKEditor assets.
* Modified in 54c82a5 to avoid compiling assets during tests.
* Overwritten by `rails g ckeditor:install` in c0d6c0b.
2018-09-12 12:35:28 +02:00
Javi Martín
27155dd7d7
Fix typo
2018-09-12 12:35:28 +02:00
Javi Martín
9705360d98
Enable only a few headings in CKEditor
...
Allowing every format is way more than what we initially intended.
I've only added h2 and h3 because h1 is set somewhere else in the page
(like the title), and h4, h5 and h6 are usually not necessary.
2018-09-12 12:35:28 +02:00
Javi Martín
b6855b7140
Restore allowedContent line
...
We're not sure why it was removed, and we're using server-side
sanitizers to remove dangerous HTML.
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
Javi Martín
116bdebc96
Don't add CKEditor attachments to version control
2018-09-12 12:35:28 +02:00
Raúl Fuentes
bf0472fd58
Fix test
...
now the <a> tag is permited, also the list of allowed tags is in
the configuration of ckeditor4
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
88f0f14eab
Modify the configuration of ckeditor 4
...
add links, headers and images
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