Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
a7d3e2b9
Commit
a7d3e2b9
authored
Nov 15, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix recent branches order. Added counters
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
83b6e5d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
app/models/repository.rb
app/models/repository.rb
+1
-1
app/views/projects/branches/_filter.html.haml
app/views/projects/branches/_filter.html.haml
+12
-2
No files found.
app/models/repository.rb
View file @
a7d3e2b9
...
@@ -57,7 +57,7 @@ class Repository
...
@@ -57,7 +57,7 @@ class Repository
def
recent_branches
(
limit
=
20
)
def
recent_branches
(
limit
=
20
)
branches
.
sort
do
|
a
,
b
|
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
[
0
..
limit
]
end
end
...
...
app/views/projects/branches/_filter.html.haml
View file @
a7d3e2b9
%ul
.nav.nav-pills.nav-stacked
%ul
.nav.nav-pills.nav-stacked
=
nav_link
(
path:
'branches#recent'
)
do
=
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
=
nav_link
(
path:
'protected_branches#index'
)
do
=
link_to
project_protected_branches_path
(
@project
)
do
=
link_to
project_protected_branches_path
(
@project
)
do
Protected
Protected
%i
.icon-lock
%i
.icon-lock
.pull-right
=
@project
.
protected_branches
.
count
=
nav_link
(
path:
'branches#index'
)
do
=
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
%hr
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment