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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
83fa2e5e
Commit
83fa2e5e
authored
May 11, 2018
by
Collen Kriel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move file locking feature check to FileLock helper
parent
e9dee299
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/views/projects/blob/_header.html.haml
app/views/projects/blob/_header.html.haml
+1
-2
ee/app/helpers/ee/lock_helper.rb
ee/app/helpers/ee/lock_helper.rb
+1
-0
No files found.
app/views/projects/blob/_header.html.haml
View file @
83fa2e5e
...
...
@@ -11,7 +11,6 @@
=
view_on_environment_button
(
@commit
.
sha
,
@path
,
@environment
)
if
@environment
.btn-group
{
role:
"group"
}
<
-
if
@project
.
feature_available?
(
:file_locks
)
=
lock_file_link
(
html_options:
{
class:
'btn btn-sm path-lock'
})
=
edit_blob_button
...
...
ee/app/helpers/ee/lock_helper.rb
View file @
83fa2e5e
module
EE
module
LockHelper
def
lock_file_link
(
project
=
@project
,
path
=
@path
,
html_options:
{})
return
unless
project
.
feature_available?
(
:file_locks
)
return
unless
current_user
return
if
path
.
blank?
...
...
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