Design an electronic circuit which will turn battery power on while main power is not working

Job ID: 31212404

Budget: $10 – $30 USD

I have a Raspberry PI and 12V LCD which is running with 12V adapter. I need to add battery functionality to the system using mosfets. When the adaptor is on, the circuit should block the battery power in order to save power on battery. When we disconnect the power adapter, the circuit must automatically put the battery power on. Important point, no relays should be used. I'm uploading the example circuit which I found (not sure if it works).

I don't have possibility to print the circuit, it is enough that I can have Fritz design and of course a proof that it works.