Add buttons for document state

It resolves #50