diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 16:54:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 16:54:15 +0300 |
commit | be834a25982746ffd85252ff502df42bb88cb9d5 (patch) | |
tree | b4d6a8ba0931e12fac08f05abea33a3b8ec2c8a2 /app/helpers/events_helper.rb | |
parent | ee925a3597f27e92f83a50937a64068109675b3d (diff) |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc32
Diffstat (limited to 'app/helpers/events_helper.rb')
-rw-r--r-- | app/helpers/events_helper.rb | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index 0167f2ef698..f40755b9439 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -28,19 +28,7 @@ module EventsHelper end def event_action_name(event) - target = if event.target_type - if event.design? || event.design_note? - 'design' - elsif event.wiki_page? - 'wiki page' - elsif event.note? - event.note_target_type - else - event.target_type.titleize.downcase - end - else - 'project' - end + target = event.note_target_type_name || event.target_type_name [event.action_name, target].join(" ") end @@ -229,7 +217,7 @@ module EventsHelper def event_note_title_html(event) if event.note_target capture do - concat content_tag(:span, event.note_target_type, class: "event-target-type gl-mr-2") + concat content_tag(:span, event.note_target_type_name, class: "event-target-type gl-mr-2") concat link_to(event.note_target_reference, event_note_target_url(event), title: event.target_title, class: 'has-tooltip event-target-link gl-mr-2') end else |