mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 14:30:56 +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:
parent
f0deadcd09
commit
c8578b9fa8
1 changed files with 17 additions and 0 deletions
|
@ -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->setNoDataString($no_repositories_txt);
|
||||
$table->setHeaders(
|
||||
array(
|
||||
'Repository',
|
||||
|
|
Loading…
Reference in a new issue