Commit Graph

2200 Commits

Author SHA1 Message Date
Alberto
f9b18667e6 Merge pull request #3280 from consul/next-filters
[Backport] Removes next/incoming filters
2019-02-11 20:43:09 +01:00
taitus
9fac661f0c Create scope by_proposal
Add to active_for class method and to active_resources controller method the new scope by_proposal.
 - Published proposal: display all actions.
 - Draft proposal: only display actions for draft proposals.
2019-02-10 00:18:50 +01:00
decabeza
060a4c684f Remove legislation processes next filter 2019-02-08 14:29:43 +01:00
decabeza
bc1679550b Remove incoming polls filter 2019-02-08 14:28:19 +01:00
Julian Herrero
54e59a8a58 LegacyLegislation migration cleanup
These legacy models are not used anymore.
2019-02-06 17:07:38 +01:00
decabeza
eb169ca435 Add models tag spec with 160 chars 2019-02-05 17:41:00 +01:00
decabeza
5409db6c55 Show only selected investments on map from publishing prices phase
If there are no selected investements show all investments on map.
2019-02-05 14:01:27 +01:00
taitus
054bbc5d7b Allow zip, png and jpeg on dashboard action. 2019-02-02 15:30:33 +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
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
decabeza
483182ceed Refactor scopes on site customization page model 2019-01-30 18:03:58 +01:00
decabeza
41f9ef167d Refactor hexadecimal color validation 2019-01-30 13:17:04 +01:00
decabeza
2695e19e2f Fix hound warnings 2019-01-29 17:54:02 +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
ebe5bf13e7 Merge pull request #3149 from NahiaSolutions/add_cards_to_custom_pages
Add cards to custom pages
2019-01-29 16:05:47 +01:00
Alberto
78479ff0e7 Merge pull request #3228 from consul/milestones_public_progress_bar
[Backport] Add progress bars to milestones public view
2019-01-29 14:12:08 +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
8f112cf37e Allow admins delete poll answer documents 2019-01-24 19:19:04 +01:00
Javi Martín
e73f3bd97a Add progress bars to milestones public view 2019-01-24 17:33:34 +01:00
decabeza
045c4eca64 Allow change map image from admin site customization
Also adds on site customization image.rb jpeg content type to allow replace this image.
2019-01-24 14:55:01 +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
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
Manu
5627d2cf23 added associations between cards and pages models 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
eaea95ccfb Add progress bar model 2019-01-18 14:17:12 +01:00
decabeza
73637de0d0 Adds homepage phase and tab to legislation processes show 2019-01-15 16:13:38 +01:00
Javi Martín
f8e9566699 Simplify return statement
Just the way is usually done in the rest of the code.
2019-01-10 16:11:51 +01:00
Javi Martín
d5d800f75c Simplify SORTING_OPTIONS usage
Using a hash instead of an array of hashes makes accessing its keys and
values much easier.
2019-01-10 16:11:51 +01:00
Anna Anks Nowak
e88acb8905 Make params handling case insensitive 2019-01-10 16:11:51 +01:00
Anna Anks Nowak
e264490bca Styling and refactor sorting methods and helpers 2019-01-10 16:11:51 +01:00
Anna Anks Nowak
3ab70ff0d8 Move validating params to model 2019-01-10 16:11:51 +01:00
Anna Anks Nowak
37b2226432 Make the link_to helper more readable 2019-01-10 16:11:51 +01:00
Anna Anks Nowak
101292d303 Rename allowed sort option variable 2019-01-10 16:11:51 +01:00
Anna Anks Nowak
35cebe0eef Use symbols in sorting and set direction properly 2019-01-10 15:35:54 +01:00
Anna Anks Nowak
12484ed4fd Change SORTING_OPTIONS to has 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
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
Javier Martín
90a66239a5 Merge pull request #3151 from consul/backport-fix_admin_investments_default_order
Add default order for admin budget investments list
2019-01-09 15:46:52 +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
c5a7492128 add some improvements on budget headings
Show information about longitude and latitude in a budget heading
Show information about custom content in a budget heading
Fix render of map (zoom scrollable and points clickable)
Fix typo in app/models/map_location.rb
2019-01-02 10:46:46 +01:00
decabeza
dd8e2d6311 Shows participation phases only if there is a phase enabled 2018-12-28 18:23:08 +01:00
Raimond Garcia
a8de5306c8 Merge pull request #3091 from dpgigorro/2791-homepage-for-legislation-process
add homepage for legislation processes
2018-12-19 11:14:24 +01:00
Javier Martín
4782ca37d6 Merge pull request #3111 from consul/backport-customize_toda_la_ciudad
Remove custom "toda la ciudad" code
2018-12-18 13:03:51 +01:00
Julian Nicolas Herrero
2175339609 Merge pull request #3106 from consul/2918-crud_budget_groups_headings
Change CRUD for budget groups and headings
2018-12-18 10:23:24 +01:00