summaryrefslogtreecommitdiff
path: root/app/views/projects/tree
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-12-11 12:17:11 +0000
committerPhil Hughes <me@iamphill.com>2017-12-11 12:17:11 +0000
commitf38a6d6ee610e7301be35740d1cc0e3a1cbd42d0 (patch)
treebfd39b0e38fd3328149966ecdc2329f932de9470 /app/views/projects/tree
parent12d33b883adda7093f0f4b838532871036af3925 (diff)
downloadgitlab-ce-f38a6d6ee610e7301be35740d1cc0e3a1cbd42d0.tar.gz
Added LFS badge to indicate LFS tracked files
Closes #15567
Diffstat (limited to 'app/views/projects/tree')
-rw-r--r--app/views/projects/tree/_blob_item.html.haml3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/views/projects/tree/_blob_item.html.haml b/app/views/projects/tree/_blob_item.html.haml
index c51af901699..d1ab49920eb 100644
--- a/app/views/projects/tree/_blob_item.html.haml
+++ b/app/views/projects/tree/_blob_item.html.haml
@@ -1,9 +1,12 @@
+- is_lfs_blob = @lfs_blobs.select{|b| b.id === blob_item.id }.any?
%tr{ class: "tree-item #{tree_hex_class(blob_item)}" }
%td.tree-item-file-name
= tree_icon(type, blob_item.mode, blob_item.name)
- file_name = blob_item.name
= link_to project_blob_path(@project, tree_join(@id || @commit.id, blob_item.name)), class: 'str-truncated', title: file_name do
%span= file_name
+ - if is_lfs_blob
+ %span.label.label-lfs.prepend-left-5 LFS
%td.hidden-xs.tree-commit
%td.tree-time-ago.cgray.text-right
= render 'projects/tree/spinner'