From d40d2dd8090ab1c171791b54d26e65f0573de239 Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Mon, 15 Oct 2012 23:42:08 +0200 Subject: [PATCH] Fix offered links in tree/blob_actions partial --- app/views/tree/_blob_actions.html.haml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/views/tree/_blob_actions.html.haml b/app/views/tree/_blob_actions.html.haml index 27f835e82a3..d51f7205ef6 100644 --- a/app/views/tree/_blob_actions.html.haml +++ b/app/views/tree/_blob_actions.html.haml @@ -1,5 +1,12 @@ .btn-group.tree-btn-group + -# only show edit link for text files + - if @tree.text? + = link_to "edit", edit_project_tree_path(@project, @id), class: "btn very_small" = link_to "raw", project_blob_path(@project, @id), class: "btn very_small", target: "_blank" + -# only show normal/blame view links for text files + - if @tree.text? + - if current_page? project_blame_path(@project, @id) + = link_to "normal view", project_tree_path(@project, @id), class: "btn very_small" + - else + = link_to "blame", project_blame_path(@project, @id), class: "btn very_small" = link_to "history", project_commits_path(@project, @id), class: "btn very_small" - = link_to "blame", project_blame_path(@project, @id), class: "btn very_small" - = link_to "edit", edit_project_tree_path(@project, @id), class: "btn very_small" -- GitLab