gitlab-org--gitlab-foss/app/views/projects/blob/_actions.html.haml

22 lines
977 B
Text
Raw Normal View History

2012-10-15 16:08:00 -04:00
.btn-group.tree-btn-group
= link_to 'Raw', namespace_project_raw_path(@project.namespace, @project, @id),
2015-03-14 03:29:32 -04:00
class: 'btn btn-sm', target: '_blank'
-# only show normal/blame view links for text files
2015-12-18 10:14:12 -05:00
- if blob_text_viewable?(@blob)
- if current_page? namespace_project_blame_path(@project.namespace, @project, @id)
= link_to 'Normal View', namespace_project_blob_path(@project.namespace, @project, @id),
2015-03-14 03:29:32 -04:00
class: 'btn btn-sm'
- else
= link_to 'Blame', namespace_project_blame_path(@project.namespace, @project, @id),
2015-03-14 03:29:32 -04:00
class: 'btn btn-sm' unless @blob.empty?
= link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id),
2015-03-14 03:29:32 -04:00
class: 'btn btn-sm'
= link_to 'Permalink', namespace_project_blob_path(@project.namespace, @project,
tree_join(@commit.sha, @path)), class: 'btn btn-sm'
- if current_user
.btn-group{ role: "group" }
= edit_blob_link
= replace_blob_link
= delete_blob_link