Move js to controller and add support for disabling block view