mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Add indication of hg branch open/closed in branch list
Summary: Adds some basic UI for open / closed state when viewing a list of branches in Mercurial. Fixes T12838 Test Plan: Close and open branches, view list. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T12838 Differential Revision: https://secure.phabricator.com/D18447
This commit is contained in:
parent
295c806219
commit
d2a3f2da73
1 changed files with 12 additions and 8 deletions
|
@ -74,14 +74,6 @@ final class DiffusionBranchListView extends DiffusionView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$fields = $branch->getRawFields();
|
|
||||||
$closed = idx($fields, 'closed');
|
|
||||||
if ($closed) {
|
|
||||||
$status = pht('Closed');
|
|
||||||
} else {
|
|
||||||
$status = pht('Open');
|
|
||||||
}
|
|
||||||
|
|
||||||
$browse_href = $drequest->generateURI(
|
$browse_href = $drequest->generateURI(
|
||||||
array(
|
array(
|
||||||
'action' => 'browse',
|
'action' => 'browse',
|
||||||
|
@ -129,6 +121,18 @@ final class DiffusionBranchListView extends DiffusionView {
|
||||||
}
|
}
|
||||||
$item->addAttribute(array($datetime));
|
$item->addAttribute(array($datetime));
|
||||||
|
|
||||||
|
if ($can_close_branches) {
|
||||||
|
$fields = $branch->getRawFields();
|
||||||
|
$closed = idx($fields, 'closed');
|
||||||
|
if ($closed) {
|
||||||
|
$status = pht('Branch Closed');
|
||||||
|
$item->setDisabled(true);
|
||||||
|
} else {
|
||||||
|
$status = pht('Branch Open');
|
||||||
|
}
|
||||||
|
$item->addAttribute($status);
|
||||||
|
}
|
||||||
|
|
||||||
$list->addItem($item);
|
$list->addItem($item);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue