Commit Graph

187 Commits

Author SHA1 Message Date
decabeza
62490c4640 Adds custom javascripts folder 2018-09-26 12:34:16 +02:00
Javier Martín
ef0192c3ff Merge pull request #2912 from consul/backport-make-collaborative-legislation-translatable
Make collaborative legislation translatable
2018-09-24 17:45:59 +02:00
decabeza
a94591fe78 Loads custom fonts before default ones
Also includes a .keep file inside fonts/custom folder to track the directory by git
2018-09-21 13:46:50 +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
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
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
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
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
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
Pierre
88d857f50c Fix a misleading comment 2018-08-13 11:27:49 +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
Angel Perez
113981c573 Avoid unnecessary DB call on I18nTranslation initializer 2018-07-26 19:09:36 -04:00
Angel Perez
7255c6cb9b Fallback to default I18n value if translation is not available 2018-07-26 19:07:47 -04:00
Angel Perez
bc152acaf2 Don't evaluate a conditional and assign a variable on the same line 2018-07-26 19:06:44 -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
Javier Martín
54c82a53d7 Precompile CKEditor plugins in use.
As stated in #1196, compiling everything related to CKEditor made
compilations slower. However, not compiling any plugins meant Travis had
to compile them while running a test. It often resulted in a test
failing because the time Travis took to compile the plugins the
application uses exceeded Capybara's wait time.
2018-07-02 18:39:13 +02:00
Angel Perez
1cd47da9d4 Split routes into small files for easier customization (#1852) 2018-01-09 15:49:01 -04:00
rgarcia
56945d9bbe allows querying for a proposal's votes 2017-12-15 19:21:02 +01:00
Daniel
a715df3431 fix the warning of secret_key for devise 2017-11-15 08:10:14 -06:00
María Checa
841ef2a3a2 Merge branch 'master' into 1856-legislation_processes_proposals_phase 2017-10-09 17:19:07 +02:00
iagirre
4db2584f87 The tags are suggested based on the entries the user makes.
Cambios para hacer commit:
	modificado:    app/assets/javascripts/tag_autocomplete.js.coffee
	modificado:    app/assets/stylesheets/autocomplete_overrides.scss
	nuevo archivo: app/controllers/tags_controller.rb
	modificado:    app/models/abilities/common.rb
	modificado:    app/views/debates/_form.html.erb
	modificado:    app/views/proposals/_form.html.erb
	modificado:    config/initializers/acts_as_taggable_on.rb
	modificado:    config/routes.rb
	modificado:    spec/lib/acts_as_taggable_on_spec.rb
2017-09-21 18:21:45 +02:00
María Checa
ba041f90c8 Removed unnecessary parts in Legislation Proposals 2017-09-21 16:17:11 +02:00
María Checa
c1672bdbf4 Legislation proposals adaptation in some models and initializers 2017-09-19 10:10:10 +02:00
Bertocq
8b2b21c6d7 Remove Tolk, Crowdin substituted it
Why:

* Crowdin now hosts all consul translations publicly so anyone can contribute https://crowdin.com/project/consul/invite
* Crowdin makes easy for non-tech people to contribute, once we have a demo site we'll be able to offer "on site" translation
* If you still use Tolk, we recommend removing this commit (but adding tolk gem to ./Gemfile_custom file to avoid future merge conflicts)

How:

* Reverting changes introduced with 9610a6a933
2017-07-09 00:56:14 +02:00
Eduardo Martinez Echevarria
8dd52110db Use category scope instead of condition on kind on Tag 2017-06-23 17:34:55 +02:00
Eduardo Martinez Echevarria
debc98ac99 Add category scope and category? method to ActsAsTaggableOn::Tag 2017-06-23 17:34:55 +02:00
kikito
a580e60786 refactor public_for_api acts_as_taggable scopes 2017-06-13 16:14:24 +02:00
Alberto Miedes Garcés
9ec8b166d7 Use scopes for better query performance 2017-06-01 20:04:51 +02:00
Alberto Miedes Garcés
3c7f60d625 Fix initializer 2017-05-11 22:42:43 +02:00
Alberto Miedes Garcés
5d9054d284 Merge branch 'master' into api-dev-PRs
Conflicts:
	Gemfile.lock
	config/routes.rb
	db/dev_seeds.rb
	db/schema.rb
2017-05-11 21:59:42 +02:00
Alberto
6bbcc71ecb Merge branch 'master' into polls 2017-04-06 14:16:49 +02:00
Amaia Castro
5ee2c9efa0 Add telegram to footer and to social share button 2017-04-05 13:07:08 +02:00
Juanjo Bazán
d6cb76e491 removes not needed code
Kaminari has been updated
2017-04-03 12:30:57 +02:00
kikito
ba87eaa47c Moves Age calculation to a module instead of monkeypatching Date 2017-02-03 15:35:41 +01:00
kikito
3535cfc0d6 implements Date#age_in_years extension method 2017-02-03 12:46:07 +01:00
Alberto Miedes Garcés
073ce38a8d Improved API docs autogeneration 2017-01-27 12:39:44 +01:00
Alberto Miedes Garcés
4b7cebf686 Improved public_for_api scopes and corresponding specs 2017-01-26 18:29:59 +01:00
Alberto Miedes Garcés
5b7cbccd19 Merge branch 'master' into api-dev 2017-01-26 12:39:59 +01:00
Alberto Miedes Garcés
69fc161b83 Show taggings in API 2017-01-26 10:48:05 +01:00
Juanjo Bazán
238c01cecd Merge pull request #1345 from aspgems/bug_compile_ckeditor_locales
Fixes bug. Compiles all locales for ckeditor.
2017-01-13 11:49:58 +01:00
Juanma
119061bd4c Fixes bug. Compiles all locales for ckeditor. 2017-01-13 09:40:33 +01:00
Alberto Miedes Garcés
7a9373942a Testing GraphQL 1.3.0 in Travis 2017-01-12 20:11:47 +01:00
Alberto Miedes Garcés
d1f14ffb93 Simplify the way GraphQL 'resolve' is used 2017-01-12 19:51:58 +01:00
Raimond Garcia
f2dc822bfa Merge pull request #1334 from consul/budgets
WIP Budgets
2017-01-10 22:43:27 +01:00
rgarcia
0049b6154c testing devise mailer 2017-01-10 20:04:01 +01:00
Alberto Miedes Garcés
6940b90260 Add more fields to api.yml 2017-01-09 14:11:51 +01:00
Alberto Miedes Garcés
b0bd30e3d1 Move api config file parsing method into the ApiTypesCreator class 2017-01-09 13:36:53 +01:00