Update UI and fix navigation for agreement search and public view.
Add js for publicview because it didn't save before my last commit.