2012-10-15 16:08:00 -04:00
|
|
|
.btn-group.tree-btn-group
|
2015-01-24 13:02:58 -05:00
|
|
|
= 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'
|
2012-10-15 17:42:08 -04:00
|
|
|
-# only show normal/blame view links for text files
|
2015-12-18 10:14:12 -05:00
|
|
|
- if blob_text_viewable?(@blob)
|
2015-01-24 13:02:58 -05:00
|
|
|
- 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'
|
2012-10-15 17:42:08 -04:00
|
|
|
- else
|
2015-01-24 13:02:58 -05:00
|
|
|
= 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?
|
2015-01-24 13:02:58 -05:00
|
|
|
= link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id),
|
2015-03-14 03:29:32 -04:00
|
|
|
class: 'btn btn-sm'
|
2015-12-08 11:10:07 -05:00
|
|
|
= link_to 'Permalink', namespace_project_blob_path(@project.namespace, @project,
|
|
|
|
tree_join(@commit.sha, @path)), class: 'btn btn-sm'
|
2013-11-19 09:14:48 -05:00
|
|
|
|
2015-12-18 04:03:34 -05:00
|
|
|
- if current_user
|
2015-09-15 08:56:42 -04:00
|
|
|
.btn-group{ role: "group" }
|
2015-12-18 04:03:34 -05:00
|
|
|
= edit_blob_link
|
|
|
|
= replace_blob_link
|
|
|
|
= delete_blob_link
|