diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb index 43c0fa68bc..3b8261316c 100644 --- a/app/helpers/admin_helper.rb +++ b/app/helpers/admin_helper.rb @@ -79,18 +79,18 @@ def admin_dropdown_setting(name, option_tags, title, description = nil, options end def git_link_tag - if Seek::Version.git_present? - begin + begin + if Seek::Version.git_version_record_present? + version = Seek::Version.git_version + link = link_to(version[0...7], "https://github.com/seek4science/seek/commit/#{version}", target: '_blank', title: version).html_safe + "Git revision: #{link}".html_safe + elsif Seek::Version.git_present? version = Seek::Version.git_version branch = Seek::Version.git_branch link = link_to(version[0...7], "https://github.com/seek4science/seek/commit/#{version}", target: '_blank', title: version).html_safe "Git revision: #{link} (branch: #{branch})".html_safe - rescue end - elsif Seek::Version.git_version_record_present? - version = Seek::Version.git_version - link = link_to(version[0...7], "https://github.com/seek4science/seek/commit/#{version}", target: '_blank', title: version).html_safe - "Git revision: #{link}".html_safe + rescue end end