1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 16:22:43 +01:00

Simplify Create Repository page

Summary: Also adds images, nice images.

Test Plan: Create a repository, test mobile, tablet, desktop layouts.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D18430
This commit is contained in:
Chad Little 2017-08-15 11:01:59 -07:00
parent 4d335b7bef
commit 3a50ea4f47
4 changed files with 29 additions and 9 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' => 'd0fbb996',
'rsrc/css/application/diffusion/diffusion.css' => 'a5296e3c',
'rsrc/css/application/feed/feed.css' => 'ecd4ec57',
'rsrc/css/application/files/global-drag-and-drop.css' => 'b556a948',
'rsrc/css/application/flag/flag.css' => 'bba8f811',
@ -570,7 +570,7 @@ return array(
'differential-revision-history-css' => '0e8eb855',
'differential-revision-list-css' => 'f3c47d33',
'differential-table-of-contents-css' => 'ae4b7a55',
'diffusion-css' => 'd0fbb996',
'diffusion-css' => 'a5296e3c',
'diffusion-icons-css' => '0c15255e',
'diffusion-readme-css' => '419dd5b6',
'diffusion-repository-css' => 'ee6f20ec',

View file

@ -37,9 +37,6 @@ final class DiffusionRepositoryEditController
$crumbs->setBorder(true);
$title = pht('Choose Repository Type');
$header = id(new PHUIHeaderView())
->setHeader(pht('Create Repository'))
->setHeaderIcon('fa-plus-square');
$layout = id(new AphrontMultiColumnView())
->setFluidLayout(true);
@ -47,8 +44,10 @@ final class DiffusionRepositoryEditController
$create_uri = $request->getRequestURI();
foreach ($vcs_types as $vcs_key => $vcs_type) {
$image = idx($vcs_type, 'image');
$image = PhabricatorFile::loadBuiltin($viewer, $image);
$action = id(new PHUIActionPanelView())
->setIcon(idx($vcs_type, 'icon'))
->setImage($image->getBestURI())
->setHeader(idx($vcs_type, 'create.header'))
->setHref($create_uri->alter('vcs', $vcs_key))
->setSubheader(idx($vcs_type, 'create.subheader'));
@ -62,9 +61,12 @@ final class DiffusionRepositoryEditController
$observe_href = PhabricatorEnv::getDoclink(
'Diffusion User Guide: Existing Repositories');
require_celerity_resource('diffusion-css');
$image = PhabricatorFile::loadBuiltin($viewer, 'repo/repo.png');
$hints->addColumn(
id(new PHUIActionPanelView())
->setIcon('fa-book')
->setImage($image->getBestURI())
->setHeader(pht('Import or Observe an Existing Repository'))
->setHref($observe_href)
->setSubheader(
@ -72,12 +74,15 @@ final class DiffusionRepositoryEditController
'Review the documentation describing how to import or observe an '.
'existing repository.')));
$layout = id(new PHUIBoxView())
->addClass('diffusion-create-repo')
->appendChild($layout);
$view = id(new PHUITwoColumnView())
->setHeader($header)
->setFixed(true)
->setFooter(
array(
$layout,
phutil_tag('br'),
$hints,
));

View file

@ -26,18 +26,21 @@ final class PhabricatorRepositoryType extends Phobject {
self::REPOSITORY_TYPE_GIT => array(
'name' => pht('Git'),
'icon' => 'fa-git',
'image' => 'repo/repo-git.png',
'create.header' => pht('Create Git Repository'),
'create.subheader' => pht('Create a new Git repository.'),
),
self::REPOSITORY_TYPE_MERCURIAL => array(
'name' => pht('Mercurial'),
'icon' => 'fa-code-fork',
'image' => 'repo/repo-hg.png',
'create.header' => pht('Create Mercurial Repository'),
'create.subheader' => pht('Create a new Mercurial repository.'),
),
self::REPOSITORY_TYPE_SVN => array(
'name' => pht('Subversion'),
'icon' => 'fa-database',
'image' => 'repo/repo-svn.png',
'create.header' => pht('Create Subversion Repository'),
'create.subheader' => pht('Create a new Subversion repository.'),
),

View file

@ -160,6 +160,18 @@
width: 100%;
}
/* - Create Repository -------------------------------------------------------*/
.diffusion-create-repo {
margin-top: 32px;
margin-bottom: 20px;
}
.device .diffusion-create-repo {
margin-top: 0;
margin-bottom: 0;
}
/* - Phone Style ------------------------------------------------------------*/