[FIX] web: makes last breadcrumb item clickable

clicking on last breadcrumb item should reload the current view
[FIX] web: fix various syntax problems in views.js

linting views.js revealed some problems.  Most of them minor, but
some of them more serious: redeclared variables in if clauses can
shadow the outer variable, or not.  It is fragile, and will cause bugs
if the code is refactored.