diff options
author | Adam Buckland <adamjbuckland@gmail.com> | 2016-07-27 15:47:23 +0300 |
---|---|---|
committer | Adam Buckland <adamjbuckland@gmail.com> | 2016-08-09 16:08:47 +0300 |
commit | 8abc757539454e13835073318f896796b1a85faf (patch) | |
tree | 78cf0a861e61362016f34751a9bc5d3d79a7070d /app/views/projects/tree | |
parent | 551ffc0a4d25a381e9f8f6a8d6f2793bb87f3145 (diff) |
Update tree view to sort folders with submodules
Currently trees are sorted in the fashion:
- folders
- files
- submodules
with each section sorted alphabetically
This changes to this system:
- folders and submodules (sorted together)
- files
Diffstat (limited to 'app/views/projects/tree')
-rw-r--r-- | app/views/projects/tree/_tree_row.html.haml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/views/projects/tree/_tree_row.html.haml b/app/views/projects/tree/_tree_row.html.haml new file mode 100644 index 00000000000..0a5c6f048f7 --- /dev/null +++ b/app/views/projects/tree/_tree_row.html.haml @@ -0,0 +1,6 @@ +- if tree_row.type == :tree + = render partial: 'projects/tree/tree_item', object: tree_row, as: 'tree_item', locals: { type: 'folder' } +- elsif tree_row.type == :blob + = render partial: 'projects/tree/blob_item', object: tree_row, as: 'blob_item', locals: { type: 'file' } +- elsif tree_row.type == :commit + = render partial: 'projects/tree/submodule_item', object: tree_row, as: 'submodule_item' |