Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-22 02:56:20 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-22 02:56:20 +0300
commit6a1aa4763aa47c32ba6bd97e77d2bc0409dfdd6f (patch)
tree247b2cf3abfef671f48efc9dd4ce6c649dd92d2c /app/views
parentac050b6f3264abf74b96e4c4dbcd7977710bd1cc (diff)
parente5d491b7c702a7996190f85f94563252c5ca8fdb (diff)
Merge branch 'master' of github.com:gitlabhq/gitlabhq
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/diffs/_file.html.haml3
-rw-r--r--app/views/projects/tree/_submodule_item.html.haml10
2 files changed, 4 insertions, 9 deletions
diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml
index 34d13502231..8d080f710d8 100644
--- a/app/views/projects/diffs/_file.html.haml
+++ b/app/views/projects/diffs/_file.html.haml
@@ -9,6 +9,9 @@
.diff-btn-group
- if @commit.parent_ids.present?
= view_file_btn(@commit.parent_id, diff_file, project)
+ - elsif diff_file.diff.submodule?
+ - submodule_item = project.repository.blob_at(@commit.id, diff_file.file_path)
+ = submodule_link(submodule_item, @commit.id)
- else
- if diff_file.renamed_file
%span= "#{diff_file.old_path} renamed to #{diff_file.new_path}"
diff --git a/app/views/projects/tree/_submodule_item.html.haml b/app/views/projects/tree/_submodule_item.html.haml
index 46e9be4af83..20c70cac699 100644
--- a/app/views/projects/tree/_submodule_item.html.haml
+++ b/app/views/projects/tree/_submodule_item.html.haml
@@ -1,14 +1,6 @@
-- tree, commit = submodule_links(submodule_item)
%tr{ class: "tree-item" }
%td.tree-item-file-name
%i.fa.fa-archive
- %span
- = link_to truncate(submodule_item.name, length: 40), tree
- @
- %span.monospace
- - if commit.nil?
- #{truncate_sha(submodule_item.id)}
- - else
- = link_to "#{truncate_sha(submodule_item.id)}", commit
+ = submodule_link(submodule_item, @ref)
%td
%td.hidden-xs