1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-09 16:32:39 +01:00

Add config flags for Differential action link stuff.

This commit is contained in:
epriestley 2011-04-13 12:12:02 -07:00
parent 330182f195
commit d7c27dafd2
2 changed files with 26 additions and 13 deletions

View file

@ -286,6 +286,15 @@ return array(
'text/plain' => 'text/plain; charset=utf-8', 'text/plain' => 'text/plain; charset=utf-8',
), ),
// -- Differential ---------------------------------------------------------- //
'differential.revision-custom-detail-renderer' => null,
// -- Maniphest ------------------------------------------------------------- //
'maniphest.enabled' => true,
// -- Customization --------------------------------------------------------- // // -- Customization --------------------------------------------------------- //
// Paths to additional phutil libraries to load. // Paths to additional phutil libraries to load.

View file

@ -360,14 +360,16 @@ class DifferentialRevisionViewController extends DifferentialController {
$properties['Unit'] = $ustar.' '.$umsg.$utail; $properties['Unit'] = $ustar.' '.$umsg.$utail;
$tasks = $revision->getAttachedPHIDs( if (PhabricatorEnv::getEnvConfig('maniphest.enabled')) {
PhabricatorPHIDConstants::PHID_TYPE_TASK); $tasks = $revision->getAttachedPHIDs(
if ($tasks) { PhabricatorPHIDConstants::PHID_TYPE_TASK);
$links = array(); if ($tasks) {
foreach ($tasks as $task_phid) { $links = array();
$links[] = $handles[$task_phid]->renderLink(); foreach ($tasks as $task_phid) {
$links[] = $handles[$task_phid]->renderLink();
}
$properties['Maniphest Tasks'] = implode('<br />', $links);
} }
$properties['Maniphest Tasks'] = implode('<br />', $links);
} }
$commit_phids = $revision->getCommitPHIDs(); $commit_phids = $revision->getCommitPHIDs();
@ -419,12 +421,14 @@ class DifferentialRevisionViewController extends DifferentialController {
require_celerity_resource('phabricator-object-selector-css'); require_celerity_resource('phabricator-object-selector-css');
require_celerity_resource('javelin-behavior-phabricator-object-selector'); require_celerity_resource('javelin-behavior-phabricator-object-selector');
$links[] = array( if (PhabricatorEnv::getEnvConfig('maniphest.enabled')) {
'class' => 'attach-maniphest', $links[] = array(
'name' => 'Edit Maniphest Tasks', 'class' => 'attach-maniphest',
'href' => "/differential/attach/{$revision_id}/TASK/", 'name' => 'Edit Maniphest Tasks',
'sigil' => 'workflow', 'href' => "/differential/attach/{$revision_id}/TASK/",
); 'sigil' => 'workflow',
);
}
$links[] = array( $links[] = array(
'class' => 'transcripts-metamta', 'class' => 'transcripts-metamta',