Commit 4656ef957a59a76b050badf60577c30bbf758535

Authored by Dmitriy Zaporozhets
1 parent 31c963ed

Replace files icons with fontawesome

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/assets/images/Storage-UI.PNG

737 Bytes

app/assets/images/file_bin.png

219 Bytes

app/assets/images/file_dir.png

1.61 KB

app/assets/images/file_empty.png

319 Bytes

app/assets/images/file_img.png

536 Bytes

app/assets/images/file_txt.png

463 Bytes

app/assets/images/rss_ui.png

812 Bytes

app/assets/images/submodule.png

641 Bytes

app/assets/stylesheets/sections/tree.scss
@@ -57,6 +57,10 @@ @@ -57,6 +57,10 @@
57 } 57 }
58 } 58 }
59 59
  60 + i {
  61 + color: $bg_primary;
  62 + }
  63 +
60 img { 64 img {
61 position: relative; 65 position: relative;
62 top:-1px; 66 top:-1px;
app/helpers/tree_helper.rb
@@ -25,8 +25,13 @@ module TreeHelper @@ -25,8 +25,13 @@ module TreeHelper
25 # 25 #
26 # type - String type of the tree item; either 'folder' or 'file' 26 # type - String type of the tree item; either 'folder' or 'file'
27 def tree_icon(type) 27 def tree_icon(type)
28 - image = type == 'folder' ? 'file_dir.png' : 'file_txt.png'  
29 - image_tag(image, size: '16x16') 28 + icon_class = if type == 'folder'
  29 + 'icon-folder-close'
  30 + else
  31 + 'icon-file-alt'
  32 + end
  33 +
  34 + content_tag :i, nil, class: icon_class
30 end 35 end
31 36
32 def tree_hex_class(content) 37 def tree_hex_class(content)
app/views/projects/tree/_submodule_item.html.haml
1 - tree, commit = submodule_links(submodule_item) 1 - tree, commit = submodule_links(submodule_item)
2 %tr{ class: "tree-item" } 2 %tr{ class: "tree-item" }
3 %td.tree-item-file-name 3 %td.tree-item-file-name
4 - = image_tag "submodule.png" 4 + %i.icon-archive
5 %span 5 %span
6 = link_to truncate(submodule_item.name, length: 40), tree 6 = link_to truncate(submodule_item.name, length: 40), tree
7 @ 7 @
app/views/projects/tree/_tree.html.haml
@@ -36,8 +36,7 @@ @@ -36,8 +36,7 @@
36 - if @path.present? 36 - if @path.present?
37 %tr.tree-item 37 %tr.tree-item
38 %td.tree-item-file-name 38 %td.tree-item-file-name
39 - = image_tag "file_empty.png", size: '16x16'  
40 - = link_to "..", project_tree_path(@project, up_dir_path(tree)) 39 + = link_to "..", project_tree_path(@project, up_dir_path(tree)), class: 'prepend-left-10'
41 %td 40 %td
42 %td 41 %td
43 %td 42 %td