added model and controllers for resource_view and resource_record