Open ljm42 opened 4 years ago
This setting is persistent. If you hide/show the parents/statistics, the setting will be remembered for the next page.
We only have one settings for parents, and one for statistics - which is used on both individual and family lists.
We should tidy up this logic at the same time.
On a page like this: https://dev.webtrees.net/demo-dev/tree/demo/source/s3/1841%20Census%20of%20England which contains both the Individuals tab and the Families tab, there are two buttons with the id "btn-toggle-parents" and another two buttons with the id of "btn-toggle-statistics"
The buttons are generated by these two files:
https://github.com/fisharebest/webtrees/blob/b4139381fec9e3c79aec94d8de1067021b1a8c0d/resources/views/lists/individuals-table.phtml#L297
https://github.com/fisharebest/webtrees/blob/b4139381fec9e3c79aec94d8de1067021b1a8c0d/resources/views/lists/families-table.phtml#L273
One way to make those ids unique is to name them like this:
btn-toggle-parents-<?= e($table_id) ?>
andbtn-toggle-statistics-<?= e($table_id) ?>