diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-01 13:39:37 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-01 13:39:37 +0300 |
commit | 56d15660b8e89ae0bc37953b4fe24739323e5921 (patch) | |
tree | 352a1dd9366c418031bcce40892c71692ecc442b | |
parent | 083d66563e8275fd13851ec0a1974cb17379f84f (diff) | |
download | gitlab-ce-56d15660b8e89ae0bc37953b4fe24739323e5921.tar.gz |
gitlab_git to 1.0.6, return submodule rendering in tree
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | Gemfile.lock | 4 | ||||
-rw-r--r-- | app/helpers/tree_helper.rb | 16 |
4 files changed, 9 insertions, 14 deletions
diff --git a/CHANGELOG b/CHANGELOG index 01ddc771777..f01b5e87c5e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ v 5.2.0 - Move Gitlab::Git code to gitlab_git gem - Move update docs in repo - requires gitlab-shell v1.4.0 + - fixed submodules listing under file tab v 5.1.0 - You can login with email or username now @@ -24,7 +24,7 @@ gem 'omniauth-github' # Extracting information from a git repository # We cannot use original git since some bugs gem "grit", '~> 2.5.0', git: 'https://github.com/gitlabhq/grit.git', ref: '42297cdcee16284d2e4eff23d41377f52fc28b9d' -gem 'gitlab_git', '~> 1.0.5' +gem 'gitlab_git', '~> 1.0.6' # Ruby/Rack Git Smart-HTTP Server Handler gem 'gitlab-grack', '~> 1.0.0', require: 'grack' diff --git a/Gemfile.lock b/Gemfile.lock index a6c2b6a7fd4..c06a1bd09cc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -165,7 +165,7 @@ GEM gitlab-pygments.rb (0.3.2) posix-spawn (~> 0.3.6) yajl-ruby (~> 1.1.0) - gitlab_git (1.0.5) + gitlab_git (1.0.6) activesupport (~> 3.2.13) github-linguist (~> 2.3.4) grit (~> 2.5.0) @@ -518,7 +518,7 @@ DEPENDENCIES github-markup (~> 0.7.4) gitlab-grack (~> 1.0.0) gitlab-pygments.rb (~> 0.3.2) - gitlab_git (~> 1.0.5) + gitlab_git (~> 1.0.6) gitlab_meta (= 5.0) gitlab_omniauth-ldap (= 1.0.2) gollum-lib (~> 1.0.0) diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb index e7002f60b8a..1f764ea1038 100644 --- a/app/helpers/tree_helper.rb +++ b/app/helpers/tree_helper.rb @@ -5,24 +5,18 @@ module TreeHelper # contents - A Grit::Tree object for the current tree def render_tree(tree) # Render Folders before Files/Submodules - folders, files = tree.trees, tree.blobs + folders, files, submodules = tree.trees, tree.blobs, tree.submodules tree = "" # Render folders if we have any tree += render partial: 'tree/tree_item', collection: folders, locals: {type: 'folder'} if folders.present? - files.each do |f| - html = if f.respond_to?(:url) - # Object is a Submodule - render partial: 'tree/submodule_item', object: f - else - # Object is a Blob - render partial: 'tree/blob_item', object: f, locals: {type: 'file'} - end + # Render files if we have any + tree += render partial: 'tree/blob_item', collection: files, locals: {type: 'file'} if files.present? - tree += html if html.present? - end + # Render submodules if we have any + tree += render partial: 'tree/submodule_item', collection: submodules if submodules.present? tree.html_safe end |