Modernize tag and branch controllers in Diffusion
Summary: Ref T4245. Prepares these controllers to accept alternate identifers, plus minor spacing and layout fixes. Test Plan: Viewed tags, viewed branches. Reviewers: chad Reviewed By: chad Maniphest Tasks: T4245 Differential Revision: https://secure.phabricator.com/D14941
This commit is contained in:
@@ -61,23 +61,16 @@ abstract class DiffusionController extends PhabricatorController {
|
||||
$identifier = (int)$request->getURIData('repositoryID');
|
||||
}
|
||||
|
||||
$blob = $request->getURIData('dblob');
|
||||
if (strlen($blob)) {
|
||||
$parsed = DiffusionRequest::parseRequestBlob($blob);
|
||||
} else {
|
||||
$parsed = array(
|
||||
'commit' => $request->getURIData('commit'),
|
||||
'path' => $request->getURIData('path'),
|
||||
'line' => $request->getURIData('line'),
|
||||
'branch' => $request->getURIData('branch'),
|
||||
'lint' => $request->getStr('lint'),
|
||||
);
|
||||
}
|
||||
|
||||
$params = array(
|
||||
'repository' => $identifier,
|
||||
'user' => $viewer,
|
||||
) + $parsed;
|
||||
'blob' => $request->getURIData('dblob'),
|
||||
'commit' => $request->getURIData('commit'),
|
||||
'path' => $request->getURIData('path'),
|
||||
'line' => $request->getURIData('line'),
|
||||
'branch' => $request->getURIData('branch'),
|
||||
'lint' => $request->getStr('lint'),
|
||||
);
|
||||
|
||||
$drequest = DiffusionRequest::newFromDictionary($params);
|
||||
|
||||
@@ -286,4 +279,10 @@ abstract class DiffusionController extends PhabricatorController {
|
||||
->appendChild($body);
|
||||
}
|
||||
|
||||
protected function renderTablePagerBox(PHUIPagerView $pager) {
|
||||
return id(new PHUIBoxView())
|
||||
->addMargin(PHUI::MARGIN_LARGE)
|
||||
->appendChild($pager);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user