'I would donate' refers to present or future time.
'I would have donated' refers to past time.
If I were rich, I would donate some money. (= I am not rich and I won't donate any money)
If I'd been rich, I would have donated some money. (= at that time in the past I wasn't rich, so I didn't donate any money.)
Does that help?