Raimond Garcia
710e5ae965
Merge pull request #2949 from consul/i18n-language-names
...
Display language name or language key
2018-10-10 11:45:04 +02:00
voodoorai2000
0a0261900c
Display language name or language key
...
There where two issues with the current implementation:
- There was a possible duplication between looking up the language name in key "locale" and in key "i18n.language.name"
- The "default" option was not being picked up, as the fallback always returned the default locale's translation, "English"
With this implementation there is only a single place to put the language name: i18n.language.name. I think this place is easier to find and understand for Crowdin translators than a "locale" key hidden in general.yml
If the translation is not found we display the language key, instead of English, which makes more sense to me too 😌
Solution based on recent comments[1] on a related I18n issue
[1] https://github.com/svenfuchs/i18n/issues/365#issuecomment-419263847
2018-10-05 18:08:41 +02:00
decabeza
0d8c9c289a
Removes closed message on legislation proposals votes
2018-10-04 16:32:32 +02:00
Javi Martín
0945f046a3
Avoid using xpath in specs
...
Using xpath is usually harder to read and more fragile.
2018-10-04 16:31:00 +02:00
Javi Martín
4c84a3a854
Move logic from view to helper
2018-10-04 16:31:00 +02:00
Javi Martín
9c13f08c8e
Show selected legislation proposals by default
2018-10-04 16:31:00 +02:00
Javi Martín
8976280493
Order selected proposals by confidence score
...
The same way we order budget results.
2018-10-04 16:31:00 +02:00
Javi Martín
d9410a132a
Always show filters for legislation proposals
...
As done in the rest of the application: we show the filters even if
there isn't any data to display.
2018-10-04 16:31:00 +02:00
Javi Martín
2fb5fb5fb2
Add missing newline characters
2018-10-04 16:31:00 +02:00
Javi Martín
ec2b4fe7ff
Use %w[] instead of %w{}
...
As agreed when discussing our rubocop rules.
2018-10-04 16:30:59 +02:00
Javi Martín
d6ff7e0f3f
Simplify code
2018-10-04 16:29:01 +02:00
Javi Martín
dc9cf5da55
Order by supports in descending order
...
Just as we do with confidence score, and as admins expect when they
order by received supports: the ones with more supports appear first.
2018-10-04 16:29:01 +02:00
Javi Martín
75d1ab1e52
Use AJAX requests to select legislation proposals
...
Now the interface is more similar to the one in budget investments.
2018-10-04 16:29:01 +02:00
Javi Martín
667c2c82b5
Use toggle_select action for legislation proposals
...
The `update` action is usually expected to behave the same way it does
everywhere else, which is updating a record using the `params` hash.
The name `toggle_select` comes from the name we use in a similar
situation for budget investments.
2018-10-04 16:29:01 +02:00
Javi Martín
806b1fb3ca
Extract select proposal button into a partial
2018-10-04 16:29:01 +02:00
Javi Martín
9df201780d
Extract proposals table into a partial
2018-10-04 16:29:01 +02:00
Raúl Fuentes
05340e423c
Add select to Legislation::Proposals
...
Add admin interface for mark any proposal as selected
Add filter to public interface for selected proposals
2018-10-04 16:28:56 +02:00
voodoorai2000
422f3a5f47
Add tag filtering for legislation proposals
2018-10-04 15:43:41 +02:00
Javi Martín
acbf20c938
Extract partial for proposals content
2018-10-03 22:07:55 +02:00
Javi Martín
f93281fd02
Extract link text to a helper
...
This way we can use the same code in custom views which won't use the
same text.
2018-10-03 22:06:20 +02:00
Javi Martín
ec18743251
Authorize resource after authenticating user
...
Just like it's done everywhere else in the application. Not doing so
means users who aren't logged in receive a "you aren't authorized"
message when they try to create a new legislation proposal instead of
being redirected to the login page.
2018-10-03 22:06:20 +02:00
Javi Martín
5ab8587ad2
Use absolute translation paths
...
Using `t(.empty_proposals)` IMHO is a bit dangerous because we'd need to
change the locale files if we move the code to a partial or rename the
file.
2018-10-03 22:05:33 +02:00
María Checa
d73be15296
Added tests
2018-10-03 16:02:41 +02:00
María Checa
056086e81e
Allow admins to see legislation debates and proposals index
2018-10-03 16:02:12 +02:00
María Checa
6d5e1a075e
Allow admins to access Legislation::Proposal #show and Legislation::Process #proposals
2018-10-03 16:01:18 +02:00
Bertocq
df3df71a54
Force postgresql setseed value in correct range
...
This commit partially backports commit AyuntamientoMadrid@f038399 by
taking only the parts affecting code already in CONSUL's main
repository.
2018-10-03 13:46:32 +02:00
Bertocq
c04b0ceda4
Add pagination to legislation process proposals list
2018-10-03 13:46:32 +02:00
Bertocq
349abffb20
Add random order based on seed to legislation process proposals list
2018-10-03 13:40:59 +02:00
Bertocq
599ddf8f41
Create @proposal variable con process controller for proposals list that use random seed
2018-10-03 13:40:59 +02:00
Bertocq
4ab9b8b767
Move onto proposals method the random seed call
2018-10-03 13:40:59 +02:00
Bertocq
0cabede68c
Add random seed on Legislation Proposal controller for index
2018-10-03 13:40:59 +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
aa76251d1d
Adds image to legislation proposals views
2018-10-01 16:49:22 +02:00
decabeza
7c194f6042
Adds imageable to legislation proposals
2018-10-01 16:48:46 +02:00
decabeza
dd11a040a6
Adds setting to enable or disable help page
2018-09-28 18:59:28 +02:00
Papaya Labs
5a4b9b0810
Remove trailing whitespaces
2018-09-27 14:36:23 +02:00
Papaya Labs
914bfa645e
Updates translatable custom pages
2018-09-27 13:46:17 +02:00
Marko Lovic
86dbe799ba
Remove extra tag element from cards form
2018-09-26 16:09:09 +02:00
Javi Martín
5bb5cfa7fb
Make Widget::Card translatable
2018-09-26 16:09:09 +02:00
Alberto
35ebe79d26
Merge pull request #2921 from consul/custom-js
...
[Backport] Adds custom javascripts folder
2018-09-26 14:24:47 +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
decabeza
62490c4640
Adds custom javascripts folder
2018-09-26 12:34:16 +02:00
Raimond Garcia
1fbb428004
Merge pull request #2898 from papayalabs/2889-show-active-tab-in-custom-info-texts
...
Show active tab in custom info texts
2018-09-24 21:11:25 +02:00
Julian Herrero
4344165bce
change translatable form helper for cktext_area
2018-09-24 19:40:51 +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
Javier Martín
758d3f8541
Merge pull request #2911 from consul/backport-fix_time_related_specs
...
Fix time related specs
2018-09-24 17:43:22 +02:00
Julian Herrero
46030c72e8
remove unnecessary parameter
2018-09-21 20:53:20 +02:00
Julian Herrero
e6762d6bca
handle non-underscored locale names for cktext_area
2018-09-21 20:50:23 +02:00