Commit d40d2dd8090ab1c171791b54d26e65f0573de239
1 parent
b80a0195
Exists in
master
and in
4 other branches
Fix offered links in tree/blob_actions partial
Showing
1 changed file
with
9 additions
and
2 deletions
Show diff stats
app/views/tree/_blob_actions.html.haml
| 1 | 1 | .btn-group.tree-btn-group |
| 2 | + -# only show edit link for text files | |
| 3 | + - if @tree.text? | |
| 4 | + = link_to "edit", edit_project_tree_path(@project, @id), class: "btn very_small" | |
| 2 | 5 | = link_to "raw", project_blob_path(@project, @id), class: "btn very_small", target: "_blank" |
| 6 | + -# only show normal/blame view links for text files | |
| 7 | + - if @tree.text? | |
| 8 | + - if current_page? project_blame_path(@project, @id) | |
| 9 | + = link_to "normal view", project_tree_path(@project, @id), class: "btn very_small" | |
| 10 | + - else | |
| 11 | + = link_to "blame", project_blame_path(@project, @id), class: "btn very_small" | |
| 3 | 12 | = link_to "history", project_commits_path(@project, @id), class: "btn very_small" |
| 4 | - = link_to "blame", project_blame_path(@project, @id), class: "btn very_small" | |
| 5 | - = link_to "edit", edit_project_tree_path(@project, @id), class: "btn very_small" | ... | ... |