Skip to content

Commit 1d939e0

Browse files
committed
Add project icon/type to Project Profile
Summary: Adds basic icon/type to header on Project profiles Test Plan: View different projects, see header. Mobile, Deskop, Tablet. {F1087460} Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15164
1 parent e433a09 commit 1d939e0

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

resources/celerity/map.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
'rsrc/css/application/policy/policy-transaction-detail.css' => '82100a43',
9494
'rsrc/css/application/policy/policy.css' => '957ea14c',
9595
'rsrc/css/application/ponder/ponder-view.css' => '7b0df4da',
96-
'rsrc/css/application/project/project-view.css' => 'c6387c87',
96+
'rsrc/css/application/project/project-view.css' => '99a5023b',
9797
'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733',
9898
'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5',
9999
'rsrc/css/application/releeph/releeph-request-differential-create-dialog.css' => '8d8b92cd',
@@ -843,7 +843,7 @@
843843
'policy-edit-css' => '815c66f7',
844844
'policy-transaction-detail-css' => '82100a43',
845845
'ponder-view-css' => '7b0df4da',
846-
'project-view-css' => 'c6387c87',
846+
'project-view-css' => '99a5023b',
847847
'releeph-core' => '9b3c5733',
848848
'releeph-preview-branch' => 'b7a6f4a5',
849849
'releeph-request-differential-create-dialog' => '8d8b92cd',

src/applications/project/controller/PhabricatorProjectProfileController.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,16 @@ public function handleRequest(AphrontRequest $request) {
1717
$project = $this->getProject();
1818
$id = $project->getID();
1919
$picture = $project->getProfileImageURI();
20+
$icon = $project->getDisplayIconIcon();
21+
$icon_name = $project->getDisplayIconName();
22+
$tag = id(new PHUITagView())
23+
->setIcon($icon)
24+
->setName($icon_name)
25+
->addClass('project-view-header-tag')
26+
->setType(PHUITagView::TYPE_SHADE);
2027

2128
$header = id(new PHUIHeaderView())
22-
->setHeader($project->getName())
29+
->setHeader(array($project->getName(), $tag))
2330
->setUser($viewer)
2431
->setPolicyObject($project)
2532
->setImage($picture)

webroot/rsrc/css/application/project/project-view.css

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@
77
padding-bottom: 64px;
88
}
99

10+
.project-view-header-tag {
11+
margin-left: 8px;
12+
font-size: {$normalfontsize};
13+
color: {$bluetext};
14+
font-family: {$fontfamily};
15+
font-weight: normal;
16+
}
17+
18+
.device-phone .project-view-header-tag {
19+
display: block;
20+
margin-left: -4px;
21+
}
22+
23+
.project-view-header-tag .phui-icon-view {
24+
color: {$bluetext};
25+
}
26+
1027
.phui-box.phui-box-grey.project-view-properties {
1128
margin: 0 16px 0 16px;
1229
padding: 4px 12px;
@@ -37,7 +54,7 @@
3754

3855
.project-view-feed .phui-header-header {
3956
font-size: {$biggerfontsize};
40-
margin-left: 4px;
57+
margin-left: 8px;
4158
}
4259

4360
.device-desktop .project-view-feed .phui-feed-story,

0 commit comments

Comments
 (0)