Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13997310
D9514.id22799.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D9514.id22799.diff
View Options
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' => 'a843f1b0',
'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' => 'a843f1b0',
'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,10 +209,11 @@
}
$item->setURI($this->getApplicationURI('/view/'.$macro->getID().'/'));
+ $item->setDisabled($macro->getisDisabled());
$name = $macro->getName();
if ($macro->getIsDisabled()) {
- $name = pht('%s (Disabled)', $name);
+ $name = pht('[Disabled] %s', $name);
}
$item->setHeader($name);
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
@@ -124,14 +124,14 @@
$header = 'M'.$mock->getID().' '.$mock->getName();
if ($mock->isClosed()) {
- $header = pht('%s (Closed)', $header);
+ $header = pht('[Closed] %s', $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,7 @@
.phui-pinboard-icon {
margin-right: 4px;
}
+
+.phui-pinboard-item-disabled .phui-pinboard-item-image-link img {
+ opacity: 0.25;
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 25, 3:38 AM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6747786
Default Alt Text
D9514.id22799.diff (4 KB)
Attached To
Mode
D9514: Add setDisabled to pinboard view
Attached
Detach File
Event Timeline
Log In to Comment