Link account chips to owner search rather than user dashboard

Before user dashboards were supported in PG, account links navigated to
an owner query. When user dashboard support was added, account links
started redirecting to the user's dashboard (or the owner query if the
user was logged out).

With this change, account links always link to the owner query, but the
user header that appears over the results shows a link to that user's
dashboard if the viewer is logged in.

Bug: Issue 8237
Change-Id: If0edfb886755c9ae0bb82d990169d04b96bcd57e
diff --git a/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header.js b/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header.js
index dd3512a..d09e865 100644
--- a/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header.js
+++ b/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header.js
@@ -23,6 +23,16 @@
         observer: '_accountChanged',
       },
 
+      showDashboardLink: {
+        type: Boolean,
+        value: false,
+      },
+
+      loggedIn: {
+        type: Boolean,
+        value: false,
+      },
+
       /**
        * @type {?{name: ?, email: ?, registered_on: ?}}
        */
@@ -64,5 +74,15 @@
     _computeStatusClass(accountDetails) {
       return this._computeDetail(accountDetails, 'status') ? '' : 'hide';
     },
+
+    _computeDashboardUrl(accountDetails) {
+      if (!accountDetails || !accountDetails.email) { return null; }
+      return Gerrit.Nav.getUrlForUserDashboard(accountDetails.email);
+    },
+
+    _computeDashboardLinkClass(showDashboardLink, loggedIn) {
+      return showDashboardLink && loggedIn ?
+          'dashboardLink' : 'dashboardLink hide';
+    },
   });
 })();