A phase-field model for liquid-vapor transitions induced by temperature and pressure