mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-15 01:50:55 +01:00
(stable) Promote 2017 Week 10
This commit is contained in:
commit
ae5f797c4d
39 changed files with 664 additions and 132 deletions
|
@ -9,7 +9,7 @@ return array(
|
|||
'names' => array(
|
||||
'conpherence.pkg.css' => '6875302f',
|
||||
'conpherence.pkg.js' => '6249a1cf',
|
||||
'core.pkg.css' => '52a77c4d',
|
||||
'core.pkg.css' => '35645dec',
|
||||
'core.pkg.js' => '1fa7c0c5',
|
||||
'darkconsole.pkg.js' => 'e7393ebb',
|
||||
'differential.pkg.css' => '90b30783',
|
||||
|
@ -96,7 +96,7 @@ return array(
|
|||
'rsrc/css/application/policy/policy-transaction-detail.css' => '82100a43',
|
||||
'rsrc/css/application/policy/policy.css' => '957ea14c',
|
||||
'rsrc/css/application/ponder/ponder-view.css' => 'fbd45f96',
|
||||
'rsrc/css/application/project/project-card-view.css' => '77219296',
|
||||
'rsrc/css/application/project/project-card-view.css' => '1be8c87b',
|
||||
'rsrc/css/application/project/project-view.css' => '792c9057',
|
||||
'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733',
|
||||
'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5',
|
||||
|
@ -108,7 +108,7 @@ return array(
|
|||
'rsrc/css/application/tokens/tokens.css' => '3d0f239e',
|
||||
'rsrc/css/application/uiexample/example.css' => '528b19de',
|
||||
'rsrc/css/core/core.css' => '9f4cb463',
|
||||
'rsrc/css/core/remarkup.css' => '4a2de2bb',
|
||||
'rsrc/css/core/remarkup.css' => '2d793c5b',
|
||||
'rsrc/css/core/syntax.css' => '769d3498',
|
||||
'rsrc/css/core/z-index.css' => '5e72c4e0',
|
||||
'rsrc/css/diviner/diviner-shared.css' => '896f1d43',
|
||||
|
@ -128,26 +128,26 @@ return array(
|
|||
'rsrc/css/phui/object-item/phui-oi-flush-ui.css' => '9d9685d6',
|
||||
'rsrc/css/phui/object-item/phui-oi-list-view.css' => '5c383524',
|
||||
'rsrc/css/phui/object-item/phui-oi-simple-ui.css' => 'a8beebea',
|
||||
'rsrc/css/phui/phui-action-list.css' => 'f980c059',
|
||||
'rsrc/css/phui/phui-action-list.css' => 'c01858f4',
|
||||
'rsrc/css/phui/phui-action-panel.css' => '91c7b835',
|
||||
'rsrc/css/phui/phui-badge.css' => '22c0cf4f',
|
||||
'rsrc/css/phui/phui-basic-nav-view.css' => 'a0705f53',
|
||||
'rsrc/css/phui/phui-big-info-view.css' => 'bd903741',
|
||||
'rsrc/css/phui/phui-box.css' => '269cbc99',
|
||||
'rsrc/css/phui/phui-button.css' => '7eaff361',
|
||||
'rsrc/css/phui/phui-button.css' => '14bfba79',
|
||||
'rsrc/css/phui/phui-chart.css' => '6bf6f78e',
|
||||
'rsrc/css/phui/phui-cms.css' => '504b4b23',
|
||||
'rsrc/css/phui/phui-comment-form.css' => '48fbd65d',
|
||||
'rsrc/css/phui/phui-comment-panel.css' => 'f50152ad',
|
||||
'rsrc/css/phui/phui-crumbs-view.css' => 'b743f73e',
|
||||
'rsrc/css/phui/phui-crumbs-view.css' => '6ece3bbb',
|
||||
'rsrc/css/phui/phui-curtain-view.css' => '947bf1a4',
|
||||
'rsrc/css/phui/phui-document-pro.css' => 'f56738ed',
|
||||
'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf',
|
||||
'rsrc/css/phui/phui-document.css' => 'c32e8dec',
|
||||
'rsrc/css/phui/phui-feed-story.css' => '44a9c8e9',
|
||||
'rsrc/css/phui/phui-fontkit.css' => '0b2da2d5',
|
||||
'rsrc/css/phui/phui-fontkit.css' => 'b78a0059',
|
||||
'rsrc/css/phui/phui-form-view.css' => 'adca31ce',
|
||||
'rsrc/css/phui/phui-form.css' => '5815af7b',
|
||||
'rsrc/css/phui/phui-form.css' => 'b62c01d8',
|
||||
'rsrc/css/phui/phui-head-thing.css' => 'fd311e5f',
|
||||
'rsrc/css/phui/phui-header-view.css' => 'fef6a54e',
|
||||
'rsrc/css/phui/phui-hovercard.css' => 'ae091fc5',
|
||||
|
@ -780,7 +780,7 @@ return array(
|
|||
'path-typeahead' => 'f7fc67ec',
|
||||
'people-picture-menu-item-css' => 'a06f7f34',
|
||||
'people-profile-css' => '4df76faf',
|
||||
'phabricator-action-list-view-css' => 'f980c059',
|
||||
'phabricator-action-list-view-css' => 'c01858f4',
|
||||
'phabricator-busy' => '59a7976a',
|
||||
'phabricator-chatlog-css' => 'd295b020',
|
||||
'phabricator-content-source-view-css' => '4b8b05d4',
|
||||
|
@ -805,7 +805,7 @@ return array(
|
|||
'phabricator-object-selector-css' => '85ee8ce6',
|
||||
'phabricator-phtize' => 'd254d646',
|
||||
'phabricator-prefab' => '8d40ae75',
|
||||
'phabricator-remarkup-css' => '4a2de2bb',
|
||||
'phabricator-remarkup-css' => '2d793c5b',
|
||||
'phabricator-search-results-css' => '64ad079a',
|
||||
'phabricator-shaped-request' => '7cbe244b',
|
||||
'phabricator-slowvote-css' => 'a94b7230',
|
||||
|
@ -841,7 +841,7 @@ return array(
|
|||
'phui-basic-nav-view-css' => 'a0705f53',
|
||||
'phui-big-info-view-css' => 'bd903741',
|
||||
'phui-box-css' => '269cbc99',
|
||||
'phui-button-css' => '7eaff361',
|
||||
'phui-button-css' => '14bfba79',
|
||||
'phui-calendar-css' => '477acfaa',
|
||||
'phui-calendar-day-css' => '572b1893',
|
||||
'phui-calendar-list-css' => '576be600',
|
||||
|
@ -850,15 +850,15 @@ return array(
|
|||
'phui-cms-css' => '504b4b23',
|
||||
'phui-comment-form-css' => '48fbd65d',
|
||||
'phui-comment-panel-css' => 'f50152ad',
|
||||
'phui-crumbs-view-css' => 'b743f73e',
|
||||
'phui-crumbs-view-css' => '6ece3bbb',
|
||||
'phui-curtain-view-css' => '947bf1a4',
|
||||
'phui-document-summary-view-css' => '9ca48bdf',
|
||||
'phui-document-view-css' => 'c32e8dec',
|
||||
'phui-document-view-pro-css' => 'f56738ed',
|
||||
'phui-feed-story-css' => '44a9c8e9',
|
||||
'phui-font-icon-base-css' => '870a7360',
|
||||
'phui-fontkit-css' => '0b2da2d5',
|
||||
'phui-form-css' => '5815af7b',
|
||||
'phui-fontkit-css' => 'b78a0059',
|
||||
'phui-form-css' => 'b62c01d8',
|
||||
'phui-form-view-css' => 'adca31ce',
|
||||
'phui-head-thing-view-css' => 'fd311e5f',
|
||||
'phui-header-view-css' => 'fef6a54e',
|
||||
|
@ -905,7 +905,7 @@ return array(
|
|||
'policy-edit-css' => '815c66f7',
|
||||
'policy-transaction-detail-css' => '82100a43',
|
||||
'ponder-view-css' => 'fbd45f96',
|
||||
'project-card-view-css' => '77219296',
|
||||
'project-card-view-css' => '1be8c87b',
|
||||
'project-view-css' => '792c9057',
|
||||
'releeph-core' => '9b3c5733',
|
||||
'releeph-preview-branch' => 'b7a6f4a5',
|
||||
|
|
|
@ -2018,6 +2018,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorBadgesAward' => 'applications/badges/storage/PhabricatorBadgesAward.php',
|
||||
'PhabricatorBadgesAwardController' => 'applications/badges/controller/PhabricatorBadgesAwardController.php',
|
||||
'PhabricatorBadgesAwardQuery' => 'applications/badges/query/PhabricatorBadgesAwardQuery.php',
|
||||
'PhabricatorBadgesAwardTestDataGenerator' => 'applications/badges/lipsum/PhabricatorBadgesAwardTestDataGenerator.php',
|
||||
'PhabricatorBadgesBadge' => 'applications/badges/storage/PhabricatorBadgesBadge.php',
|
||||
'PhabricatorBadgesBadgeAwardTransaction' => 'applications/badges/xaction/PhabricatorBadgesBadgeAwardTransaction.php',
|
||||
'PhabricatorBadgesBadgeDescriptionTransaction' => 'applications/badges/xaction/PhabricatorBadgesBadgeDescriptionTransaction.php',
|
||||
|
@ -3340,6 +3341,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPeopleApplication' => 'applications/people/application/PhabricatorPeopleApplication.php',
|
||||
'PhabricatorPeopleApproveController' => 'applications/people/controller/PhabricatorPeopleApproveController.php',
|
||||
'PhabricatorPeopleBadgesProfileMenuItem' => 'applications/people/menuitem/PhabricatorPeopleBadgesProfileMenuItem.php',
|
||||
'PhabricatorPeopleCommitsProfileMenuItem' => 'applications/people/menuitem/PhabricatorPeopleCommitsProfileMenuItem.php',
|
||||
'PhabricatorPeopleController' => 'applications/people/controller/PhabricatorPeopleController.php',
|
||||
'PhabricatorPeopleCreateController' => 'applications/people/controller/PhabricatorPeopleCreateController.php',
|
||||
'PhabricatorPeopleCreateGuidanceContext' => 'applications/people/guidance/PhabricatorPeopleCreateGuidanceContext.php',
|
||||
|
@ -3365,16 +3367,19 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPeopleOwnerDatasource' => 'applications/people/typeahead/PhabricatorPeopleOwnerDatasource.php',
|
||||
'PhabricatorPeoplePictureProfileMenuItem' => 'applications/people/menuitem/PhabricatorPeoplePictureProfileMenuItem.php',
|
||||
'PhabricatorPeopleProfileBadgesController' => 'applications/people/controller/PhabricatorPeopleProfileBadgesController.php',
|
||||
'PhabricatorPeopleProfileCommitsController' => 'applications/people/controller/PhabricatorPeopleProfileCommitsController.php',
|
||||
'PhabricatorPeopleProfileController' => 'applications/people/controller/PhabricatorPeopleProfileController.php',
|
||||
'PhabricatorPeopleProfileEditController' => 'applications/people/controller/PhabricatorPeopleProfileEditController.php',
|
||||
'PhabricatorPeopleProfileImageWorkflow' => 'applications/people/management/PhabricatorPeopleProfileImageWorkflow.php',
|
||||
'PhabricatorPeopleProfileManageController' => 'applications/people/controller/PhabricatorPeopleProfileManageController.php',
|
||||
'PhabricatorPeopleProfileMenuEngine' => 'applications/people/engine/PhabricatorPeopleProfileMenuEngine.php',
|
||||
'PhabricatorPeopleProfilePictureController' => 'applications/people/controller/PhabricatorPeopleProfilePictureController.php',
|
||||
'PhabricatorPeopleProfileTasksController' => 'applications/people/controller/PhabricatorPeopleProfileTasksController.php',
|
||||
'PhabricatorPeopleProfileViewController' => 'applications/people/controller/PhabricatorPeopleProfileViewController.php',
|
||||
'PhabricatorPeopleQuery' => 'applications/people/query/PhabricatorPeopleQuery.php',
|
||||
'PhabricatorPeopleRenameController' => 'applications/people/controller/PhabricatorPeopleRenameController.php',
|
||||
'PhabricatorPeopleSearchEngine' => 'applications/people/query/PhabricatorPeopleSearchEngine.php',
|
||||
'PhabricatorPeopleTasksProfileMenuItem' => 'applications/people/menuitem/PhabricatorPeopleTasksProfileMenuItem.php',
|
||||
'PhabricatorPeopleTestDataGenerator' => 'applications/people/lipsum/PhabricatorPeopleTestDataGenerator.php',
|
||||
'PhabricatorPeopleTransactionQuery' => 'applications/people/query/PhabricatorPeopleTransactionQuery.php',
|
||||
'PhabricatorPeopleUserFunctionDatasource' => 'applications/people/typeahead/PhabricatorPeopleUserFunctionDatasource.php',
|
||||
|
@ -3441,6 +3446,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPolicyAwareQuery' => 'infrastructure/query/policy/PhabricatorPolicyAwareQuery.php',
|
||||
'PhabricatorPolicyAwareTestQuery' => 'applications/policy/__tests__/PhabricatorPolicyAwareTestQuery.php',
|
||||
'PhabricatorPolicyCanEditCapability' => 'applications/policy/capability/PhabricatorPolicyCanEditCapability.php',
|
||||
'PhabricatorPolicyCanInteractCapability' => 'applications/policy/capability/PhabricatorPolicyCanInteractCapability.php',
|
||||
'PhabricatorPolicyCanJoinCapability' => 'applications/policy/capability/PhabricatorPolicyCanJoinCapability.php',
|
||||
'PhabricatorPolicyCanViewCapability' => 'applications/policy/capability/PhabricatorPolicyCanViewCapability.php',
|
||||
'PhabricatorPolicyCapability' => 'applications/policy/capability/PhabricatorPolicyCapability.php',
|
||||
|
@ -6995,6 +7001,7 @@ phutil_register_library_map(array(
|
|||
),
|
||||
'PhabricatorBadgesAwardController' => 'PhabricatorBadgesController',
|
||||
'PhabricatorBadgesAwardQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||
'PhabricatorBadgesAwardTestDataGenerator' => 'PhabricatorTestDataGenerator',
|
||||
'PhabricatorBadgesBadge' => array(
|
||||
'PhabricatorBadgesDAO',
|
||||
'PhabricatorPolicyInterface',
|
||||
|
@ -8528,6 +8535,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPeopleApplication' => 'PhabricatorApplication',
|
||||
'PhabricatorPeopleApproveController' => 'PhabricatorPeopleController',
|
||||
'PhabricatorPeopleBadgesProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||
'PhabricatorPeopleCommitsProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||
'PhabricatorPeopleController' => 'PhabricatorController',
|
||||
'PhabricatorPeopleCreateController' => 'PhabricatorPeopleController',
|
||||
'PhabricatorPeopleCreateGuidanceContext' => 'PhabricatorGuidanceContext',
|
||||
|
@ -8553,16 +8561,19 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPeopleOwnerDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||
'PhabricatorPeoplePictureProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||
'PhabricatorPeopleProfileBadgesController' => 'PhabricatorPeopleProfileController',
|
||||
'PhabricatorPeopleProfileCommitsController' => 'PhabricatorPeopleProfileController',
|
||||
'PhabricatorPeopleProfileController' => 'PhabricatorPeopleController',
|
||||
'PhabricatorPeopleProfileEditController' => 'PhabricatorPeopleProfileController',
|
||||
'PhabricatorPeopleProfileImageWorkflow' => 'PhabricatorPeopleManagementWorkflow',
|
||||
'PhabricatorPeopleProfileManageController' => 'PhabricatorPeopleProfileController',
|
||||
'PhabricatorPeopleProfileMenuEngine' => 'PhabricatorProfileMenuEngine',
|
||||
'PhabricatorPeopleProfilePictureController' => 'PhabricatorPeopleProfileController',
|
||||
'PhabricatorPeopleProfileTasksController' => 'PhabricatorPeopleProfileController',
|
||||
'PhabricatorPeopleProfileViewController' => 'PhabricatorPeopleProfileController',
|
||||
'PhabricatorPeopleQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||
'PhabricatorPeopleRenameController' => 'PhabricatorPeopleController',
|
||||
'PhabricatorPeopleSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
||||
'PhabricatorPeopleTasksProfileMenuItem' => 'PhabricatorProfileMenuItem',
|
||||
'PhabricatorPeopleTestDataGenerator' => 'PhabricatorTestDataGenerator',
|
||||
'PhabricatorPeopleTransactionQuery' => 'PhabricatorApplicationTransactionQuery',
|
||||
'PhabricatorPeopleUserFunctionDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||
|
@ -8646,6 +8657,7 @@ phutil_register_library_map(array(
|
|||
'PhabricatorPolicyAwareQuery' => 'PhabricatorOffsetPagedQuery',
|
||||
'PhabricatorPolicyAwareTestQuery' => 'PhabricatorPolicyAwareQuery',
|
||||
'PhabricatorPolicyCanEditCapability' => 'PhabricatorPolicyCapability',
|
||||
'PhabricatorPolicyCanInteractCapability' => 'PhabricatorPolicyCapability',
|
||||
'PhabricatorPolicyCanJoinCapability' => 'PhabricatorPolicyCapability',
|
||||
'PhabricatorPolicyCanViewCapability' => 'PhabricatorPolicyCapability',
|
||||
'PhabricatorPolicyCapability' => 'Phobject',
|
||||
|
|
|
@ -4,7 +4,7 @@ final class PhabricatorBadgesEditConduitAPIMethod
|
|||
extends PhabricatorEditEngineAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'badges.edit';
|
||||
return 'badge.edit';
|
||||
}
|
||||
|
||||
public function newEditEngine() {
|
||||
|
|
|
@ -4,7 +4,7 @@ final class PhabricatorBadgesSearchConduitAPIMethod
|
|||
extends PhabricatorSearchEngineAPIMethod {
|
||||
|
||||
public function getAPIMethodName() {
|
||||
return 'badges.search';
|
||||
return 'badge.search';
|
||||
}
|
||||
|
||||
public function newSearchEngine() {
|
||||
|
|
|
@ -124,6 +124,23 @@ final class PhabricatorBadgesEditEngine
|
|||
->setTransactionType(
|
||||
PhabricatorBadgesBadgeDescriptionTransaction::TRANSACTIONTYPE)
|
||||
->setValue($object->getDescription()),
|
||||
id(new PhabricatorUsersEditField())
|
||||
->setKey('award')
|
||||
->setIsConduitOnly(true)
|
||||
->setDescription(pht('New badge award recipients.'))
|
||||
->setConduitTypeDescription(pht('New badge award recipients.'))
|
||||
->setTransactionType(
|
||||
PhabricatorBadgesBadgeAwardTransaction::TRANSACTIONTYPE)
|
||||
->setLabel(pht('Award Recipients')),
|
||||
id(new PhabricatorUsersEditField())
|
||||
->setKey('revoke')
|
||||
->setIsConduitOnly(true)
|
||||
->setDescription(pht('Revoke badge award recipients.'))
|
||||
->setConduitTypeDescription(pht('Revoke badge award recipients.'))
|
||||
->setTransactionType(
|
||||
PhabricatorBadgesBadgeRevokeTransaction::TRANSACTIONTYPE)
|
||||
->setLabel(pht('Revoke Recipients')),
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorBadgesAwardTestDataGenerator
|
||||
extends PhabricatorTestDataGenerator {
|
||||
|
||||
const GENERATORKEY = 'badges.award';
|
||||
|
||||
public function getGeneratorName() {
|
||||
return pht('Badges Award');
|
||||
}
|
||||
|
||||
public function generateObject() {
|
||||
$author = $this->loadRandomUser();
|
||||
$recipient = $this->loadRandomUser();
|
||||
$badge_phid = $this->loadRandomPHID(new PhabricatorBadgesBadge());
|
||||
|
||||
$xactions = array();
|
||||
|
||||
$xactions[] = array(
|
||||
'type' => 'award',
|
||||
'value' => array($recipient->getPHID()),
|
||||
);
|
||||
|
||||
$params = array(
|
||||
'transactions' => $xactions,
|
||||
'objectIdentifier' => $badge_phid,
|
||||
);
|
||||
|
||||
$result = id(new ConduitCall('badge.edit', $params))
|
||||
->setUser($author)
|
||||
->execute();
|
||||
|
||||
return $result['object']['phid'];
|
||||
}
|
||||
|
||||
}
|
|
@ -12,7 +12,7 @@ final class PhabricatorBadgesBadgeTestDataGenerator
|
|||
public function generateObject() {
|
||||
$author = $this->loadRandomUser();
|
||||
|
||||
list($name, $description) = $this->newLoot();
|
||||
list($name, $description, $quality, $icon) = $this->newLoot();
|
||||
|
||||
$xactions = array();
|
||||
|
||||
|
@ -26,11 +26,21 @@ final class PhabricatorBadgesBadgeTestDataGenerator
|
|||
'value' => $description,
|
||||
);
|
||||
|
||||
$xactions[] = array(
|
||||
'type' => 'quality',
|
||||
'value' => (string)$quality,
|
||||
);
|
||||
|
||||
$xactions[] = array(
|
||||
'type' => 'icon',
|
||||
'value' => $icon,
|
||||
);
|
||||
|
||||
$params = array(
|
||||
'transactions' => $xactions,
|
||||
);
|
||||
|
||||
$result = id(new ConduitCall('badges.edit', $params))
|
||||
$result = id(new ConduitCall('badge.edit', $params))
|
||||
->setUser($author)
|
||||
->execute();
|
||||
|
||||
|
@ -58,7 +68,17 @@ final class PhabricatorBadgesBadgeTestDataGenerator
|
|||
|
||||
$drop = preg_replace($effect_pattern, '', $drop);
|
||||
|
||||
return array($drop, $description);
|
||||
$quality_map = PhabricatorBadgesQuality::getQualityMap();
|
||||
shuffle($quality_map);
|
||||
$quality = head($quality_map);
|
||||
$rarity = $quality['rarity'];
|
||||
|
||||
$icon_map = id(new PhabricatorBadgesIconSet())->getIcons();
|
||||
shuffle($icon_map);
|
||||
$icon_map = head($icon_map);
|
||||
$icon = $icon_map->getKey();
|
||||
|
||||
return array($drop, $description, $rarity, $icon);
|
||||
}
|
||||
|
||||
public function rollDropValue($matches) {
|
||||
|
|
|
@ -24,6 +24,7 @@ final class PhabricatorBadgesSearchEngine
|
|||
id(new PhabricatorSearchCheckboxesField())
|
||||
->setKey('qualities')
|
||||
->setLabel(pht('Quality'))
|
||||
->setEnableForConduit(false)
|
||||
->setOptions(PhabricatorBadgesQuality::getDropdownQualityMap()),
|
||||
id(new PhabricatorSearchCheckboxesField())
|
||||
->setKey('statuses')
|
||||
|
|
|
@ -24,6 +24,10 @@ final class DiffusionRepositoryEditEngine
|
|||
return true;
|
||||
}
|
||||
|
||||
public function getQuickCreateOrderVector() {
|
||||
return id(new PhutilSortVector())->addInt(300);
|
||||
}
|
||||
|
||||
public function getEngineName() {
|
||||
return pht('Repositories');
|
||||
}
|
||||
|
|
|
@ -25,6 +25,10 @@ final class ManiphestEditEngine
|
|||
return true;
|
||||
}
|
||||
|
||||
public function getQuickCreateOrderVector() {
|
||||
return id(new PhutilSortVector())->addInt(100);
|
||||
}
|
||||
|
||||
protected function newEditableObject() {
|
||||
return ManiphestTask::initializeNewTask($this->getViewer());
|
||||
}
|
||||
|
|
|
@ -361,7 +361,7 @@ final class ManiphestTask extends ManiphestDAO
|
|||
if ($this->isLocked()) {
|
||||
return PhabricatorPolicies::POLICY_NOONE;
|
||||
} else {
|
||||
return PhabricatorPolicies::POLICY_USER;
|
||||
return $this->getViewPolicy();
|
||||
}
|
||||
case PhabricatorPolicyCapability::CAN_EDIT:
|
||||
return $this->getEditPolicy();
|
||||
|
|
|
@ -93,7 +93,16 @@ final class PhabricatorMailManagementSendTestWorkflow
|
|||
->execute();
|
||||
$users = mpull($users, null, 'getUsername');
|
||||
|
||||
$raw_tos = array();
|
||||
foreach ($tos as $key => $username) {
|
||||
// If the recipient has an "@" in any noninitial position, treat this as
|
||||
// a raw email address.
|
||||
if (preg_match('/.@/', $username)) {
|
||||
$raw_tos[] = $username;
|
||||
unset($tos[$key]);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (empty($users[$username])) {
|
||||
throw new PhutilArgumentUsageException(
|
||||
pht("No such user '%s' exists.", $username));
|
||||
|
@ -122,13 +131,20 @@ final class PhabricatorMailManagementSendTestWorkflow
|
|||
$body = file_get_contents('php://stdin');
|
||||
|
||||
$mail = id(new PhabricatorMetaMTAMail())
|
||||
->addTos($tos)
|
||||
->addCCs($ccs)
|
||||
->setSubject($subject)
|
||||
->setBody($body)
|
||||
->setIsBulk($is_bulk)
|
||||
->setMailTags($tags);
|
||||
|
||||
if ($tos) {
|
||||
$mail->addTos($tos);
|
||||
}
|
||||
|
||||
if ($raw_tos) {
|
||||
$mail->addRawTos($raw_tos);
|
||||
}
|
||||
|
||||
if ($args->getArg('html')) {
|
||||
$mail->setBody(
|
||||
pht(
|
||||
|
|
|
@ -66,6 +66,10 @@ final class PhabricatorPeopleApplication extends PhabricatorApplication {
|
|||
'PhabricatorPeopleProfileEditController',
|
||||
'badges/(?P<id>[1-9]\d*)/' =>
|
||||
'PhabricatorPeopleProfileBadgesController',
|
||||
'tasks/(?P<id>[1-9]\d*)/' =>
|
||||
'PhabricatorPeopleProfileTasksController',
|
||||
'commits/(?P<id>[1-9]\d*)/' =>
|
||||
'PhabricatorPeopleProfileCommitsController',
|
||||
'picture/(?P<id>[1-9]\d*)/' =>
|
||||
'PhabricatorPeopleProfilePictureController',
|
||||
'manage/(?P<id>[1-9]\d*)/' =>
|
||||
|
|
|
@ -24,8 +24,43 @@ final class PhabricatorUserProfileImageCacheType
|
|||
public function newValueForUsers($key, array $users) {
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$file_phids = mpull($users, 'getProfileImagePHID');
|
||||
$file_phids = array_filter($file_phids);
|
||||
$file_phids = array();
|
||||
$generate_users = array();
|
||||
foreach ($users as $user) {
|
||||
$user_phid = $user->getPHID();
|
||||
$custom_phid = $user->getProfileImagePHID();
|
||||
$default_phid = $user->getDefaultProfileImagePHID();
|
||||
$version = $user->getDefaultProfileImageVersion();
|
||||
|
||||
if ($custom_phid) {
|
||||
$file_phids[$user_phid] = $custom_phid;
|
||||
continue;
|
||||
}
|
||||
if ($default_phid) {
|
||||
if ($version == PhabricatorFilesComposeAvatarBuiltinFile::VERSION) {
|
||||
$file_phids[$user_phid] = $default_phid;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$generate_users[] = $user;
|
||||
}
|
||||
|
||||
// Generate Files for anyone without a default
|
||||
foreach ($generate_users as $generate_user) {
|
||||
$generate_user_phid = $generate_user->getPHID();
|
||||
$generate_username = $generate_user->getUsername();
|
||||
$generate_version = PhabricatorFilesComposeAvatarBuiltinFile::VERSION;
|
||||
$generate_file = id(new PhabricatorFilesComposeAvatarBuiltinFile())
|
||||
->getUserProfileImageFile($generate_username);
|
||||
|
||||
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
|
||||
$generate_user->setDefaultProfileImagePHID($generate_file->getPHID());
|
||||
$generate_user->setDefaultProfileImageVersion($generate_version);
|
||||
$generate_user->save();
|
||||
unset($unguarded);
|
||||
|
||||
$file_phids[$generate_user_phid] = $generate_file->getPHID();
|
||||
}
|
||||
|
||||
if ($file_phids) {
|
||||
$files = id(new PhabricatorFileQuery())
|
||||
|
@ -40,8 +75,11 @@ final class PhabricatorUserProfileImageCacheType
|
|||
$results = array();
|
||||
foreach ($users as $user) {
|
||||
$image_phid = $user->getProfileImagePHID();
|
||||
$default_phid = $user->getDefaultProfileImagePHID();
|
||||
if (isset($files[$image_phid])) {
|
||||
$image_uri = $files[$image_phid]->getBestURI();
|
||||
} else if (isset($files[$default_phid])) {
|
||||
$image_uri = $files[$default_phid]->getBestURI();
|
||||
} else {
|
||||
$image_uri = PhabricatorUser::getDefaultProfileImageURI();
|
||||
}
|
||||
|
|
|
@ -105,6 +105,7 @@ final class PhabricatorPeopleProfileBadgesController
|
|||
$award = idx($awards, $badge->getPHID(), null);
|
||||
$awarder_phid = $award->getAwarderPHID();
|
||||
$awarder_handle = $viewer->renderHandle($awarder_phid);
|
||||
$awarded_date = phabricator_date($award->getDateCreated(), $viewer);
|
||||
|
||||
$awarder_info = pht(
|
||||
'Awarded by %s',
|
||||
|
@ -116,7 +117,8 @@ final class PhabricatorPeopleProfileBadgesController
|
|||
->setSubhead($badge->getFlavor())
|
||||
->setQuality($badge->getQuality())
|
||||
->setHref($badge->getViewURI())
|
||||
->addByLine($awarder_info);
|
||||
->addByLine($awarder_info)
|
||||
->addByLine($awarded_date);
|
||||
|
||||
$flex->addItem($item);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorPeopleProfileCommitsController
|
||||
extends PhabricatorPeopleProfileController {
|
||||
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$viewer = $this->getViewer();
|
||||
$id = $request->getURIData('id');
|
||||
|
||||
$user = id(new PhabricatorPeopleQuery())
|
||||
->setViewer($viewer)
|
||||
->withIDs(array($id))
|
||||
->needProfile(true)
|
||||
->needProfileImage(true)
|
||||
->needAvailability(true)
|
||||
->requireCapabilities(
|
||||
array(
|
||||
PhabricatorPolicyCapability::CAN_VIEW,
|
||||
))
|
||||
->executeOne();
|
||||
if (!$user) {
|
||||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
$class = 'PhabricatorDiffusionApplication';
|
||||
if (!PhabricatorApplication::isClassInstalledForViewer($class, $viewer)) {
|
||||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
$this->setUser($user);
|
||||
$title = array(pht('Recent Commits'), $user->getUsername());
|
||||
$header = $this->buildProfileHeader();
|
||||
$commits = $this->buildCommitsView($user);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb(pht('Recent Commits'));
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
$nav = $this->getProfileMenu();
|
||||
$nav->selectFilter(PhabricatorPeopleProfileMenuEngine::ITEM_COMMITS);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->addClass('project-view-home')
|
||||
->addClass('project-view-people-home')
|
||||
->setFooter(array(
|
||||
$commits,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
private function buildCommitsView(PhabricatorUser $user) {
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$commits = id(new DiffusionCommitQuery())
|
||||
->setViewer($viewer)
|
||||
->withAuthorPHIDs(array($user->getPHID()))
|
||||
->needAuditRequests(true)
|
||||
->needCommitData(true)
|
||||
->needDrafts(true)
|
||||
->requireCapabilities(
|
||||
array(
|
||||
PhabricatorPolicyCapability::CAN_VIEW,
|
||||
))
|
||||
->setLimit(100)
|
||||
->execute();
|
||||
|
||||
$list = id(new PhabricatorAuditListView())
|
||||
->setViewer($viewer)
|
||||
->setCommits($commits)
|
||||
->setNoDataString(pht('No recent commits.'));
|
||||
|
||||
$view = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Recent Commits'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->appendChild($list);
|
||||
|
||||
return $view;
|
||||
}
|
||||
}
|
|
@ -30,22 +30,12 @@ final class PhabricatorPeopleProfilePictureController
|
|||
$e_file = true;
|
||||
$errors = array();
|
||||
|
||||
// Verify install has GD extension, otherwise default to avatar.png
|
||||
$gd = function_exists('imagecreatefromstring');
|
||||
|
||||
if ($request->isFormPost()) {
|
||||
$phid = $request->getStr('phid');
|
||||
$is_default = false;
|
||||
if ($phid == PhabricatorPHIDConstants::PHID_VOID) {
|
||||
// Compose the builtin unique image
|
||||
if ($gd) {
|
||||
$file = id(new PhabricatorFilesComposeAvatarBuiltinFile())
|
||||
->getUserProfileImageFile($name);
|
||||
} else {
|
||||
$phid = null;
|
||||
$is_default = true;
|
||||
}
|
||||
|
||||
$phid = null;
|
||||
$is_default = true;
|
||||
} else if ($phid) {
|
||||
$file = id(new PhabricatorFileQuery())
|
||||
->setViewer($viewer)
|
||||
|
@ -96,13 +86,15 @@ final class PhabricatorPeopleProfilePictureController
|
|||
$form = id(new PHUIFormLayoutView())
|
||||
->setUser($viewer);
|
||||
|
||||
if ($gd) {
|
||||
$unique_default = id(new PhabricatorFilesComposeAvatarBuiltinFile())
|
||||
->getUniqueProfileImage($name);
|
||||
$default_image = PhabricatorFile::loadBuiltin(
|
||||
$viewer, $unique_default['icon']);
|
||||
} else {
|
||||
$unique_default = null;
|
||||
$default_image = $user->getDefaultProfileImagePHID();
|
||||
if ($default_image) {
|
||||
$default_image = id(new PhabricatorFileQuery())
|
||||
->setViewer($viewer)
|
||||
->withPHIDs(array($default_image))
|
||||
->executeOne();
|
||||
}
|
||||
|
||||
if (!$default_image) {
|
||||
$default_image = PhabricatorFile::loadBuiltin($viewer, 'profile.png');
|
||||
}
|
||||
|
||||
|
@ -181,21 +173,9 @@ final class PhabricatorPeopleProfilePictureController
|
|||
}
|
||||
}
|
||||
|
||||
$default_style = array();
|
||||
if ($unique_default) {
|
||||
$border_color = implode(', ', $unique_default['border']);
|
||||
$default_style = array(
|
||||
'background-color: '.$unique_default['color'].';',
|
||||
'border: 4px solid rgba('.$border_color.');',
|
||||
'height: 42px;',
|
||||
'width: 42px',
|
||||
);
|
||||
}
|
||||
|
||||
$images[PhabricatorPHIDConstants::PHID_VOID] = array(
|
||||
'uri' => $default_image->getBestURI(),
|
||||
'tip' => pht('Default Picture'),
|
||||
'style' => implode(' ', $default_style),
|
||||
);
|
||||
|
||||
require_celerity_resource('people-profile-css');
|
||||
|
@ -223,7 +203,6 @@ final class PhabricatorPeopleProfilePictureController
|
|||
'height' => 50,
|
||||
'width' => 50,
|
||||
'src' => $spec['uri'],
|
||||
'style' => $style,
|
||||
)));
|
||||
|
||||
$button = array(
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorPeopleProfileTasksController
|
||||
extends PhabricatorPeopleProfileController {
|
||||
|
||||
public function handleRequest(AphrontRequest $request) {
|
||||
$viewer = $this->getViewer();
|
||||
$id = $request->getURIData('id');
|
||||
|
||||
$user = id(new PhabricatorPeopleQuery())
|
||||
->setViewer($viewer)
|
||||
->withIDs(array($id))
|
||||
->needProfile(true)
|
||||
->needProfileImage(true)
|
||||
->needAvailability(true)
|
||||
->requireCapabilities(
|
||||
array(
|
||||
PhabricatorPolicyCapability::CAN_VIEW,
|
||||
))
|
||||
->executeOne();
|
||||
if (!$user) {
|
||||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
$class = 'PhabricatorManiphestApplication';
|
||||
if (!PhabricatorApplication::isClassInstalledForViewer($class, $viewer)) {
|
||||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
$this->setUser($user);
|
||||
$title = array(pht('Assigned Tasks'), $user->getUsername());
|
||||
$header = $this->buildProfileHeader();
|
||||
$tasks = $this->buildTasksView($user);
|
||||
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb(pht('Assigned Tasks'));
|
||||
$crumbs->setBorder(true);
|
||||
|
||||
$nav = $this->getProfileMenu();
|
||||
$nav->selectFilter(PhabricatorPeopleProfileMenuEngine::ITEM_TASKS);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->addClass('project-view-home')
|
||||
->addClass('project-view-people-home')
|
||||
->setFooter(array(
|
||||
$tasks,
|
||||
));
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
->setNavigation($nav)
|
||||
->appendChild($view);
|
||||
}
|
||||
|
||||
private function buildTasksView(PhabricatorUser $user) {
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$open = ManiphestTaskStatus::getOpenStatusConstants();
|
||||
|
||||
$tasks = id(new ManiphestTaskQuery())
|
||||
->setViewer($viewer)
|
||||
->withOwners(array($user->getPHID()))
|
||||
->withStatuses($open)
|
||||
->needProjectPHIDs(true)
|
||||
->setLimit(100)
|
||||
->execute();
|
||||
|
||||
$handles = ManiphestTaskListView::loadTaskHandles($viewer, $tasks);
|
||||
|
||||
$list = id(new ManiphestTaskListView())
|
||||
->setUser($viewer)
|
||||
->setHandles($handles)
|
||||
->setTasks($tasks)
|
||||
->setNoDataString(pht('No open, assigned tasks.'));
|
||||
|
||||
$view = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Assigned Tasks'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->appendChild($list);
|
||||
|
||||
return $view;
|
||||
}
|
||||
}
|
|
@ -7,6 +7,8 @@ final class PhabricatorPeopleProfileMenuEngine
|
|||
const ITEM_MANAGE = 'people.manage';
|
||||
const ITEM_PICTURE = 'people.picture';
|
||||
const ITEM_BADGES = 'people.badges';
|
||||
const ITEM_TASKS = 'people.tasks';
|
||||
const ITEM_COMMITS = 'people.commits';
|
||||
|
||||
protected function isMenuEngineConfigurable() {
|
||||
return false;
|
||||
|
@ -45,48 +47,18 @@ final class PhabricatorPeopleProfileMenuEngine
|
|||
'PhabricatorManiphestApplication',
|
||||
$viewer);
|
||||
if ($have_maniphest) {
|
||||
$uri = urisprintf(
|
||||
'/maniphest/?statuses=open()&assigned=%s#R',
|
||||
$object->getPHID());
|
||||
|
||||
$items[] = $this->newItem()
|
||||
->setBuiltinKey('tasks')
|
||||
->setMenuItemKey(PhabricatorLinkProfileMenuItem::MENUITEMKEY)
|
||||
->setMenuItemProperty('icon', 'maniphest')
|
||||
->setMenuItemProperty('name', pht('Open Tasks'))
|
||||
->setMenuItemProperty('uri', $uri);
|
||||
}
|
||||
|
||||
$have_differential = PhabricatorApplication::isClassInstalledForViewer(
|
||||
'PhabricatorDifferentialApplication',
|
||||
$viewer);
|
||||
if ($have_differential) {
|
||||
$uri = urisprintf(
|
||||
'/differential/?authors=%s#R',
|
||||
$object->getPHID());
|
||||
|
||||
$items[] = $this->newItem()
|
||||
->setBuiltinKey('revisions')
|
||||
->setMenuItemKey(PhabricatorLinkProfileMenuItem::MENUITEMKEY)
|
||||
->setMenuItemProperty('icon', 'differential')
|
||||
->setMenuItemProperty('name', pht('Revisions'))
|
||||
->setMenuItemProperty('uri', $uri);
|
||||
->setBuiltinKey(self::ITEM_TASKS)
|
||||
->setMenuItemKey(PhabricatorPeopleTasksProfileMenuItem::MENUITEMKEY);
|
||||
}
|
||||
|
||||
$have_diffusion = PhabricatorApplication::isClassInstalledForViewer(
|
||||
'PhabricatorDiffusionApplication',
|
||||
$viewer);
|
||||
if ($have_diffusion) {
|
||||
$uri = urisprintf(
|
||||
'/diffusion/commit/?authors=%s#R',
|
||||
$object->getPHID());
|
||||
|
||||
$items[] = $this->newItem()
|
||||
->setBuiltinKey('commits')
|
||||
->setMenuItemKey(PhabricatorLinkProfileMenuItem::MENUITEMKEY)
|
||||
->setMenuItemProperty('icon', 'diffusion')
|
||||
->setMenuItemProperty('name', pht('Commits'))
|
||||
->setMenuItemProperty('uri', $uri);
|
||||
->setBuiltinKey(self::ITEM_COMMITS)
|
||||
->setMenuItemKey(PhabricatorPeopleCommitsProfileMenuItem::MENUITEMKEY);
|
||||
}
|
||||
|
||||
$items[] = $this->newItem()
|
||||
|
|
|
@ -55,8 +55,14 @@ final class PhabricatorPeopleProfileImageWorkflow
|
|||
foreach ($iterator as $user) {
|
||||
$username = $user->getUsername();
|
||||
$default_phid = $user->getDefaultProfileImagePHID();
|
||||
$gen_version = $user->getDefaultProfileImageVersion();
|
||||
|
||||
if ($default_phid == null || $is_force) {
|
||||
$generate = false;
|
||||
if ($gen_version != $version) {
|
||||
$generate = true;
|
||||
}
|
||||
|
||||
if ($default_phid == null || $is_force || $generate) {
|
||||
$file = id(new PhabricatorFilesComposeAvatarBuiltinFile())
|
||||
->getUserProfileImageFile($username);
|
||||
$user->setDefaultProfileImagePHID($file->getPHID());
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorPeopleCommitsProfileMenuItem
|
||||
extends PhabricatorProfileMenuItem {
|
||||
|
||||
const MENUITEMKEY = 'people.commits';
|
||||
|
||||
public function getMenuItemTypeName() {
|
||||
return pht('Commits');
|
||||
}
|
||||
|
||||
private function getDefaultName() {
|
||||
return pht('Commits');
|
||||
}
|
||||
|
||||
public function canHideMenuItem(
|
||||
PhabricatorProfileMenuItemConfiguration $config) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getDisplayName(
|
||||
PhabricatorProfileMenuItemConfiguration $config) {
|
||||
$name = $config->getMenuItemProperty('name');
|
||||
|
||||
if (strlen($name)) {
|
||||
return $name;
|
||||
}
|
||||
|
||||
return $this->getDefaultName();
|
||||
}
|
||||
|
||||
public function buildEditEngineFields(
|
||||
PhabricatorProfileMenuItemConfiguration $config) {
|
||||
return array(
|
||||
id(new PhabricatorTextEditField())
|
||||
->setKey('name')
|
||||
->setLabel(pht('Name'))
|
||||
->setPlaceholder($this->getDefaultName())
|
||||
->setValue($config->getMenuItemProperty('name')),
|
||||
);
|
||||
}
|
||||
|
||||
protected function newNavigationMenuItems(
|
||||
PhabricatorProfileMenuItemConfiguration $config) {
|
||||
|
||||
$user = $config->getProfileObject();
|
||||
$id = $user->getID();
|
||||
|
||||
$item = $this->newItem()
|
||||
->setHref("/people/commits/{$id}/")
|
||||
->setName($this->getDisplayName($config))
|
||||
->setIcon('fa-code');
|
||||
|
||||
return array(
|
||||
$item,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorPeopleTasksProfileMenuItem
|
||||
extends PhabricatorProfileMenuItem {
|
||||
|
||||
const MENUITEMKEY = 'people.tasks';
|
||||
|
||||
public function getMenuItemTypeName() {
|
||||
return pht('Tasks');
|
||||
}
|
||||
|
||||
private function getDefaultName() {
|
||||
return pht('Tasks');
|
||||
}
|
||||
|
||||
public function canHideMenuItem(
|
||||
PhabricatorProfileMenuItemConfiguration $config) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getDisplayName(
|
||||
PhabricatorProfileMenuItemConfiguration $config) {
|
||||
$name = $config->getMenuItemProperty('name');
|
||||
|
||||
if (strlen($name)) {
|
||||
return $name;
|
||||
}
|
||||
|
||||
return $this->getDefaultName();
|
||||
}
|
||||
|
||||
public function buildEditEngineFields(
|
||||
PhabricatorProfileMenuItemConfiguration $config) {
|
||||
return array(
|
||||
id(new PhabricatorTextEditField())
|
||||
->setKey('name')
|
||||
->setLabel(pht('Name'))
|
||||
->setPlaceholder($this->getDefaultName())
|
||||
->setValue($config->getMenuItemProperty('name')),
|
||||
);
|
||||
}
|
||||
|
||||
protected function newNavigationMenuItems(
|
||||
PhabricatorProfileMenuItemConfiguration $config) {
|
||||
|
||||
$user = $config->getProfileObject();
|
||||
$id = $user->getID();
|
||||
|
||||
$item = $this->newItem()
|
||||
->setHref("/people/tasks/{$id}/")
|
||||
->setName($this->getDisplayName($config))
|
||||
->setIcon('fa-anchor');
|
||||
|
||||
return array(
|
||||
$item,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -13,7 +13,9 @@ final class PhabricatorUserProfile extends PhabricatorUserDAO {
|
|||
|
||||
return id(new self())
|
||||
->setUserPHID($user->getPHID())
|
||||
->setIcon($default_icon);
|
||||
->setIcon($default_icon)
|
||||
->setTitle('')
|
||||
->setBlurb('');
|
||||
}
|
||||
|
||||
protected function getConfiguration() {
|
||||
|
|
|
@ -31,6 +31,7 @@ final class PhabricatorUserCardView extends AphrontTagView {
|
|||
protected function getTagAttributes() {
|
||||
$classes = array();
|
||||
$classes[] = 'project-card-view';
|
||||
$classes[] = 'people-card-view';
|
||||
|
||||
if ($this->profile->getIsDisabled()) {
|
||||
$classes[] = 'project-card-disabled';
|
||||
|
@ -120,6 +121,7 @@ final class PhabricatorUserCardView extends AphrontTagView {
|
|||
'a',
|
||||
array(
|
||||
'href' => $href,
|
||||
'class' => 'project-card-image-href',
|
||||
),
|
||||
$image);
|
||||
|
||||
|
|
|
@ -10,11 +10,6 @@ final class PhrequentSearchEngine extends PhabricatorApplicationSearchEngine {
|
|||
return 'PhabricatorPhrequentApplication';
|
||||
}
|
||||
|
||||
public function canUseInPanelContext() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public function getPageSize(PhabricatorSavedQuery $saved) {
|
||||
return $saved->getParameter('limit', 1000);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
final class PhabricatorPolicyCanInteractCapability
|
||||
extends PhabricatorPolicyCapability {
|
||||
|
||||
const CAPABILITY = self::CAN_INTERACT;
|
||||
|
||||
public function getCapabilityName() {
|
||||
return pht('Can Interact');
|
||||
}
|
||||
|
||||
public function describeCapabilityRejection() {
|
||||
return pht('You do not have permission to interact with this object.');
|
||||
}
|
||||
|
||||
public function shouldAllowPublicPolicySetting() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -244,7 +244,7 @@ final class PhabricatorProjectProfileController
|
|||
|
||||
return id(new PHUIObjectBoxView())
|
||||
->setHeader($header)
|
||||
->setBackground(PHUIObjectBoxView::GREY)
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setObjectList($milestone_list);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,10 @@ final class PhabricatorProjectEditEngine
|
|||
return true;
|
||||
}
|
||||
|
||||
public function getQuickCreateOrderVector() {
|
||||
return id(new PhutilSortVector())->addInt(200);
|
||||
}
|
||||
|
||||
public function getEngineName() {
|
||||
return pht('Projects');
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@ abstract class PhabricatorSearchField extends Phobject {
|
|||
private $description;
|
||||
private $isHidden;
|
||||
|
||||
private $enableForConduit = true;
|
||||
|
||||
|
||||
/* -( Configuring Fields )------------------------------------------------- */
|
||||
|
||||
|
@ -333,6 +335,10 @@ abstract class PhabricatorSearchField extends Phobject {
|
|||
* @task conduit
|
||||
*/
|
||||
final public function getConduitParameterType() {
|
||||
if (!$this->getEnableForConduit()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$type = $this->newConduitParameterType();
|
||||
|
||||
if ($type) {
|
||||
|
@ -367,6 +373,15 @@ abstract class PhabricatorSearchField extends Phobject {
|
|||
$this->getConduitKey());
|
||||
}
|
||||
|
||||
final public function setEnableForConduit($enable) {
|
||||
$this->enableForConduit = $enable;
|
||||
return $this;
|
||||
}
|
||||
|
||||
final public function getEnableForConduit() {
|
||||
return $this->enableForConduit;
|
||||
}
|
||||
|
||||
|
||||
/* -( Utility Methods )----------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -238,11 +238,15 @@ class PhabricatorApplicationTransactionCommentView extends AphrontView {
|
|||
'class' => 'phui-timeline-wedge',
|
||||
),
|
||||
'');
|
||||
|
||||
$badge_view = $this->renderBadgeView();
|
||||
|
||||
$comment_box = id(new PHUIObjectBoxView())
|
||||
->setFlush(true)
|
||||
->addClass('phui-comment-form-view')
|
||||
->addSigil('phui-comment-form')
|
||||
->appendChild($image)
|
||||
->appendChild($badge_view)
|
||||
->appendChild($wedge)
|
||||
->appendChild($comment);
|
||||
|
||||
|
@ -512,4 +516,47 @@ class PhabricatorApplicationTransactionCommentView extends AphrontView {
|
|||
return $options;
|
||||
}
|
||||
|
||||
private function renderBadgeView() {
|
||||
$user = $this->getUser();
|
||||
$can_use_badges = PhabricatorApplication::isClassInstalledForViewer(
|
||||
'PhabricatorBadgesApplication',
|
||||
$user);
|
||||
if (!$can_use_badges) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$awards = id(new PhabricatorBadgesAwardQuery())
|
||||
->setViewer($this->getUser())
|
||||
->withRecipientPHIDs(array($user->getPHID()))
|
||||
->setLimit(2)
|
||||
->execute();
|
||||
|
||||
$badge_view = null;
|
||||
if ($awards) {
|
||||
$badges = mpull($awards, 'getBadge');
|
||||
$badge_list = array();
|
||||
foreach ($badges as $badge) {
|
||||
$badge_view = id(new PHUIBadgeMiniView())
|
||||
->setIcon($badge->getIcon())
|
||||
->setQuality($badge->getQuality())
|
||||
->setHeader($badge->getName())
|
||||
->setTipDirection('E')
|
||||
->setHref('/badges/view/'.$badge->getID());
|
||||
|
||||
$badge_list[] = $badge_view;
|
||||
}
|
||||
$flex = new PHUIBadgeBoxView();
|
||||
$flex->addItems($badge_list);
|
||||
$flex->setCollapsed(true);
|
||||
$badge_view = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'phui-timeline-badges',
|
||||
),
|
||||
$flex);
|
||||
}
|
||||
|
||||
return $badge_view;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -153,12 +153,8 @@ final class AphrontFormPolicyControl extends AphrontFormControl {
|
|||
}
|
||||
}
|
||||
|
||||
$policy_short_name = id(new PhutilUTF8StringTruncator())
|
||||
->setMaximumGlyphs(28)
|
||||
->truncateString($policy->getName());
|
||||
|
||||
$options[$policy->getType()][$policy->getPHID()] = array(
|
||||
'name' => $policy_short_name,
|
||||
'name' => $policy->getName(),
|
||||
'full' => $policy->getName(),
|
||||
'icon' => $policy->getIcon(),
|
||||
'sort' => phutil_utf8_strtolower($policy->getName()),
|
||||
|
|
|
@ -75,7 +75,7 @@ final class PHUICrumbView extends AphrontView {
|
|||
|
||||
// Surround the crumb name with spaces so that double clicking it only
|
||||
// selects the crumb itself.
|
||||
$name = array(' ', $this->name, ' ');
|
||||
$name = array(' ', $this->name);
|
||||
|
||||
$name = phutil_tag(
|
||||
'span',
|
||||
|
@ -84,6 +84,10 @@ final class PHUICrumbView extends AphrontView {
|
|||
),
|
||||
$name);
|
||||
|
||||
// Because of text-overflow and safari, put the second space on the
|
||||
// outside of the element.
|
||||
$name = array($name, ' ');
|
||||
|
||||
$divider = null;
|
||||
if (!$this->isLastCrumb) {
|
||||
$divider = id(new PHUIIconView())
|
||||
|
|
|
@ -43,6 +43,10 @@
|
|||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.project-card-view .project-card-image-href {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.project-card-view .project-card-item div {
|
||||
display: inline;
|
||||
}
|
||||
|
@ -103,6 +107,14 @@
|
|||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.people-card-view .phui-header-subheader .phui-tag-core {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
max-width: 232px;
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.project-card-view .phui-header-header .phui-tag-view .phui-tag-core {
|
||||
padding: 0;
|
||||
}
|
||||
|
|
|
@ -272,6 +272,7 @@ video.phabricator-media {
|
|||
|
||||
.phabricator-remarkup .phriction-link-missing {
|
||||
color: {$red};
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.phabricator-remarkup .phriction-link-lock {
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
color: {$darkbluetext};
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.action-has-icon button.phabricator-action-view-item,
|
||||
|
@ -164,3 +165,31 @@
|
|||
margin-top: 8px;
|
||||
border-top: 1px solid {$thinblueborder};
|
||||
}
|
||||
|
||||
/******* Sub Menu *************************************************************/
|
||||
|
||||
.phabricator-action-view-submenu .caret-right {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
border-left-color: {$alphablue};
|
||||
}
|
||||
|
||||
.phabricator-action-view-submenu .caret {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 8px;
|
||||
border-top: 7px solid {$lightgreytext};
|
||||
}
|
||||
|
||||
.phabricator-action-list-view .phabricator-action-view-submenu.phui-submenu-open
|
||||
.phabricator-action-view-item {
|
||||
background-color: rgba({$alphablue}, 0.07);
|
||||
color: {$sky};
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.phabricator-action-list-view .phabricator-action-view-submenu.phui-submenu-open
|
||||
.phabricator-action-view-item .phui-icon-view {
|
||||
color: {$sky};
|
||||
}
|
||||
|
|
|
@ -235,6 +235,19 @@ a.policy-control .caret {
|
|||
float: right;
|
||||
}
|
||||
|
||||
a.policy-control .phui-button-text {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.device-phone a.button.policy-control {
|
||||
display: block;
|
||||
float: none;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.caret {
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
|
@ -283,32 +296,6 @@ a.policy-control .caret {
|
|||
border-top-color: #000;
|
||||
}
|
||||
|
||||
.phabricator-action-view-submenu .caret-right {
|
||||
float: right;
|
||||
margin-top: 4px;
|
||||
margin-right: 6px;
|
||||
border-left-color: {$alphablue};
|
||||
}
|
||||
|
||||
.phabricator-action-view-submenu .caret {
|
||||
float: right;
|
||||
margin-top: 5px;
|
||||
margin-right: 4px;
|
||||
border-top: 7px solid {$lightgreytext};
|
||||
}
|
||||
|
||||
.phabricator-action-list-view .phabricator-action-view-submenu.phui-submenu-open
|
||||
.phabricator-action-view-item {
|
||||
background-color: rgba({$alphablue}, 0.07);
|
||||
color: {$sky};
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.phabricator-action-list-view .phabricator-action-view-submenu.phui-submenu-open
|
||||
.phabricator-action-view-item .phui-icon-view {
|
||||
color: {$sky};
|
||||
}
|
||||
|
||||
/* Icons */
|
||||
.button.has-icon {
|
||||
position: relative;
|
||||
|
|
|
@ -48,6 +48,10 @@
|
|||
.phui-crumb-view {
|
||||
float: left;
|
||||
padding: 8px 0;
|
||||
max-width: 240px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.device-phone .phui-crumb-view.phabricator-last-crumb .phui-crumb-name,
|
||||
|
|
|
@ -34,3 +34,7 @@
|
|||
padding: 0 24px 8px 0;
|
||||
margin: 32px 0 4px;
|
||||
}
|
||||
|
||||
.phui-document-view .phabricator-remarkup .remarkup-header strong {
|
||||
color: #586BE9;
|
||||
}
|
||||
|
|
|
@ -157,9 +157,20 @@ textarea[disabled],
|
|||
}
|
||||
|
||||
.aphront-space-select-control-knob {
|
||||
margin: 2px 8px 2px 0;
|
||||
margin: 0 8px 0 0;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.aphront-form-control-policy .policy-control {
|
||||
float: left;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.device .aphront-space-select-control-knob {
|
||||
margin-bottom: 8px;
|
||||
float: none;
|
||||
}
|
||||
|
||||
.device .aphront-form-control-policy .policy-control {
|
||||
margin: 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue