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
7aeb7077
Commit
7aeb7077
authored
9 years ago
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only show Edit button for text blobs.
parent
82ddd738
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
app/helpers/blob_helper.rb
app/helpers/blob_helper.rb
+2
-2
No files found.
app/helpers/blob_helper.rb
View file @
7aeb7077
...
...
@@ -30,7 +30,7 @@ module BlobHelper
nil
end
return
unless
blob
&&
blob_editable?
(
blob
)
return
unless
blob
&&
blob
.
text?
&&
blob
_editable?
(
blob
)
text
=
'Edit'
after
=
options
[
:after
]
||
''
...
...
@@ -47,7 +47,7 @@ module BlobHelper
end
def
blob_editable?
(
blob
,
project
=
@project
,
ref
=
@ref
)
allowed_tree_edit?
(
project
,
ref
)
&&
!
blob
.
lfs_pointer?
!
blob
.
lfs_pointer?
&&
allowed_tree_edit?
(
project
,
ref
)
end
def
leave_edit_message
...
...
This diff is collapsed.
Click to expand it.
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