1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

Check calendar is installed on profile

Summary: Fixes T6199, checks if Calendar is installed and displays if so.

Test Plan: Turned Calendar on and off, tested both layouts.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T6199

Differential Revision: https://secure.phabricator.com/D10574
This commit is contained in:
Chad Little 2014-09-26 09:28:37 -07:00
parent f605780893
commit 5f04bb6dd9
3 changed files with 17 additions and 4 deletions

View file

@ -93,7 +93,7 @@ return array(
'rsrc/css/application/ponder/feed.css' => 'e62615b6',
'rsrc/css/application/ponder/post.css' => 'ebab8a70',
'rsrc/css/application/ponder/vote.css' => '8ed6ed8b',
'rsrc/css/application/profile/profile-view.css' => 'b459416e',
'rsrc/css/application/profile/profile-view.css' => '28f433ef',
'rsrc/css/application/projects/project-icon.css' => 'c2ecb7f1',
'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733',
'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5',
@ -732,7 +732,7 @@ return array(
'phabricator-object-selector-css' => '029a133d',
'phabricator-phtize' => 'd254d646',
'phabricator-prefab' => 'bbae734c',
'phabricator-profile-css' => 'b459416e',
'phabricator-profile-css' => '28f433ef',
'phabricator-remarkup-css' => '45313445',
'phabricator-search-results-css' => 'f240504c',
'phabricator-shaped-request' => '7cbe244b',

View file

@ -133,11 +133,20 @@ final class PhabricatorPeopleProfileController
$crumbs->addTextCrumb($user->getUsername());
$crumbs->setActionList($actions);
$feed = $this->renderUserFeed($user);
$calendar = $this->renderUserCalendar($user);
$cal_class = 'PhabricatorCalendarApplication';
$classes = array();
$classes[] = 'profile-activity-view';
if (PhabricatorApplication::isClassInstalledForViewer($cal_class, $user)) {
$calendar = $this->renderUserCalendar($user);
$classes[] = 'profile-has-calendar';
$classes[] = 'grouped';
} else {
$calendar = null;
}
$activity = phutil_tag(
'div',
array(
'class' => 'profile-activity-view grouped'
'class' => implode($classes, ' '),
),
array(
$calendar,

View file

@ -30,6 +30,10 @@
}
.profile-activity-view .profile-feed {
margin-left: 16px;
}
.profile-activity-view.profile-has-calendar .profile-feed {
margin-left: 332px;
}