main.js: swap edit and view links in list view