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

13 lines
703 B
Text
Raw Normal View History

2012-10-15 16:08:00 -04:00
.btn-group.tree-btn-group
-# only show edit link for text files
- if @blob.text?
= link_to "edit", project_edit_tree_path(@project, @id), class: "btn btn-tiny", disabled: !allowed_tree_edit?
= link_to "raw", project_raw_path(@project, @id), class: "btn btn-tiny", target: "_blank"
-# only show normal/blame view links for text files
- if @blob.text?
- if current_page? project_blame_path(@project, @id)
2013-04-03 03:06:31 -04:00
= link_to "normal view", project_blob_path(@project, @id), class: "btn btn-tiny"
- else
= link_to "blame", project_blame_path(@project, @id), class: "btn btn-tiny" unless @blob.empty?
2013-01-29 15:29:21 -05:00
= link_to "history", project_commits_path(@project, @id), class: "btn btn-tiny"