Page MenuHomePhabricator

D9514.id.diff
No OneTemporary

D9514.id.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -135,7 +135,7 @@
'rsrc/css/phui/phui-list.css' => '43ed2d93',
'rsrc/css/phui/phui-object-box.css' => 'ce92d8ec',
'rsrc/css/phui/phui-object-item-list-view.css' => '46e12abc',
- 'rsrc/css/phui/phui-pinboard-view.css' => '874c22f9',
+ 'rsrc/css/phui/phui-pinboard-view.css' => '32e8e1a9',
'rsrc/css/phui/phui-property-list-view.css' => '2f7199e8',
'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b',
'rsrc/css/phui/phui-spacing.css' => '042804d6',
@@ -764,7 +764,7 @@
'phui-list-view-css' => '43ed2d93',
'phui-object-box-css' => 'ce92d8ec',
'phui-object-item-list-view-css' => '46e12abc',
- 'phui-pinboard-view-css' => '874c22f9',
+ 'phui-pinboard-view-css' => '32e8e1a9',
'phui-property-list-view-css' => '2f7199e8',
'phui-remarkup-preview-css' => '19ad512b',
'phui-spacing-css' => '042804d6',
diff --git a/src/applications/macro/query/PhabricatorMacroSearchEngine.php b/src/applications/macro/query/PhabricatorMacroSearchEngine.php
--- a/src/applications/macro/query/PhabricatorMacroSearchEngine.php
+++ b/src/applications/macro/query/PhabricatorMacroSearchEngine.php
@@ -209,12 +209,8 @@
}
$item->setURI($this->getApplicationURI('/view/'.$macro->getID().'/'));
-
- $name = $macro->getName();
- if ($macro->getIsDisabled()) {
- $name = pht('%s (Disabled)', $name);
- }
- $item->setHeader($name);
+ $item->setDisabled($macro->getisDisabled());
+ $item->setHeader($macro->getName());
$pinboard->addItem($item);
}
diff --git a/src/applications/pholio/query/PholioMockSearchEngine.php b/src/applications/pholio/query/PholioMockSearchEngine.php
--- a/src/applications/pholio/query/PholioMockSearchEngine.php
+++ b/src/applications/pholio/query/PholioMockSearchEngine.php
@@ -123,15 +123,12 @@
foreach ($mocks as $mock) {
$header = 'M'.$mock->getID().' '.$mock->getName();
- if ($mock->isClosed()) {
- $header = pht('%s (Closed)', $header);
- }
-
$item = id(new PHUIPinboardItemView())
->setHeader($header)
->setURI('/M'.$mock->getID())
->setImageURI($mock->getCoverFile()->getThumb280x210URI())
->setImageSize(280, 210)
+ ->setDisabled($mock->isClosed())
->addIconCount('fa-picture-o', count($mock->getImages()))
->addIconCount('fa-trophy', $mock->getTokenCount());
diff --git a/src/view/phui/PHUIPinboardItemView.php b/src/view/phui/PHUIPinboardItemView.php
--- a/src/view/phui/PHUIPinboardItemView.php
+++ b/src/view/phui/PHUIPinboardItemView.php
@@ -6,6 +6,7 @@
private $uri;
private $header;
private $iconBlock = array();
+ private $disabled;
private $imageWidth;
private $imageHeight;
@@ -36,14 +37,24 @@
return $this;
}
+ public function setDisabled($disabled) {
+ $this->disabled = $disabled;
+ return $this;
+ }
+
public function render() {
$header = null;
if ($this->header) {
+ if ($this->disabled) {
+ $header_color = 'gradient-lightgrey-header';
+ } else {
+ $header_color = 'gradient-lightblue-header';
+ }
$header = phutil_tag(
'div',
array(
'class' => 'phui-pinboard-item-header '.
- 'sprite-gradient gradient-lightblue-header',
+ 'sprite-gradient '.$header_color,
),
phutil_tag('a', array('href' => $this->uri), $this->header));
}
@@ -96,10 +107,16 @@
$content);
}
+ $classes = array();
+ $classes[] = 'phui-pinboard-item-view';
+ if ($this->disabled) {
+ $classes[] = 'phui-pinboard-item-disabled';
+ }
+
return phutil_tag(
'div',
array(
- 'class' => 'phui-pinboard-item-view',
+ 'class' => implode(' ', $classes),
),
array(
$header,
diff --git a/webroot/rsrc/css/phui/phui-pinboard-view.css b/webroot/rsrc/css/phui/phui-pinboard-view.css
--- a/webroot/rsrc/css/phui/phui-pinboard-view.css
+++ b/webroot/rsrc/css/phui/phui-pinboard-view.css
@@ -76,3 +76,13 @@
.phui-pinboard-icon {
margin-right: 4px;
}
+
+.phui-pinboard-item-disabled .phui-pinboard-item-image-link img {
+ opacity: 0.25;
+}
+
+.phui-pinboard-item-disabled .phui-pinboard-item-header a {
+ color: {$greytext};
+ text-decoration: line-through;
+}
+

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 10, 10:51 PM (1 w, 17 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6752492
Default Alt Text
D9514.id.diff (4 KB)

Event Timeline