Commit a275793a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fix recent branches order. Added counters


Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 98e9fba5bfb2
......@@ -57,7 +57,7 @@
def recent_branches(limit = 20)
branches.sort do |a, b|
a.commit.committed_date <=> b.commit.committed_date
b.commit.committed_date <=> a.commit.committed_date
end[0..limit]
end
......
%ul.nav.nav-pills.nav-stacked
= nav_link(path: 'branches#recent') do
= link_to 'Recent', recent_project_branches_path(@project)
= link_to recent_project_branches_path(@project) do
Recent
.pull-right
= @repository.recent_branches.count
= nav_link(path: 'protected_branches#index') do
= link_to project_protected_branches_path(@project) do
Protected
%i.icon-lock
......@@ -4,5 +8,8 @@
= nav_link(path: 'protected_branches#index') do
= link_to project_protected_branches_path(@project) do
Protected
%i.icon-lock
.pull-right
= @project.protected_branches.count
= nav_link(path: 'branches#index') do
......@@ -8,5 +15,8 @@
= nav_link(path: 'branches#index') do
= link_to 'All branches', project_branches_path(@project)
= link_to project_branches_path(@project) do
All branches
.pull-right
= @repository.branch_names.count
%hr
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment