diff --git a/resources/celerity/map.php b/resources/celerity/map.php --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -9,7 +9,7 @@ 'names' => array( 'conpherence.pkg.css' => '2f25eb4f', 'conpherence.pkg.js' => '020aebcf', - 'core.pkg.css' => 'ac619266', + 'core.pkg.css' => '112931ab', 'core.pkg.js' => '2eeda9e0', 'dark-console.pkg.js' => '187792c2', 'differential.pkg.css' => 'fda9518d', @@ -146,7 +146,7 @@ 'rsrc/css/phui/phui-cms.css' => '8c05c41e', 'rsrc/css/phui/phui-comment-form.css' => '3c6679a3', 'rsrc/css/phui/phui-comment-panel.css' => 'ec4e31c0', - 'rsrc/css/phui/phui-crumbs-view.css' => '614f43cf', + 'rsrc/css/phui/phui-crumbs-view.css' => 'a6a337a4', 'rsrc/css/phui/phui-curtain-object-ref-view.css' => '51d93266', 'rsrc/css/phui/phui-curtain-view.css' => '68c5efb6', 'rsrc/css/phui/phui-document-pro.css' => 'b9613a10', @@ -838,7 +838,7 @@ 'phui-cms-css' => '8c05c41e', 'phui-comment-form-css' => '3c6679a3', 'phui-comment-panel-css' => 'ec4e31c0', - 'phui-crumbs-view-css' => '614f43cf', + 'phui-crumbs-view-css' => 'a6a337a4', 'phui-curtain-object-ref-view-css' => '51d93266', 'phui-curtain-view-css' => '68c5efb6', 'phui-document-summary-view-css' => 'b068eed1', diff --git a/src/applications/project/controller/PhabricatorProjectController.php b/src/applications/project/controller/PhabricatorProjectController.php --- a/src/applications/project/controller/PhabricatorProjectController.php +++ b/src/applications/project/controller/PhabricatorProjectController.php @@ -137,8 +137,8 @@ break; } } - - $crumbs->addTextCrumb($ancestor->getName(), $crumb_uri); + $archived = $ancestor->isArchived(); + $crumbs->addTextCrumb($ancestor->getName(), $crumb_uri, $archived); } } diff --git a/src/view/phui/PHUICrumbView.php b/src/view/phui/PHUICrumbView.php --- a/src/view/phui/PHUICrumbView.php +++ b/src/view/phui/PHUICrumbView.php @@ -4,6 +4,7 @@ private $name; private $href; + private bool $strikethrough = false; private $icon; private $isLastCrumb; private $workflow; @@ -54,6 +55,11 @@ return $this; } + public function setStrikethrough(bool $strikethrough) { + $this->strikethrough = $strikethrough; + return $this; + } + public function setIcon($icon) { $this->icon = $icon; return $this; @@ -90,6 +96,10 @@ ->setIcon($this->icon); } + if ($this->strikethrough) { + $classes[] = 'phui-crumb-strikethrough'; + } + // Surround the crumb name with spaces so that double clicking it only // selects the crumb itself. $name = array(' ', $this->name); diff --git a/src/view/phui/PHUICrumbsView.php b/src/view/phui/PHUICrumbsView.php --- a/src/view/phui/PHUICrumbsView.php +++ b/src/view/phui/PHUICrumbsView.php @@ -17,13 +17,15 @@ * * @param string Text of the crumb. * @param string? Optional href for the crumb. + * @param bool? Optional strikethrough (=inactive/disabled) for the crumb. * @return this */ - public function addTextCrumb($text, $href = null) { + public function addTextCrumb($text, $href = null, $strikethrough = false) { return $this->addCrumb( id(new PHUICrumbView()) ->setName($text) - ->setHref($href)); + ->setHref($href) + ->setStrikethrough($strikethrough)); } public function addCrumb(PHUICrumbView $crumb) { diff --git a/webroot/rsrc/css/phui/phui-crumbs-view.css b/webroot/rsrc/css/phui/phui-crumbs-view.css --- a/webroot/rsrc/css/phui/phui-crumbs-view.css +++ b/webroot/rsrc/css/phui/phui-crumbs-view.css @@ -71,6 +71,10 @@ margin: 0 4px; } +.phui-crumb-strikethrough > .phui-crumb-name { + text-decoration: line-through; +} + .device-phone .phui-crumb-icon { margin-left: 7px; }