@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+12 -8
+12 -8
src/applications/diffusion/view/DiffusionBranchListView.php
··· 74 74 } 75 75 } 76 76 77 - $fields = $branch->getRawFields(); 78 - $closed = idx($fields, 'closed'); 79 - if ($closed) { 80 - $status = pht('Closed'); 81 - } else { 82 - $status = pht('Open'); 83 - } 84 - 85 77 $browse_href = $drequest->generateURI( 86 78 array( 87 79 'action' => 'browse', ··· 128 120 $item->setStatusIcon('fa-code-fork', pht('Default Branch')); 129 121 } 130 122 $item->addAttribute(array($datetime)); 123 + 124 + if ($can_close_branches) { 125 + $fields = $branch->getRawFields(); 126 + $closed = idx($fields, 'closed'); 127 + if ($closed) { 128 + $status = pht('Branch Closed'); 129 + $item->setDisabled(true); 130 + } else { 131 + $status = pht('Branch Open'); 132 + } 133 + $item->addAttribute($status); 134 + } 131 135 132 136 $list->addItem($item); 133 137