diff options
author | Hannes Rosenögger <123haynes@gmail.com> | 2015-01-17 16:12:49 +0300 |
---|---|---|
committer | Hannes Rosenögger <123haynes@gmail.com> | 2015-01-17 21:22:35 +0300 |
commit | 8243eb3f0e3ee06a793831ae0899bfe409a31903 (patch) | |
tree | ada0ee980669049f1952d36c58698731844521b7 /app/helpers/commits_helper.rb | |
parent | ada6c6080b2fa0d63003f8b29b5c32195254906d (diff) |
Show tags in commit view
Diffstat (limited to 'app/helpers/commits_helper.rb')
-rw-r--r-- | app/helpers/commits_helper.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index 36adeadd8a5..6a6d483ba66 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -65,6 +65,12 @@ module CommitsHelper branches.sort.map { |branch| link_to(branch, project_tree_path(project, branch)) }.join(", ").html_safe end + # Returns the sorted links to tags, separated by a comma + def commit_tags_links(project, tags) + sorted = VersionSorter.rsort(tags) + sorted.map { |tag| link_to(tag, project_commits_path(project, project.repository.find_tag(tag).name)) }.join(", ").html_safe + end + def link_to_browse_code(project, commit) if current_controller?(:projects, :commits) if @repo.blob_at(commit.id, @path) |