1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-30 01:10:58 +01:00

Restored title for object handles

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
This commit is contained in:
Anh Nhan Nguyen 2013-04-11 08:15:31 -07:00 committed by epriestley
parent 5ea0873275
commit 1e1c99c97b
2 changed files with 15 additions and 1 deletions

View file

@ -7,6 +7,7 @@ final class PhabricatorObjectHandle {
private $type;
private $name;
private $fullName;
private $title;
private $imageURI;
private $timestamp;
private $status = PhabricatorObjectHandleStatus::STATUS_OPEN;
@ -60,6 +61,15 @@ final class PhabricatorObjectHandle {
}
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;
@ -171,10 +181,11 @@ final class PhabricatorObjectHandle {
$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) {
@ -187,6 +198,7 @@ final class PhabricatorObjectHandle {
array(
'href' => $this->getURI(),
'class' => $class,
'title' => $title,
),
$name);
}

View file

@ -271,6 +271,8 @@ final class PhabricatorObjectHandleData {
$handle->setComplete(true);
if (isset($statuses[$phid])) {
$handle->setStatus($statuses[$phid]->getTextStatus());
$handle->setTitle(
$statuses[$phid]->getTerseSummary($this->viewer));
}
$handle->setDisabled($user->getIsDisabled());