Page MenuHomePhabricator

D18447.id.diff
No OneTemporary

D18447.id.diff

diff --git a/src/applications/diffusion/view/DiffusionBranchListView.php b/src/applications/diffusion/view/DiffusionBranchListView.php
--- a/src/applications/diffusion/view/DiffusionBranchListView.php
+++ b/src/applications/diffusion/view/DiffusionBranchListView.php
@@ -74,14 +74,6 @@
}
}
- $fields = $branch->getRawFields();
- $closed = idx($fields, 'closed');
- if ($closed) {
- $status = pht('Closed');
- } else {
- $status = pht('Open');
- }
-
$browse_href = $drequest->generateURI(
array(
'action' => 'browse',
@@ -129,6 +121,18 @@
}
$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);
}

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 10, 2:30 PM (5 d, 9 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6720722
Default Alt Text
D18447.id.diff (1 KB)

Event Timeline