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
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
Julian Herrero
8e0bbf54f6
Replace harcoded images and documents settings
2019-06-04 11:50:09 +02:00
German Galia
4f50e67ac3
Collaborative legislation summary
2019-06-03 12:34:25 +02:00
decabeza
5bdac5c4f5
Remove question and external_url fields from legislation proposals
2019-04-30 11:35:47 +02:00
Angel Perez
01c1ac2b10
Replace all occurrences of ActiveRecord::Base with ApplicationRecord
2019-04-17 17:40:56 +02:00
Juanjo Bazán
7ab602175a
makes models inherit from ApplicationRecord
2019-04-17 17:40:56 +02:00
Javi Martín
4c35df4812
Use double quotes inside string interpolation
2019-03-25 14:58:54 +01:00
Julian Herrero
3ba961a2d7
Use double quotes in models
2019-03-14 17:25:43 +01:00
Javier Martín
9fd3c4fb1c
Merge pull request #3321 from consul/backport-fix_random_order
...
Fix random proposals order in the same session
2019-02-26 14:09:24 +01:00
decabeza
0d834744fd
Replace open to active filter on admin legislation processes index
...
Now active filter show open processes and the next ones, processes with a start date greather than current date.
2019-02-20 13:32:09 +01:00
Javi Martín
e3ca700e17
Add concerns to set and order by a random seed
2019-02-20 11:51:32 +01:00
Javi Martín
660c59016b
Fix random proposals order in the same session
...
Using `setseed` and ordering by `RAND()` doesn't always return the same
results because, although the generated random numbers will always be
the same, PostgreSQL doesn't guarantee the order of the rows it will
apply those random numbers to, similar to the way it doesn't guarantee
an order when the `ORDER BY` clause isn't specified.
Using something like `reorder("legislation_proposals.id % #{seed}")`,
like we do in budget investments, is certainly more elegant but it makes
the test checking two users get different results fail sometimes, so
that approach might need some adjustments in order to make the results
more random.
2019-02-20 11:51:32 +01:00
decabeza
6b62ba0e91
Show cached_votes_score on admin legislation proposals
2019-02-12 18:42:44 +01:00
decabeza
0ae1cdfc8c
Replace total votes to cached_votes_score on legislation proposals
...
This show votes_score as result of votes_up minus votes_down
2019-02-12 18:42:41 +01:00
decabeza
060a4c684f
Remove legislation processes next filter
2019-02-08 14:29:43 +01:00
Alberto
9475a0c6ee
Merge pull request #3249 from consul/custom-pages
...
Refactor processes header colors and custom pages
2019-01-30 20:05:20 +01:00
decabeza
41f9ef167d
Refactor hexadecimal color validation
2019-01-30 13:17:04 +01:00
Julian Nicolas Herrero
81b65ec821
Merge pull request #3202 from consul/sort_legislation_processes_by_start_date
...
Sort Legislation Processes by descending start date
2019-01-29 17:30:02 +01:00
Julian Herrero
33d6f6c18d
Sort Legislation Processes by descending start date
2019-01-22 18:51:22 +01:00
Manu
b462b7131e
validations were added for the process banner
2019-01-21 12:02:27 -05:00
Manu
bd4e12112d
Add image to legislation processes and banner colors
2019-01-21 12:02:27 -05:00
decabeza
73637de0d0
Adds homepage phase and tab to legislation processes show
2019-01-15 16:13:38 +01:00
decabeza
dd8e2d6311
Shows participation phases only if there is a phase enabled
2018-12-28 18:23:08 +01:00
dperez
bef404c443
add homepage for legislation processes
2018-12-15 18:04:24 +01:00
Alberto
b701a86c1b
Merge pull request #3105 from consul/draft-processes
...
[Backport] Draft phase on legislation processes
2018-12-13 15:53:11 +01:00
Julian Nicolas Herrero
1be64a5dc3
Merge pull request #3098 from consul/backport-1742-new_most_active_algorithm
...
[Backport] New algorithm for filter 'most active'
2018-12-13 12:46:18 +01:00
Julian Herrero
ef835bef1c
new algorithm for filter 'most active'
2018-12-13 11:42:22 +01:00
decabeza
534ef9c492
Hides process on index if draft dates match with date current
2018-12-12 18:23:17 +01:00
decabeza
df221b43a0
Fixes hound warnings on legislation processes
2018-12-12 18:23:11 +01:00
Javi Martín
a42f5fab37
Add milestones summary to legislation processes
2018-12-11 20:19:48 +01:00
Javi Martín
03dc43a500
Manage legislation process milestones
2018-12-11 20:18:53 +01:00
João Lutz
34b58a5208
Adds draft phase functionality in legislation processes
2018-11-19 22:18:50 -02:00
Javi Martín
5e8746f026
Remove question option uniqueness validation
...
Having translations makes this validation too complex and not worth the
effort, since now we can't just scope in a single column but we need to
scope in the translations locale and the question ID.
2018-10-22 16:36:18 +02:00
Javi Martín
863b326142
Validate both the model and its translations
...
This way we guarantee there will be at least one translation for a model
and we keep compatibility with the rest of the application, which
ideally isn't aware of globalize.
2018-10-22 16:30:28 +02:00
Javi Martín
2ab49a1832
Refactor globalize models code using a concern
...
I've chosen the name "Globalizable" because "Translatable" already
existed.
2018-10-22 16:28:53 +02:00
Javi Martín
85701bd754
Update legislation questions translatable fields
2018-10-22 15:46:24 +02:00
Javi Martín
5bfc7ca2e3
Update legislation process translatable fields
2018-10-22 15:46:16 +02:00
Javi Martín
6278175f57
Update legislation drafts translatable fields
...
Updating it required reorganizing the form so translatable fields are
together.
We also needed to add a `hint` option to the form label and input
methods so the hint wouldn't show up for every language.
Finally, the markdown editor needed to use the same globalize attributes
as inputs, labels and hints, which adds a bit of duplication.
2018-10-22 15:44:14 +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
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
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
decabeza
7c194f6042
Adds imageable to legislation proposals
2018-10-01 16:48:46 +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