Lock operation buttons on main view if environment is locked

This commit will lock the add/delete instance buttons if the environment
is locked. Before, a user could select these operations and it would
seem like they would go through, but since the environment was locked
the action never happens. This commit locks those buttons to prevent
user confusion.