BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
f0150ef4
Commit
f0150ef4
authored
Sep 20, 2016
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add disabled delete button to protected branches
parent
4c8ea149
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
CHANGELOG
CHANGELOG
+1
-0
_branch.html.haml
app/views/projects/branches/_branch.html.haml
+2
-2
No files found.
CHANGELOG
View file @
f0150ef4
...
...
@@ -59,6 +59,7 @@ v 8.13.0 (unreleased)
- Fix Long commit messages overflow viewport in file tree
- Revert avoid touching file system on Build#artifacts?
- Stop using a Redis lease when updating the project activity timestamp whenever a new event is created
- Add disabled delete button to protected branches (ClemMakesApps)
- Add broadcast messages and alerts below sub-nav
- Better empty state for Groups view
- Update ruby-prof to 0.16.2. !6026 (Elan Ruusamäe)
...
...
app/views/projects/branches/_branch.html.haml
View file @
f0150ef4
...
...
@@ -30,8 +30,8 @@
=
render
'projects/buttons/download'
,
project:
@project
,
ref:
branch
.
name
-
if
can
_remove_branch?
(
@project
,
branch
.
name
)
=
link_to
namespace_project_branch_path
(
@project
.
namespace
,
@project
,
branch
.
name
),
class:
'btn btn-remove remove-row has-tooltip'
,
title:
"Delete branch"
,
method: :delete
,
data:
{
confirm:
"Deleting the '
#{
branch
.
name
}
' branch cannot be undone. Are you sure?"
,
container:
'body'
},
remote:
true
do
-
if
can
?
(
current_user
,
:push_code
,
@project
)
=
link_to
namespace_project_branch_path
(
@project
.
namespace
,
@project
,
branch
.
name
),
class:
"btn btn-remove remove-row has-tooltip
#{
can_remove_branch?
(
@project
,
branch
.
name
)
?
''
:
'disabled'
}
"
,
title:
"Delete branch"
,
method: :delete
,
data:
{
confirm:
"Deleting the '
#{
branch
.
name
}
' branch cannot be undone. Are you sure?"
,
container:
'body'
},
remote:
true
do
=
icon
(
"trash-o"
)
-
if
branch
.
name
!=
@repository
.
root_ref
...
...
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