Refactor resources view switcher. Add "grid" option to it