1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-25 06:50:55 +01:00

Add a link to repository tool if there are no configured repositories

Summary: helping noobs help themselves

Test Plan: set $rows = array() and verified the txt. also threw a false && for my isAdmin conditional to check the other txt

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1086, T1360

Differential Revision: https://secure.phabricator.com/D3100
This commit is contained in:
Bob Trahan 2012-07-30 09:09:40 -07:00
parent f0deadcd09
commit c8578b9fa8

View file

@ -121,7 +121,24 @@ final class DiffusionHomeController extends DiffusionController {
); );
} }
$repository_tool_uri = PhabricatorEnv::getProductionURI('/repository/');
$repository_tool = phutil_render_tag('a',
array(
'href' => $repository_tool_uri,
),
'repository tool');
$no_repositories_txt = 'This instance of Phabricator does not have any '.
'configured repositories. ';
if ($user->getIsAdmin()) {
$no_repositories_txt .= 'To setup one or more repositories, visit the '.
$repository_tool.'.';
} else {
$no_repositories_txt .= 'Ask an administrator to setup one or more '.
'repositories via the '.$repository_tool.'.';
}
$table = new AphrontTableView($rows); $table = new AphrontTableView($rows);
$table->setNoDataString($no_repositories_txt);
$table->setHeaders( $table->setHeaders(
array( array(
'Repository', 'Repository',