diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-16 12:09:12 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-16 12:09:12 +0000 |
commit | cbfe03ae04a52d9825ff7cbeccdfe5d313adf6a2 (patch) | |
tree | e4879b35d019d3bbba1689f3ac4c48b81bf7b451 /app/helpers | |
parent | 3fd97b4bba24ca412112aad025a38a32c7a6cf8c (diff) | |
download | gitlab-ce-cbfe03ae04a52d9825ff7cbeccdfe5d313adf6a2.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/submodule_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/users_helper.rb | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/app/helpers/submodule_helper.rb b/app/helpers/submodule_helper.rb index 32c613ab4ad..1149b168383 100644 --- a/app/helpers/submodule_helper.rb +++ b/app/helpers/submodule_helper.rb @@ -66,7 +66,7 @@ module SubmoduleHelper project].join('') url_with_dotgit = url_no_dotgit + '.git' - url_with_dotgit == Gitlab::Shell.new.url_to_repo([namespace, '/', project].join('')) + url_with_dotgit == Gitlab::Shell.url_to_repo([namespace, '/', project].join('')) end def relative_self_url?(url) diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index e87bb27cf62..c1bca6b4c41 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -91,6 +91,21 @@ module UsersHelper end end + def work_information(user) + return unless user + + organization = user.organization + job_title = user.job_title + + if organization.present? && job_title.present? + s_('Profile|%{job_title} at %{organization}') % { job_title: job_title, organization: organization } + elsif job_title.present? + job_title + elsif organization.present? + organization + end + end + private def get_profile_tabs |