taitus
082cc41a1e
Allow admin set published_proposal field
2019-02-02 17:45:55 +01:00
taitus
7d910ed502
Fix wrong iteration.
...
Explained on Notes from PR
2019-02-02 17:19:46 +01:00
taitus
ead765a9c1
The value of cweek did not manage well the last week of the year
...
grouping_key_for method when params[:group] == "week" always returned "#{date.cweek}/#{date.year}" but that not always is true.
When a date belongs to the first_week/last_week of the year we have exceptions for example "31/12/2018". His cweek is equal to "1", old code returned "1/2018" value but correct result would be "1/2019".
2019-02-02 17:18:02 +01:00
taitus
aa908d8d60
Add progress tab as initial page on Dashboard.
2019-02-02 14:49:28 +01:00
decabeza
dfd4f60e15
Order admin poll list by starts_at date
2019-01-31 18:49:24 +01:00
decabeza
64cbed838a
Fix hound warnings
2019-01-31 17:23:45 +01:00
decabeza
e7fcf2ce35
Add select on cards form to select the number of columns
2019-01-31 17:06:01 +01:00
Julian Nicolas Herrero
0e9fd645e8
Merge pull request #3234 from consul/use_find_instead_of_find_by_id
...
[Backport] Use find instead of find_by_id
2019-01-30 19:46:22 +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
41fe1e3922
Merge pull request #3152 from NahiaSolutions/add_image_to_legislation_processes
...
Add image to legislation processes and banner colors
2019-01-29 16:06:54 +01:00
Alberto
bd4826b25e
Merge branch 'master' into add_cards_to_custom_pages
2019-01-28 14:49:39 +01:00
Alberto
c297595e49
Merge branch 'master' into add_image_to_legislation_processes
2019-01-28 14:49:19 +01:00
Julian Herrero
3bf2fa1b17
Add method find_by_slug_or_id to Sluggable module
...
Make it easier to find by slug or id for sluggable models. Will return
nil if resource is not found.
2019-01-25 09:08:28 +01:00
Julian Herrero
9a23393535
Use find instead of find_by_id
...
This method will raise an exception if resource is not found when
trying to call score_action on nil.
Prefer to raise a 404 HTML NotFound error instead.
2019-01-25 09:03:56 +01:00
Julian Herrero
23b6e38915
Remove unused before_action
2019-01-25 08:54:28 +01:00
Julian Herrero
0af5972d63
Use correct param in controller
2019-01-25 08:48:44 +01:00
rgarcia
dacc2d529d
Fix destroy document specs
...
We were linking to the document url itself, which does not have a route
associated and so the specs fails
With this commit we are using the correct path to the destroy action of
the DocumentsController.
We are also using the referrer instead of a params[:from] attribute, as
it avoids having to pass an extra parameter, making the code prettier
and it works the same way
2019-01-24 21:39:43 +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
2926e4e375
Fix managing widget cards for homepage
...
The condition `params[:page_id] != 0` didn't work properly when editing
the homepage because in that case the parameter was `nil`, and the line
`SiteCustomization::Page.find(@card.site_customization_page_id)` raised
an exception because it couldn't find a page with a `nil` ID.
Fixing the issue while maintaining the check against `0` lead to complex
code, and so allowing `nil` in the database and assuming cards with no
`site_customization_page_id` belonged in the homepage seemed to be the
easiest solution.
2019-01-21 10:40:14 -05:00
Javi Martín
9c050ca6bd
Extract method to redirect when managing cards
2019-01-21 10:40:04 -05:00
Javi Martín
8a643c72e7
Use I18n for card notice messages
2019-01-21 10:39:42 -05:00
Manu
bff3a3b379
use relation between cards and page models
2019-01-18 09:54:43 -05:00
Manu
7657a0e0b4
added i18n text to custom pages cards
2019-01-18 09:54:43 -05:00
Manu
2dd953bdfd
added hound corrections and removed wrong tables form the schema.rb
2019-01-18 09:54:43 -05:00
Manu
722a431b54
Add cards to custom pages
2019-01-18 09:54:43 -05:00
Javi Martín
c5d32c5ab9
Manage progress bars in the admin area
2019-01-18 14:17:33 +01:00
Javi Martín
4f25581636
Add progress bar polymorphic views
2019-01-18 14:17:29 +01:00
Javi Martín
f2210bc5b5
Update changelog for release 0.18.1
2019-01-17 13:17:38 +01:00
rogelio-o
f1bb1ff8de
Moves attributes to a concern.
2019-01-14 20:26:47 +01:00
rogelio-o
ea76179002
Solves #3153 . It refactors images attributes.
2019-01-12 17:42:55 +01:00
Anna Anks Nowak
3ab70ff0d8
Move validating params to model
2019-01-10 16:11:51 +01:00
Anna Anks Nowak
cb761c56c2
Fix issue with app crashing when sort_by param was incorrect
2019-01-10 16:11:51 +01:00
Anna Anks Nowak
2523775d9f
Make the conditional more readable temporarily
2019-01-10 15:35:54 +01:00
Anna Anks Nowak
9786b0bf7d
Rewrite sorting to support direction param [ #2931 ]
2019-01-10 15:34:33 +01:00
Julian Nicolas Herrero
cc288fcedd
Merge pull request #3167 from consul/backport-1793-cleanup_lines_controller
...
[Backport] Remove before action not used
2019-01-10 09:38:07 +01:00
Julian Nicolas Herrero
cd59f1b803
Merge pull request #3133 from consul/backport-1775-bug_management_create_investment_without_location
...
[Backport] Bug Management Cannot create Budget Investment without a map location
2019-01-09 18:02:53 +01:00
Julian Herrero
0858f4c6f4
cleanup (remove unused code)
2019-01-09 17:49:46 +01:00
Julian Nicolas Herrero
7ccab504f0
Merge pull request #3160 from consul/backport-1784-consistency_remove_semicolon_from_controllers
...
[Backport] Remove semicolons from controllers
2019-01-09 17:46:32 +01:00
Julian Nicolas Herrero
08a692341a
Merge pull request #3150 from consul/backport-1769-crud_budget_and_usa
...
[Backport] new CRUD budgets, content blocks and heading map
2019-01-09 17:35:46 +01:00
Julian Herrero
9a60135d9f
[Consistency] remove semicolons from controllers
2019-01-08 15:46:46 +01:00
María Checa
650fe2553e
Add default order for admin budget investments list
...
When there's no sorting option selected, by default it orders the investment list by supports and, for those with the same number of supports, by ID.
2019-01-02 12:52:28 +01:00
Julian Herrero
2081269a67
fix Hound violations
2019-01-02 10:46:31 +01:00
rgarcia
82a2dd622b
hotfix to load categories on error
2018-12-28 09:43:08 +01:00
Julian Herrero
bf7112f090
make parameter 'skip_map' accessible on creating an investment
2018-12-27 18:39:27 +01:00
Javi Martín
ee6ee3ca21
Update changelog for release 0.18
2018-12-27 12:29:21 +01:00
Javier Martín
e5cdda9d04
Merge pull request #3128 from consul/fix_valuation_with_no_budgets
...
Fix crash in valuation when there are no budgets
2018-12-21 19:21:51 +01:00
Javi Martín
b0f1b6245e
Simplify scope usage
...
Rails automatically calls the `id` method inside scopes and the variable
name makes more sense if it represents investments instead of the number
of investments.
2018-12-21 17:17:35 +01:00
Javi Martín
10e8117f83
Remove unnecessary line
...
We were assigning the same variable twice in a row, making the first
assignment useless.
2018-12-21 17:08:27 +01:00
decabeza
cf7155613e
Changes honeypot family name to address on users sign up form
2018-12-21 11:34:12 +01:00