Trash/Restore and Publish/Republish button logic