Clean up NUX a bit on Diffusion
Summary: Just some cleanup. Make sure action-bar has consistent space if locate is there or not, hide tabs if repository has no content. Use clone or checkout language depending on SCM. Fixes T12915.
Test Plan:
Test git, hg, svn blank states.
{F5042707}
Reviewers: epriestley
Reviewed By: epriestley
Subscribers: Korvin
Maniphest Tasks: T12915
Differential Revision: https://secure.phabricator.com/D18208
This commit is contained in:
@@ -94,9 +94,15 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
'action' => 'clone',
|
||||
));
|
||||
|
||||
if ($repository->isSVN()) {
|
||||
$clone_text = pht('Checkout');
|
||||
} else {
|
||||
$clone_text = pht('Clone');
|
||||
}
|
||||
|
||||
$clone_button = id(new PHUIButtonView())
|
||||
->setTag('a')
|
||||
->setText('Clone')
|
||||
->setText($clone_text)
|
||||
->setColor(PHUIButtonView::GREEN)
|
||||
->setIcon('fa-download')
|
||||
->setWorkflow(true)
|
||||
@@ -104,17 +110,21 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
|
||||
$bar = id(new PHUILeftRightView())
|
||||
->setLeft($locate_file)
|
||||
->setRight($clone_button);
|
||||
->setRight($clone_button)
|
||||
->addClass('diffusion-action-bar');
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setTabs($tabs)
|
||||
->setFooter(array(
|
||||
$bar,
|
||||
$description,
|
||||
$content,
|
||||
));
|
||||
|
||||
if ($page_has_content) {
|
||||
$view->setTabs($tabs);
|
||||
}
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle(
|
||||
array(
|
||||
|
||||
Reference in New Issue
Block a user