diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-25 12:08:19 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-25 12:08:19 +0000 |
commit | e6baeabaa9651d90b03bb64ffce75a2c3cb89aab (patch) | |
tree | 85f3cbd6e437b17be59505cf3ac4794c1838609e /app/helpers | |
parent | 5064bf8c5647d4c4430cbb4d097cf1592416de29 (diff) | |
download | gitlab-ce-e6baeabaa9651d90b03bb64ffce75a2c3cb89aab.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/events_helper.rb | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index 09866ca75ff..ba8e046f504 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -68,10 +68,12 @@ module EventsHelper end def event_preposition(event) - if event.push_action? || event.commented_action? || event.target - "at" + if event.wiki_page? + 'in the wiki for' elsif event.milestone? - "in" + 'in' + elsif event.push_action? || event.commented_action? || event.target + 'at' end end @@ -172,6 +174,19 @@ module EventsHelper end end + def event_wiki_title_html(event) + capture do + concat content_tag(:span, _('wiki page'), class: "event-target-type append-right-4") + concat link_to(event.target_title, event_wiki_page_target_url(event), + title: event.target_title, + class: 'has-tooltip event-target-link append-right-4') + end + end + + def event_wiki_page_target_url(event) + project_wiki_url(event.project, event.target.canonical_slug) + end + def event_note_title_html(event) if event.note_target capture do |