mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +01:00
Link proxy column headers on workboards to proxied projects
Summary: Ref T10010. Allows you to click "Milestone 99" to jump directly to that project. Test Plan: - Clicked milestone header, went to milestone. - Clicked normal column header, nothing happened. Wow! Reviewers: chad Reviewed By: chad Maniphest Tasks: T10010 Differential Revision: https://secure.phabricator.com/D15204
This commit is contained in:
parent
4974e8487b
commit
a45fe337a1
3 changed files with 46 additions and 1 deletions
|
@ -281,6 +281,13 @@ final class PhabricatorProjectBoardViewController
|
||||||
->setSubHeader($column->getDisplayType())
|
->setSubHeader($column->getDisplayType())
|
||||||
->addSigil('workpanel');
|
->addSigil('workpanel');
|
||||||
|
|
||||||
|
$proxy = $column->getProxy();
|
||||||
|
if ($proxy) {
|
||||||
|
$proxy_id = $proxy->getID();
|
||||||
|
$href = $this->getApplicationURI("view/{$proxy_id}/");
|
||||||
|
$panel->setHref($href);
|
||||||
|
}
|
||||||
|
|
||||||
$header_icon = $column->getHeaderIcon();
|
$header_icon = $column->getHeaderIcon();
|
||||||
if ($header_icon) {
|
if ($header_icon) {
|
||||||
$panel->setHeaderIcon($header_icon);
|
$panel->setHeaderIcon($header_icon);
|
||||||
|
|
|
@ -22,6 +22,7 @@ final class PHUIHeaderView extends AphrontTagView {
|
||||||
private $epoch;
|
private $epoch;
|
||||||
private $actionIcons = array();
|
private $actionIcons = array();
|
||||||
private $badges = array();
|
private $badges = array();
|
||||||
|
private $href;
|
||||||
|
|
||||||
public function setHeader($header) {
|
public function setHeader($header) {
|
||||||
$this->header = $header;
|
$this->header = $header;
|
||||||
|
@ -147,6 +148,15 @@ final class PHUIHeaderView extends AphrontTagView {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setHref($href) {
|
||||||
|
$this->href = $href;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHref() {
|
||||||
|
return $this->href;
|
||||||
|
}
|
||||||
|
|
||||||
protected function getTagName() {
|
protected function getTagName() {
|
||||||
return 'div';
|
return 'div';
|
||||||
}
|
}
|
||||||
|
@ -290,12 +300,25 @@ final class PHUIHeaderView extends AphrontTagView {
|
||||||
->setIcon($this->headerIcon);
|
->setIcon($this->headerIcon);
|
||||||
$left[] = $icon;
|
$left[] = $icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$header_content = $this->header;
|
||||||
|
|
||||||
|
$href = $this->getHref();
|
||||||
|
if ($href !== null) {
|
||||||
|
$header_content = phutil_tag(
|
||||||
|
'a',
|
||||||
|
array(
|
||||||
|
'href' => $href,
|
||||||
|
),
|
||||||
|
$header_content);
|
||||||
|
}
|
||||||
|
|
||||||
$left[] = phutil_tag(
|
$left[] = phutil_tag(
|
||||||
'span',
|
'span',
|
||||||
array(
|
array(
|
||||||
'class' => 'phui-header-header',
|
'class' => 'phui-header-header',
|
||||||
),
|
),
|
||||||
$this->header);
|
$header_content);
|
||||||
|
|
||||||
if ($this->subheader || $this->badges) {
|
if ($this->subheader || $this->badges) {
|
||||||
$badges = null;
|
$badges = null;
|
||||||
|
|
|
@ -9,6 +9,7 @@ final class PHUIWorkpanelView extends AphrontTagView {
|
||||||
private $headerActions = array();
|
private $headerActions = array();
|
||||||
private $headerTag;
|
private $headerTag;
|
||||||
private $headerIcon;
|
private $headerIcon;
|
||||||
|
private $href;
|
||||||
|
|
||||||
public function setHeaderIcon($icon) {
|
public function setHeaderIcon($icon) {
|
||||||
$this->headerIcon = $icon;
|
$this->headerIcon = $icon;
|
||||||
|
@ -49,6 +50,15 @@ final class PHUIWorkpanelView extends AphrontTagView {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setHref($href) {
|
||||||
|
$this->href = $href;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHref() {
|
||||||
|
return $this->href;
|
||||||
|
}
|
||||||
|
|
||||||
protected function getTagAttributes() {
|
protected function getTagAttributes() {
|
||||||
return array(
|
return array(
|
||||||
'class' => 'phui-workpanel-view',
|
'class' => 'phui-workpanel-view',
|
||||||
|
@ -85,6 +95,11 @@ final class PHUIWorkpanelView extends AphrontTagView {
|
||||||
$header->addActionIcon($action);
|
$header->addActionIcon($action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$href = $this->getHref();
|
||||||
|
if ($href !== null) {
|
||||||
|
$header->setHref($href);
|
||||||
|
}
|
||||||
|
|
||||||
$body = phutil_tag(
|
$body = phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
array(
|
array(
|
||||||
|
|
Loading…
Reference in a new issue