mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 11:30:55 +01:00
Add a coverImage field to PHUIObjectItemView
Summary: Allows setting of an image to a Workboard card. (Hides from regular view, just in case). Test Plan: Fake setting a Pholio Mock image. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15198
This commit is contained in:
parent
b287cdd9ba
commit
5523217fbb
4 changed files with 52 additions and 7 deletions
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
return array(
|
||||
'names' => array(
|
||||
'core.pkg.css' => 'c477bd31',
|
||||
'core.pkg.css' => 'a7d4cf8f',
|
||||
'core.pkg.js' => 'ef5e33db',
|
||||
'darkconsole.pkg.js' => 'e7393ebb',
|
||||
'differential.pkg.css' => '2de124c9',
|
||||
|
@ -143,7 +143,7 @@ return array(
|
|||
'rsrc/css/phui/phui-info-view.css' => '6d7c3509',
|
||||
'rsrc/css/phui/phui-list.css' => '9da2aa00',
|
||||
'rsrc/css/phui/phui-object-box.css' => '407eaf5a',
|
||||
'rsrc/css/phui/phui-object-item-list-view.css' => 'fe594a65',
|
||||
'rsrc/css/phui/phui-object-item-list-view.css' => '8f443e8b',
|
||||
'rsrc/css/phui/phui-pager.css' => 'bea33d23',
|
||||
'rsrc/css/phui/phui-pinboard-view.css' => '2495140e',
|
||||
'rsrc/css/phui/phui-profile-menu.css' => 'ab4fcf5f',
|
||||
|
@ -155,7 +155,7 @@ return array(
|
|||
'rsrc/css/phui/phui-timeline-view.css' => '2efceff8',
|
||||
'rsrc/css/phui/phui-two-column-view.css' => 'c75bfc5b',
|
||||
'rsrc/css/phui/workboards/phui-workboard.css' => 'b07a5524',
|
||||
'rsrc/css/phui/workboards/phui-workcard.css' => 'b4322ca7',
|
||||
'rsrc/css/phui/workboards/phui-workcard.css' => 'adf34f58',
|
||||
'rsrc/css/phui/workboards/phui-workpanel.css' => 'e1bd8d04',
|
||||
'rsrc/css/sprite-login.css' => '60e8560e',
|
||||
'rsrc/css/sprite-menu.css' => '9dd65b92',
|
||||
|
@ -819,7 +819,7 @@ return array(
|
|||
'phui-inline-comment-view-css' => '0fdb3667',
|
||||
'phui-list-view-css' => '9da2aa00',
|
||||
'phui-object-box-css' => '407eaf5a',
|
||||
'phui-object-item-list-view-css' => 'fe594a65',
|
||||
'phui-object-item-list-view-css' => '8f443e8b',
|
||||
'phui-pager-css' => 'bea33d23',
|
||||
'phui-pinboard-view-css' => '2495140e',
|
||||
'phui-profile-menu-css' => 'ab4fcf5f',
|
||||
|
@ -832,7 +832,7 @@ return array(
|
|||
'phui-timeline-view-css' => '2efceff8',
|
||||
'phui-two-column-view-css' => 'c75bfc5b',
|
||||
'phui-workboard-view-css' => 'b07a5524',
|
||||
'phui-workcard-view-css' => 'b4322ca7',
|
||||
'phui-workcard-view-css' => 'adf34f58',
|
||||
'phui-workpanel-view-css' => 'e1bd8d04',
|
||||
'phuix-action-list-view' => 'b5c256b8',
|
||||
'phuix-action-view' => '8cf6d262',
|
||||
|
|
|
@ -27,6 +27,7 @@ final class PHUIObjectItemView extends AphrontTagView {
|
|||
private $countdownNum;
|
||||
private $countdownNoun;
|
||||
private $launchButton;
|
||||
private $coverImage;
|
||||
|
||||
const AGE_FRESH = 'fresh';
|
||||
const AGE_STALE = 'stale';
|
||||
|
@ -150,6 +151,11 @@ final class PHUIObjectItemView extends AphrontTagView {
|
|||
return $this->imageIcon;
|
||||
}
|
||||
|
||||
public function setCoverImage($image) {
|
||||
$this->coverImage = $image;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setState($state) {
|
||||
$this->state = $state;
|
||||
switch ($state) {
|
||||
|
@ -720,16 +726,45 @@ final class PHUIObjectItemView extends AphrontTagView {
|
|||
$actions);
|
||||
}
|
||||
|
||||
return phutil_tag(
|
||||
$frame_content = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'phui-object-item-frame',
|
||||
'class' => 'phui-object-item-frame-content',
|
||||
),
|
||||
array(
|
||||
$actions,
|
||||
$image,
|
||||
$box,
|
||||
));
|
||||
|
||||
$frame_cover = null;
|
||||
if ($this->coverImage) {
|
||||
$cover_image = phutil_tag(
|
||||
'img',
|
||||
array(
|
||||
'src' => $this->coverImage,
|
||||
'class' => 'phui-object-item-cover-image',
|
||||
));
|
||||
|
||||
$frame_cover = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'phui-object-item-frame-cover',
|
||||
),
|
||||
$cover_image);
|
||||
}
|
||||
|
||||
$frame = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'phui-object-item-frame',
|
||||
),
|
||||
array(
|
||||
$frame_cover,
|
||||
$frame_content,
|
||||
));
|
||||
|
||||
return $frame;
|
||||
}
|
||||
|
||||
private function renderStatusIcon($icon, $label) {
|
||||
|
|
|
@ -56,6 +56,10 @@ ul.phui-object-item-list-view {
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
.phui-object-item-cover-image {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.phui-object-item-no-bar .phui-object-item-frame {
|
||||
border-width: 1px;
|
||||
}
|
||||
|
|
|
@ -100,6 +100,12 @@
|
|||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.phui-workcard .phui-object-item-cover-image {
|
||||
display: block;
|
||||
padding: 8px 8px 0 8px;
|
||||
width: 263px;
|
||||
}
|
||||
|
||||
|
||||
/* - Draggable Colors --------------------------------------------------------*/
|
||||
|
||||
|
|
Loading…
Reference in a new issue