1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

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:
Chad Little 2017-07-11 20:37:06 -07:00
parent db57da0f74
commit 0c4cff28df
3 changed files with 20 additions and 6 deletions

View file

@ -75,7 +75,7 @@ return array(
'rsrc/css/application/diffusion/diffusion-readme.css' => '419dd5b6',
'rsrc/css/application/diffusion/diffusion-repository.css' => 'ee6f20ec',
'rsrc/css/application/diffusion/diffusion-source.css' => '750add59',
'rsrc/css/application/diffusion/diffusion.css' => '08991f7e',
'rsrc/css/application/diffusion/diffusion.css' => '8d01932f',
'rsrc/css/application/feed/feed.css' => 'ecd4ec57',
'rsrc/css/application/files/global-drag-and-drop.css' => '5c1b47c2',
'rsrc/css/application/flag/flag.css' => 'bba8f811',
@ -571,7 +571,7 @@ return array(
'differential-revision-history-css' => '0e8eb855',
'differential-revision-list-css' => 'f3c47d33',
'differential-table-of-contents-css' => 'ae4b7a55',
'diffusion-css' => '08991f7e',
'diffusion-css' => '8d01932f',
'diffusion-icons-css' => '0c15255e',
'diffusion-readme-css' => '419dd5b6',
'diffusion-repository-css' => 'ee6f20ec',

View file

@ -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(

View file

@ -12,8 +12,12 @@
display: block;
}
.diffusion-action-bar {
margin-bottom: 16px;
}
.diffusion-profile-locate .phui-form-view {
margin: 0 0 16px 0;
margin: 0;
padding: 0;
}