diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/blob/_actions.html.haml | 8 | ||||
-rw-r--r-- | app/views/projects/diffs/_file.html.haml | 6 |
2 files changed, 4 insertions, 10 deletions
diff --git a/app/views/projects/blob/_actions.html.haml b/app/views/projects/blob/_actions.html.haml index 812d88a8730..f428ae41ef4 100644 --- a/app/views/projects/blob/_actions.html.haml +++ b/app/views/projects/blob/_actions.html.haml @@ -1,11 +1,5 @@ .btn-group.tree-btn-group - -# only show edit link for text files - - if @blob.text? - - if allowed_tree_edit? - = link_to 'Edit', project_edit_tree_path(@project, @id), - class: 'btn btn-small' - - else - %span.btn.btn-small.disabled Edit + = edit_blob_link(@project, @ref, @path) = link_to 'Raw', project_raw_path(@project, @id), class: 'btn btn-small', target: '_blank' -# only show normal/blame view links for text files diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml index bf7770ceedf..23e7691b32e 100644 --- a/app/views/projects/diffs/_file.html.haml +++ b/app/views/projects/diffs/_file.html.haml @@ -30,9 +30,9 @@ - if @merge_request && @merge_request.source_project - = link_to project_edit_tree_path(@merge_request.source_project, tree_join(@merge_request.source_branch, diff_file.new_path), from_merge_request_id: @merge_request.id), { class: 'btn btn-small' } do - Edit - + = edit_blob_link(@merge_request.source_project, + @merge_request.source_branch, diff_file.new_path, + after: ' ', from_merge_request_id: @merge_request.id) = view_file_btn(@commit.id, diff_file, project) |