This if...else pattern is used almost everywhere we put these buttons, shouldn't we just move all this into a helper method as well?

i.e. just make one helper method named something like: make_activate_deactivate_button which handles the if...else, and making the buttons?