Bertocq
e35817f240
Add selected checkbox on admin investment form
2017-07-04 23:48:18 +02:00
Bertocq
39fa6ec2de
Increase admin investment feature to cover selected checkbox
2017-07-04 23:47:11 +02:00
Bertocq
28970c6701
Fix all Style/UnneededInterpolation rubocop issues and remove from rubocop_tod
2017-07-04 22:44:08 +02:00
Bertocq
4535fc9345
Create Sluggable concern, generates slug using name attribute before validation
...
Why:
* We need a way to generate a slug for a object given his name attribute value
How:
* A concern that generates the slug before validation
2017-07-04 18:40:54 +02:00
Bertocq
73e0a5a88d
Add to Budget Budget::Heading Budget::Group specs the sluggable shared example
...
Why:
* Those classes have a slug attribute that needs to be filled
How:
* Just adding the shared example to Budget model spec, and creating the model spec file for Heading and Group to include it as well
2017-07-04 18:40:54 +02:00
Bertocq
148b58f71d
Add sluggable shared example for Sluggable concern
...
Why:
* We need certain models that use a Sluggable to generate a slug based on name attribute on save
How:
* Creating a shared example that knows how to create a factory of the described class
* Checking in it that new objects of the described class get the correct slug
2017-07-04 18:40:01 +02:00
Bertocq
eb9d5b9b84
Add slug string column to Budget, Budget::Heading and Budget::Group
...
Why:
* We're still using id's on routes and other parts of the app, using slugs are more friendly and nice
How:
* Just a migration with a slug column with string type
2017-07-04 17:25:26 +02:00
Bertocq
9f38192e13
Remove unnecesary frozen_string_literal comment
2017-07-04 17:25:15 +02:00
Raimond Garcia
c5d2e83475
Merge pull request #1716 from MariaCheca/1647-locale_site_customization
...
Locale site customization
2017-07-04 12:55:21 +02:00
Raimond Garcia
e7e5b3c4a3
Merge branch 'master' into 1647-locale_site_customization
2017-07-04 12:11:07 +02:00
Raimond Garcia
92f2bd67b3
Merge pull request #1720 from consul/feature/1594#incompatible_investments
...
Incompatible investments
2017-07-04 12:10:19 +02:00
Bertocq
10b17eae8f
Update user budget's result feature spec to include incompatible ones
2017-07-04 02:14:54 +02:00
Bertocq
10c299d19f
Add to public Budget Results page winners, discarded and incompatible listing
2017-07-04 01:34:25 +02:00
Bertocq
e87073301d
Fix form js coffe data toggle-link helper function for toogle buttons
2017-07-04 01:34:25 +02:00
Bertocq
339597483e
Add incompatible scope to Budget Investment model
2017-07-04 01:34:25 +02:00
Bertocq
688ec05ea2
Replace winner column for incompatible on admin investment list filter by selected
2017-07-04 01:34:24 +02:00
Bertocq
646b3657ee
Add investment status on admin budget investment detail show page
2017-07-04 01:34:24 +02:00
Bertocq
afc77f68fb
Add incompatible checkbox on admin investment edit form
2017-07-04 01:34:24 +02:00
Bertocq
99052485fb
Recalculate heading winner investments when a winner is flagged as incompatible
2017-07-04 01:34:24 +02:00
Bertocq
640e0e1c2a
Use compatible filter when calculating budget heading winners
2017-07-04 01:34:24 +02:00
Bertocq
ed016d7afd
Add compatible scope to Budget Investment and use it on the winners scope
...
Why:
* Only compatible investments can be winners
How:
* Using the new column incompatible to filter compatible investments
2017-07-04 01:34:24 +02:00
Bertocq
9c157e25bb
Increase Admin Budget Investment edit to cover new incompatible checkbox edit
...
Why:
* Admins can now mark/unmark a investment as incompatible
How:
* With a new checkbox in the edit form and a section at the investment details view to show the current status
2017-07-04 01:34:22 +02:00
Bertocq
21864f3fb5
Increase Budget Result spec to check incompatible investments can't be winners
...
Why:
* A incompatible investment can't be chosen as a winner
* When a winner investment is marked as incompatible, winnersmust be recalculated and it can't be a winner
How:
* Increasing existing scenarios to include a incompatible investment
* Adding a new scenario where a winner investment gets flagged as incompatible
2017-07-03 15:59:01 +02:00
Bertocq
e8c6c6ad8c
Add incompatible boolean column to Budget Investments table and factory
2017-07-03 15:40:34 +02:00
Bertocq
c8b36719aa
Add missinng translation for admin budget investments winners filter label
2017-07-03 13:59:59 +02:00
María Checa
ecaf7192c5
Merge branch '1647-locale_site_customization' of https://github.com/MariaCheca/consul into 1647-locale_site_customization
2017-07-03 12:59:09 +02:00
María Checa
3e2cbabc9c
Locales helper improvement
...
Added a rescue block in `name_for_locale()` to ensure the application doesn't crash in case it receives an invalid locale.
2017-07-03 12:55:22 +02:00
María Checa
da2b55942a
Added specs for custom pages
...
New test to check pages are rendered in their matching locale.
2017-07-03 12:53:12 +02:00
Raimond Garcia
b3638e601b
Merge pull request #1715 from entantoencuanto/issue#1674-processes_controller_finder_compatibility
...
Avoid set_process on legislation/processes controller member actions
2017-07-03 12:07:58 +02:00
María Checa
599c805c77
Update schema.rb
2017-07-02 23:28:29 +02:00
María Checa
36d51b380b
Merge branch 'master' into 1647-locale_site_customization
2017-07-02 23:19:40 +02:00
María Checa
6f24c68ab5
Improved pages index
...
Locale can be seen as text instead of the code.
2017-07-02 23:12:47 +02:00
María Checa
67145c0771
Added new locales
2017-07-02 22:14:41 +02:00
María Checa
ff4455212f
Reverted unnecessary change
2017-07-02 22:14:33 +02:00
María Checa
dca346bd4c
Fixed tests
...
Added new custom pages attribute to tests to make them run properly.
2017-07-02 22:13:40 +02:00
María Checa
8894ec4f7c
Pages form improvements
...
Added `locale` validation to model and improved its form select tag performance.
2017-07-02 21:28:13 +02:00
María Checa
ed7b7f0361
Added scope to pages model
...
New scope to use when listing pages to show only the ones with current locale.
2017-07-02 14:54:11 +02:00
María Checa
f3b8d70d12
Added new locale to pages form
2017-07-02 14:50:57 +02:00
María Checa
720a2af046
Update pages controller and views
...
Added new attribute `locale` to pages index list and form.
2017-07-02 14:49:56 +02:00
María Checa
d5560ddabd
Created migration to add locale to site_customization_pages
2017-07-02 14:47:13 +02:00
Eduardo Martinez Echevarria
9324b02ce1
Avoid set_process on legislation/processes controller member actions
2017-07-01 12:39:16 +02:00
Bertocq
d31e0ed79b
Bring set_process back to legislation process controller, still needed until is correctly loaded
2017-07-01 02:05:57 +02:00
Raimond Garcia
d2ea4cac86
Merge pull request #1714 from entantoencuanto/issue#1674-enabled_legislation_process
...
Issue#1674 enabled legislation process
2017-06-30 18:24:59 +02:00
Bertocq
194d5de1b3
Fix english translation, was on spanish
2017-06-30 16:31:42 +02:00
Eduardo Martinez Echevarria
87fc8e8fdd
Update db/schema.rb
2017-06-30 15:49:10 +02:00
Eduardo Martinez Echevarria
331976e3b5
Make explicit the creation of legislation processes as published in db/seeds
2017-06-30 15:08:23 +02:00
Eduardo Martinez Echevarria
a599a0b91e
Set legislation processes visibility depending on publication
2017-06-30 15:08:23 +02:00
Eduardo Martinez Echevarria
0bc318c823
Add tests to check visibility of processes depending on published attribute
2017-06-30 15:08:23 +02:00
Eduardo Martinez Echevarria
3e5c5d7e49
Define some actions on legislation processes as member actions
2017-06-30 15:08:23 +02:00
Eduardo Martinez Echevarria
dfa9c988ad
Add checkbox to set published in process admin management
2017-06-30 15:08:23 +02:00