diff --git a/resources/celerity/map.php b/resources/celerity/map.php index e21ba4bf8b..d6f97cdd54 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -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', diff --git a/src/applications/diffusion/controller/DiffusionRepositoryEditController.php b/src/applications/diffusion/controller/DiffusionRepositoryEditController.php index d3801fa206..bf3f389806 100644 --- a/src/applications/diffusion/controller/DiffusionRepositoryEditController.php +++ b/src/applications/diffusion/controller/DiffusionRepositoryEditController.php @@ -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, )); diff --git a/src/applications/repository/constants/PhabricatorRepositoryType.php b/src/applications/repository/constants/PhabricatorRepositoryType.php index 998bff0d2e..593732ddd8 100644 --- a/src/applications/repository/constants/PhabricatorRepositoryType.php +++ b/src/applications/repository/constants/PhabricatorRepositoryType.php @@ -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.'), ), diff --git a/webroot/rsrc/css/application/diffusion/diffusion.css b/webroot/rsrc/css/application/diffusion/diffusion.css index 024407da00..5cfeaf6bed 100644 --- a/webroot/rsrc/css/application/diffusion/diffusion.css +++ b/webroot/rsrc/css/application/diffusion/diffusion.css @@ -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 ------------------------------------------------------------*/