Differential D12482 Diff 29969 src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php
Show First 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | if (isset($sources[$class])) { | ||||
'div', | 'div', | ||||
array( | array( | ||||
'class' => 'typeahead-browse-header', | 'class' => 'typeahead-browse-header', | ||||
), | ), | ||||
$search), | $search), | ||||
$frame, | $frame, | ||||
); | ); | ||||
$function_help = null; | |||||
if ($source->getAllDatasourceFunctions()) { | |||||
$reference_uri = '/typeahead/help/'.get_class($source).'/'; | |||||
$reference_link = phutil_tag( | |||||
'a', | |||||
array( | |||||
'href' => $reference_uri, | |||||
'target' => '_blank', | |||||
), | |||||
pht('Reference: Advanced Functions')); | |||||
$function_help = array( | |||||
id(new PHUIIconView()) | |||||
->setIconFont('fa-book'), | |||||
' ', | |||||
$reference_link, | |||||
); | |||||
} | |||||
return $this->newDialog() | return $this->newDialog() | ||||
->setWidth(AphrontDialogView::WIDTH_FORM) | ->setWidth(AphrontDialogView::WIDTH_FORM) | ||||
->setRenderDialogAsDiv(true) | ->setRenderDialogAsDiv(true) | ||||
->setTitle($source->getBrowseTitle()) | ->setTitle($source->getBrowseTitle()) | ||||
->appendChild($browser) | ->appendChild($browser) | ||||
->addFooter($function_help) | |||||
->addCancelButton('/', pht('Close')); | ->addCancelButton('/', pht('Close')); | ||||
} | } | ||||
} else if ($is_browse) { | } else if ($is_browse) { | ||||
return new Aphront404Response(); | return new Aphront404Response(); | ||||
} else { | } else { | ||||
$results = array(); | $results = array(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |