phorge/src/applications/diffusion/controller/DiffusionBrowseController.php
phorge/src/applications/diffusion/controller/DiffusionBrowseController.php
Changes
Changes
src/applications/diffusion/controller/DiffusionBrowseController.php
Show All 31 Lines | switch ($drequest->getRepository()->getVersionControlSystem()) { | ||||
id(new AphrontFormTextWithSubmitControl()) | id(new AphrontFormTextWithSubmitControl()) | ||||
->setLabel(pht('Pattern')) | ->setLabel(pht('Pattern')) | ||||
->setSubmitLabel(pht('Grep File Content')) | ->setSubmitLabel(pht('Grep File Content')) | ||||
->setName('grep') | ->setName('grep') | ||||
->setValue($this->getRequest()->getStr('grep'))); | ->setValue($this->getRequest()->getStr('grep'))); | ||||
break; | break; | ||||
} | } | ||||
$filter = new AphrontListFilterView(); | $filter = new AphrontListFilterView(); | ||||
$filter->appendChild($forms); | $filter->appendChild($forms); | ||||
if ($collapsed) { | if ($collapsed) { | ||||
$filter->setCollapsed( | $filter->setCollapsed( | ||||
pht('Show Search'), | pht('Show Search'), | ||||
pht('Hide Search'), | pht('Hide Search'), | ||||
pht('Search for file names or content in this directory.'), | pht('Search for file names or content in this directory.'), | ||||
'#'); | '#'); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | $view->addAction( | ||||
->setName(pht('Jump to HEAD')) | ->setName(pht('Jump to HEAD')) | ||||
->setHref($head_uri) | ->setHref($head_uri) | ||||
->setIcon('fa-home') | ->setIcon('fa-home') | ||||
->setDisabled(!$behind_head)); | ->setDisabled(!$behind_head)); | ||||
// TODO: Ideally, this should live in Owners and be event-triggered, but | // TODO: Ideally, this should live in Owners and be event-triggered, but | ||||
// there's no reasonable object for it to react to right now. | // there's no reasonable object for it to react to right now. | ||||
$owners = 'PhabricatorApplicationOwners'; | $owners = 'PhabricatorOwnersApplication'; | ||||
if (PhabricatorApplication::isClassInstalled($owners)) { | if (PhabricatorApplication::isClassInstalled($owners)) { | ||||
$owners_uri = id(new PhutilURI('/owners/view/search/')) | $owners_uri = id(new PhutilURI('/owners/view/search/')) | ||||
->setQueryParams( | ->setQueryParams( | ||||
array( | array( | ||||
'repository' => $drequest->getCallsign(), | 'repository' => $drequest->getCallsign(), | ||||
'path' => '/'.$drequest->getPath(), | 'path' => '/'.$drequest->getPath(), | ||||
)); | )); | ||||
▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | protected function buildOpenRevisions() { | ||||
$phids = $view->getRequiredHandlePHIDs(); | $phids = $view->getRequiredHandlePHIDs(); | ||||
$handles = $this->loadViewerHandles($phids); | $handles = $this->loadViewerHandles($phids); | ||||
$view->setHandles($handles); | $view->setHandles($handles); | ||||
return id(new PHUIObjectBoxView()) | return id(new PHUIObjectBoxView()) | ||||
->setHeaderText(pht('Pending Differential Revisions')) | ->setHeaderText(pht('Pending Differential Revisions')) | ||||
->appendChild($view); | ->appendChild($view); | ||||
} | } | ||||
} | } |