diff rhodecode/controllers/changelog.py @ 4020:218ed589e44a

branch selectors: show closed branches too It would be even better if they were fetched dynamically somehow and perhaps placed in a sub sub menu ... but showing them in the list is often better than not showing them at all.
author Mads Kiilerich <madski@unity3d.com>
date Tue, 04 Jun 2013 13:26:41 +0200
parents 267bb347d68c
children 4a0bce848ed8
line wrap: on
line diff
--- a/rhodecode/controllers/changelog.py	Tue Jun 18 21:54:28 2013 +0200
+++ b/rhodecode/controllers/changelog.py	Tue Jun 04 13:26:41 2013 +0200
@@ -176,6 +176,10 @@
         c.branch_name = branch_name
         c.branch_filters = [('', _('All Branches'))] + \
             [(k, k) for k in c.rhodecode_repo.branches.keys()]
+        if c.rhodecode_repo.closed_branches:
+            prefix = _('(closed)') + ' '
+            c.branch_filters += [('-', '-')] + \
+                [(k, prefix + k) for k in c.rhodecode_repo.closed_branches.keys()]
         _revs = []
         if not f_path:
             _revs = [x.revision for x in c.pagination]