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
diff options
context:
space:
mode:
authorSato Hiroyuki <sathiroyuki@gmail.com>2013-03-26 04:51:39 +0400
committerSato Hiroyuki <sathiroyuki@gmail.com>2013-03-26 04:51:39 +0400
commitb49c1cb161e4d97c4ee33ae45a48e948f1097e60 (patch)
treef7d64e6f7389641d031fe127f48e321c2d2b6aa5 /app/helpers/graph_helper.rb
parent62ef763a80271b58e0c0f6e51891828f22689daa (diff)
Display note count on network graph.
Diffstat (limited to 'app/helpers/graph_helper.rb')
-rw-r--r--app/helpers/graph_helper.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/helpers/graph_helper.rb b/app/helpers/graph_helper.rb
index 369330151f4..ca7d823a45a 100644
--- a/app/helpers/graph_helper.rb
+++ b/app/helpers/graph_helper.rb
@@ -1,6 +1,13 @@
module GraphHelper
- def join_with_space(ary)
- ary.collect{|r|r.name}.join(" ") unless ary.nil?
+ def get_refs(commit)
+ refs = ""
+ refs += commit.refs.collect{|r|r.name}.join(" ") if commit.refs
+
+ # append note count
+ notes = @project.notes.for_commit_id(commit.id)
+ refs += "[#{notes.count}]" if notes.any?
+
+ refs
end
def parents_zip_spaces(parents, parent_spaces)