Revert "Revert "Merge pull request #735 from geoadmin/dev_accordion_state""

This reverts commit 932d0a9154710d1ce19134235bc24b4785493fb4.
Move accordion stuff in the MainController