Javi Martín
7ca55c44e0
Apply Rails/SaveBang rubocop rule
...
Having exceptions is better than having silent bugs.
There are a few methods I've kept the same way they were.
The `RelatedContentScore#score_with_opposite` method is a bit peculiar:
it creates scores for both itself and the opposite related content,
which means the opposite related content will try to create the same
scores as well.
We've already got a test to check `Budget::Ballot#add_investment` when
creating a line fails ("Edge case voting a non-elegible investment").
Finally, the method `User#send_oauth_confirmation_instructions` doesn't
update the record when the email address isn't already present, leading
to the test "Try to register with the email of an already existing user,
when an unconfirmed email was provided by oauth" fo fail if we raise an
exception for an invalid user. That's because updating a user's email
doesn't update the database automatically, but instead a confirmation
email is sent.
There are also a few false positives for classes which don't have bang
methods (like the GraphQL classes) or destroying attachments.
For these reasons, I'm adding the rule with a "Refactor" severity,
meaning it's a rule we can break if necessary.
2019-10-23 14:39:31 +02:00
Javi Martín
031b5aba63
Remove unnecessary html_safe in paths
...
Paths are just regular strings with no HTML, so they don't need to be
marked as safe HTML.
2019-10-08 13:20:22 +02:00
Javi Martín
70a07c095f
Add and apply Style/BlockDelimiters rubocop rule
...
We were already using it most of the time, but there were a few places
were we used brackets for multiline blocks.
2019-10-05 14:44:14 +02:00
Javi Martín
daa86ca3fc
Apply Rails/RequestReferer rubocop rule
2019-09-10 21:43:39 +02:00
Javi Martín
f9ed186909
Add rubocop spacing rules
...
We were following these rules in most places; we just didn't define them
anywhere.
2019-09-10 21:04:56 +02:00
German Galia
9ce524e1f3
Create tracker rol
2019-06-12 16:23:40 +02:00
German Galia
9d1ca3bfd4
Report generation. Download csv
2019-06-12 10:17:31 +02:00
Julian Herrero
fb81f45a73
Fix redirect_to :back deprecation warning
2019-04-17 17:40:55 +02:00
Angel Perez
37aa082943
Fix redirect_to deprecation warning on Admin::Legislation::Processes controller
2019-04-17 17:40:55 +02:00
Julian Herrero
d24376f6ad
Use double quotes in controllers/
2019-03-13 22:19:49 +01:00
Alberto
f9476eaa6a
Merge pull request #3323 from consul/ui-fixes
...
[Backport] Fix UI details for a better UX and design
2019-02-20 14:37:46 +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
af9a2179eb
Reuse image attributes in legislation processes
...
It wasn't originally added because at the time legislation processes
didn't have images.
2019-02-19 19:57:27 +01:00
decabeza
33fabe18b8
Remove admin legislation processes past filter
2019-02-08 14:30:08 +01:00
decabeza
060a4c684f
Remove legislation processes next filter
2019-02-08 14:29:43 +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
Alberto
c297595e49
Merge branch 'master' into add_image_to_legislation_processes
2019-01-28 14:49:19 +01:00
Julian Herrero
33d6f6c18d
Sort Legislation Processes by descending start date
2019-01-22 18:51:22 +01:00
Manu
bd4e12112d
Add image to legislation processes and banner colors
2019-01-21 12:02:27 -05:00
Javi Martín
c5d32c5ab9
Manage progress bars in the admin area
2019-01-18 14:17:33 +01:00
dperez
bef404c443
add homepage for legislation processes
2018-12-15 18:04:24 +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
f1ccdb87b1
Fix removing an option for legislation questions
...
We were allowing the `_destroy` field for translations, but not for the
options themselves.
2018-10-22 16:36:17 +02:00
Javi Martín
6952c9c9db
Fix legislation options not being updated
...
We broke this behaviour by introducing translations and not allowing the
`id` parameter anymore.
2018-10-22 16:36:17 +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
9352585e14
Ease customization in processes controller
...
By extracting a method just for the allowed parameters, forks can
customize this method by reopening the class.
2018-10-18 16:52:40 +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
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
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
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
Angel Perez
f220c477c1
Remove proposals_description attr from Admin::Legislation::Processes module
2018-05-23 08:08:54 -04:00
Bertocq
118deb9fc4
Fix line lenght offenses at multiple controllers
2018-02-19 11:09:19 +01:00
rgarcia
644ea9629f
uses correct order for permitted params
2017-11-08 12:05:02 +01:00
rgarcia
f3831de31c
fixes typo introduced while fixing conflicts
2017-11-08 11:56:49 +01:00
Raimond Garcia
ad37606129
Merge branch 'master' into legislation-processes-documents
2017-11-08 11:31:09 +01:00
Manuel Ortega
97fb986626
Added documentable feature to legislation processes
2017-10-18 19:50:34 +02:00
María Checa
02fa3a83b5
Custom tags for Legislation Process available
...
Custom tags for Legislation Processes, editable in the admin section.
2017-09-22 17:16:04 +02:00
María Checa
c811fd46f0
Proposals description migration and form
...
- Added to legislation processes a new attribute called `proposals_description`.
- Then created new views to show a form for the `@process` to edit this attribute **from in the proposals section**.
- Completed translations for new views.
2017-09-13 15:48:07 +02:00
María Checa
f521a9023b
Added Proposal model to Legislation
...
This new Legislation::Proposal model inherits from the original Proposal, as it will behave in a very similar way.
2017-09-13 15:43:36 +02:00
María Checa
dc9fe973f4
Added proposals phase attributes to legislation processes form
...
Also added them to the list of accepted params and completed translations.
2017-09-13 12:33:16 +02:00
Bertocq
69f4e1c683
Fix all rubocop Metrics/LineLength issues (140+)
2017-07-10 13:22:49 +02:00
Eduardo Martinez Echevarria
dfa9c988ad
Add checkbox to set published in process admin management
2017-06-30 15:08:23 +02:00
Bertocq
73ff68815d
Update admin legislation process controller and form to allow enabling/disabling phase/publications
2017-06-13 23:50:12 +02:00