Skip to content

Commit

Permalink
Restored title for object handles
Browse files Browse the repository at this point in the history
Summary: I shouldn't delete code because it has no call-sites :P

Test Plan: Set my status to away, verified I got a hover title (no card).

Reviewers: vrana, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5662
  • Loading branch information
AnhNhan authored and epriestley committed Apr 11, 2013
1 parent 5ea0873 commit 1e1c99c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/applications/phid/PhabricatorObjectHandle.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ final class PhabricatorObjectHandle {
private $type;
private $name;
private $fullName;
private $title;
private $imageURI;
private $timestamp;
private $status = PhabricatorObjectHandleStatus::STATUS_OPEN;
Expand Down Expand Up @@ -60,6 +61,15 @@ public function getFullName() {
}
return $this->getName();
}

public function setTitle($title) {
$this->title = $title;
return $this;
}

public function getTitle() {
return $this->title;
}

public function setType($type) {
$this->type = $type;
Expand Down Expand Up @@ -171,10 +181,11 @@ public function renderLink($name = null) {
$name = $this->getLinkName();
}
$class = null;
$title = null;
$title = $this->title;

if ($this->status != PhabricatorObjectHandleStatus::STATUS_OPEN) {
$class .= ' handle-status-'.$this->status;
$title = $title ? $title : $this->status;
}

if ($this->disabled) {
Expand All @@ -187,6 +198,7 @@ public function renderLink($name = null) {
array(
'href' => $this->getURI(),
'class' => $class,
'title' => $title,
),
$name);
}
Expand Down
2 changes: 2 additions & 0 deletions src/applications/phid/handle/PhabricatorObjectHandleData.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ public function loadHandles() {
$handle->setComplete(true);
if (isset($statuses[$phid])) {
$handle->setStatus($statuses[$phid]->getTextStatus());
$handle->setTitle(
$statuses[$phid]->getTerseSummary($this->viewer));
}
$handle->setDisabled($user->getIsDisabled());

Expand Down

0 comments on commit 1e1c99c

Please sign in to comment.