summaryrefslogtreecommitdiff
path: root/app/helpers/gitlab/tags_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/gitlab/tags_helper.rb')
-rw-r--r--app/helpers/gitlab/tags_helper.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/helpers/gitlab/tags_helper.rb b/app/helpers/gitlab/tags_helper.rb
new file mode 100644
index 00000000000..d694b2c90ce
--- /dev/null
+++ b/app/helpers/gitlab/tags_helper.rb
@@ -0,0 +1,16 @@
+module Gitlab
+ module TagsHelper
+ def tag_path(tag)
+ "/tags/#{tag}"
+ end
+
+ def tag_list(project)
+ html = ''
+ project.tag_list.each do |tag|
+ html << link_to(tag, tag_path(tag))
+ end
+
+ html.html_safe
+ end
+ end
+end