From 08bd383aaef35cdf3f88cfc01c001b88dd5a9214 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Wed, 10 Dec 2014 10:26:55 -0800 Subject: [PATCH] Add title to PHUIObjectItemView's name for hover display Summary: This adds back the title to the header link and scans through the codebase for instances where Test Plan: Tested as many ObjectItemLists as I could find (each app homepage), there may be outliers, but can resolve those individually. Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D10961 --- .../differential/view/DifferentialRevisionListView.php | 5 ++--- src/applications/flag/query/PhabricatorFlagSearchEngine.php | 3 ++- src/view/phui/PHUIObjectItemView.php | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/applications/differential/view/DifferentialRevisionListView.php b/src/applications/differential/view/DifferentialRevisionListView.php index a28e2f50c9..956819aead 100644 --- a/src/applications/differential/view/DifferentialRevisionListView.php +++ b/src/applications/differential/view/DifferentialRevisionListView.php @@ -121,9 +121,8 @@ final class DifferentialRevisionListView extends AphrontView { } $item->setObjectName('D'.$revision->getID()); - $item->setHeader(phutil_tag('a', - array('href' => '/D'.$revision->getID()), - $revision->getTitle())); + $item->setHeader($revision->getTitle()); + $item->setHref('/D'.$revision->getID()); if (isset($icons['draft'])) { $draft = id(new PHUIIconView()) diff --git a/src/applications/flag/query/PhabricatorFlagSearchEngine.php b/src/applications/flag/query/PhabricatorFlagSearchEngine.php index 132891d6da..e973fa428b 100644 --- a/src/applications/flag/query/PhabricatorFlagSearchEngine.php +++ b/src/applications/flag/query/PhabricatorFlagSearchEngine.php @@ -149,7 +149,8 @@ final class PhabricatorFlagSearchEngine $item = id(new PHUIObjectItemView()) ->addHeadIcon($flag_icon) - ->setHeader($flag->getHandle()->renderLink()); + ->setHeader($flag->getHandle()->getFullName()) + ->setHref($flag->getHandle()->getURI()); $item->addAction( id(new PHUIListItemView()) diff --git a/src/view/phui/PHUIObjectItemView.php b/src/view/phui/PHUIObjectItemView.php index 784342e953..389e2c1c81 100644 --- a/src/view/phui/PHUIObjectItemView.php +++ b/src/view/phui/PHUIObjectItemView.php @@ -329,6 +329,7 @@ final class PHUIObjectItemView extends AphrontTagView { array( 'href' => $this->href, 'class' => 'phui-object-item-link', + 'title' => ($this->href) ? $this->header : null, ), $this->header);