refactor attendances_controller and modfiy attendances index view