Commit bb10d783 authored by Douwe Maan's avatar Douwe Maan

Resolve blob/tree conflicts

parent 474f678a
......@@ -109,7 +109,7 @@ module TreeHelper
end
def lock_file_link(project = @project, path = @path, html_options: {})
return unless license_allows_file_locks?
return unless license_allows_file_locks? && current_user
return if path.blank?
path_lock = project.find_path_lock(path, downstream: true)
......
......@@ -11,30 +11,9 @@
= view_on_environment_button(@commit.sha, @path, @environment) if @environment
.btn-group{ role: "group" }<
<<<<<<< HEAD
-# only show normal/blame view links for text files
- if blob.readable_text?
- if blame
= link_to 'Normal view', namespace_project_blob_path(@project.namespace, @project, @id),
class: 'btn btn-sm'
- else
= link_to 'Blame', namespace_project_blame_path(@project.namespace, @project, @id),
class: 'btn btn-sm js-blob-blame-link' unless blob.empty?
= lock_file_link(html_options: { class: 'btn btn-sm path-lock' })
= link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id),
class: 'btn btn-sm'
= link_to 'Permalink', namespace_project_blob_path(@project.namespace, @project,
tree_join(@commit.sha, @path)), class: 'btn btn-sm js-data-file-blob-permalink-url'
.btn-group{ role: "group" }<
- if current_user
= lock_file_link(html_options: {class: 'btn btn-sm path-lock'})
= edit_blob_link if blob.readable_text?
=======
= edit_blob_link
>>>>>>> upstream/master
- if current_user
= replace_blob_link
= delete_blob_link
......
......@@ -6,20 +6,6 @@
%th Name
%th.hidden-xs
.pull-left Last commit
<<<<<<< HEAD
.last-commit.hidden-sm.pull-left
%i.fa.fa-angle-right
%small.light
= link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @commit), class: "monospace"
= clipboard_button(text: @commit.id, title: "Copy commit SHA to clipboard")
= time_ago_with_tooltip(@commit.committed_date)
\-
= @commit.full_title
%small.commit-history-link-spacer &#124;
= lock_file_link(html_options: {class: 'pull-right prepend-left-10 path-lock'})
= link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id), class: 'commit-history-link'
=======
>>>>>>> upstream/master
%th.text-right Last Update
- if @path.present?
%tr.tree-item
......
.tree-controls
= lock_file_link(html_options: { class: 'btn btn-grouped path-lock' })
= render 'projects/find_file_link'
= link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id), class: 'btn btn-grouped'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment