Only show Edit button for text blobs.
This commit is contained in:
parent
82ddd738b6
commit
7aeb7077cb
|
@ -30,7 +30,7 @@ module BlobHelper
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
return unless blob && blob_editable?(blob)
|
return unless blob && blob.text? && blob_editable?(blob)
|
||||||
|
|
||||||
text = 'Edit'
|
text = 'Edit'
|
||||||
after = options[:after] || ''
|
after = options[:after] || ''
|
||||||
|
@ -47,7 +47,7 @@ module BlobHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def blob_editable?(blob, project = @project, ref = @ref)
|
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
|
end
|
||||||
|
|
||||||
def leave_edit_message
|
def leave_edit_message
|
||||||
|
|
Loading…
Reference in New Issue