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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
e569cf36
Commit
e569cf36
authored
May 29, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6991 from jvanbaarsen/branch-counter-after-delete
Make sure the branch counter gets updated
parents
6fdd9008
4ac56fa1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
3 deletions
+7
-3
app/controllers/projects/branches_controller.rb
app/controllers/projects/branches_controller.rb
+2
-1
app/views/projects/branches/_branch.html.haml
app/views/projects/branches/_branch.html.haml
+1
-1
app/views/projects/branches/destroy.js.haml
app/views/projects/branches/destroy.js.haml
+3
-0
app/views/projects/commits/_head.html.haml
app/views/projects/commits/_head.html.haml
+1
-1
No files found.
app/controllers/projects/branches_controller.rb
View file @
e569cf36
...
...
@@ -24,10 +24,11 @@ class Projects::BranchesController < Projects::ApplicationController
def
destroy
DeleteBranchService
.
new
.
execute
(
project
,
params
[
:id
],
current_user
)
@branch_name
=
params
[
:id
]
respond_to
do
|
format
|
format
.
html
{
redirect_to
project_branches_path
(
@project
)
}
format
.
js
{
render
nothing:
true
}
format
.
js
end
end
end
app/views/projects/branches/_branch.html.haml
View file @
e569cf36
-
commit
=
@repository
.
commit
(
branch
.
target
)
%li
%li
(
class=
"js-branch-#{branch.name}"
)
%h4
=
link_to
project_tree_path
(
@project
,
branch
.
name
)
do
%strong
=
truncate
(
branch
.
name
,
length:
60
)
...
...
app/views/projects/branches/destroy.js.haml
0 → 100644
View file @
e569cf36
:plain
$(".js-branch-
#{
@branch_name
}
").remove();
$('.js-totalbranch-count').html("
#{
@repository
.
branches
.
size
}
")
app/views/projects/commits/_head.html.haml
View file @
e569cf36
...
...
@@ -9,7 +9,7 @@
=
nav_link
(
html_options:
{
class:
branches_tab_class
})
do
=
link_to
project_branches_path
(
@project
)
do
Branches
%span
.badge
=
@repository
.
branches
.
size
%span
.badge
.js-totalbranch-count
=
@repository
.
branches
.
size
=
nav_link
(
controller: :tags
)
do
=
link_to
project_tags_path
(
@project
)
do
...
...
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