Also javascript validations was added to the person new/edit form (using the abide component from foundation)
It adds a field to set manually the update date
How
At first the routes was changed from person to the admin/person section
Then the functions from the controllers, there was added 2 scopes to the person model and record_timestamps set to false to permit the manual edition of updated at (requested here)
At last the views was moved to the new location, there was added an index.html for the people
and the logic wich creates the empty OpenStructs for the person form was moved to a helper
Screenshots
Delete and create person
Edit person
Hide and unhide person
Test
Added test to cover all the new features and changes
Deployment
No
Warnings
I have noticed that when a person has councillor as selected job and none party has been selected an error happens on the public councillors view, the people list is grouped by party in the controller. ¿Should I add a validation to prevent this to happen on this Issue or is better to do it in a posterior PR?
:warning: This PR shouldn't be merged, its only the second one of five and each one will be built form the previous one. It's intended to split and clarify the total solution for the issue wich is pretty big and complicated to be in a single PR :warning:
Coverage increased (+0.3%) to 91.612% when pulling d937e2a3debb7a714d4161e20ce62e97dbba77c7 on wairbut-m2c:move_person_modification_options_to_admin_section into 1e0ffeb30d1bb8db07b2daa6278927e91bda9c72 on AyuntamientoMadrid:master.
Where
What
How
Screenshots
Delete and create person
Edit person
Hide and unhide person
Test
Deployment
Warnings